python/PKGBUILD

61 lines
2.0 KiB
Bash
Raw Permalink Normal View History

2024-10-14 22:07:44 +08:00
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Future Linux Team <future_linux@163.com>
pkgname=python
2024-11-16 19:45:43 +08:00
pkgver=3.13.0
2024-10-14 22:07:44 +08:00
pkgrel=1
pkgdesc="The Python programming language"
arch=('x86_64')
url="https://www.python.org/"
license=('PSF-2.0')
depends=('bzip2' 'expat' 'gdbm' 'libffi' 'libxcrypt' 'openssl' 'zlib' 'tzdata')
makedepedns=('sqlite')
source=(https://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz
2024-11-16 19:45:43 +08:00
https://www.python.org/ftp/python/doc/${pkgver}/python-${pkgver}-docs-html.tar.bz2
${pkgname}-3.13.0-site-packages-lib64.patch)
sha256sums=(086de5882e3cb310d4dca48457522e2e48018ecd43da9cdf827f6a0759efb07d
057b7a993102fccca3481be413d69d3a4812c35d6daf3381146dc6119007abac
050fbeaf4a4fcfda518cbdd1eeca238b066ccaad8aef99173f3647c6113518f9)
2024-10-14 22:07:44 +08:00
prepare() {
2024-11-16 19:45:43 +08:00
cd Python-${pkgver}
2024-10-14 22:07:44 +08:00
2024-11-16 19:45:43 +08:00
patch -Np1 -i ${srcdir}/${pkgname}-3.13.0-site-packages-lib64.patch
2024-10-14 22:07:44 +08:00
2024-11-16 19:45:43 +08:00
rm -r Modules/expat
2024-10-14 22:07:44 +08:00
}
build() {
2024-11-16 19:45:43 +08:00
cd Python-${pkgver}
CFLAGS="${CFLAGS/-O2/-O3} -ffat-lto-objects"
${CONFIGURE} \
--enable-shared \
--with-system-expat \
--with-dbmliborder=gdbm:ndbm \
--with-platlibdir=lib64 \
--enable-ipv6 \
--enable-optimizations \
--without-ensurepip \
--with-lto \
--with-build-python \
--enable-loadable-sqlite-extensions \
--with-tzpath=/usr/share/zoneinfo
make
2024-10-14 22:07:44 +08:00
}
package() {
2024-11-16 19:45:43 +08:00
cd Python-${pkgver}
2024-10-14 22:07:44 +08:00
2024-11-16 19:45:43 +08:00
make DESTDIR=${pkgdir} install
2024-10-14 22:07:44 +08:00
2024-11-16 19:45:43 +08:00
install -v -dm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html
2024-10-14 22:07:44 +08:00
2024-11-16 19:45:43 +08:00
cp -R --no-preserve=mode ${srcdir}/${pkgname}-${pkgver}-docs-html/* ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html
2024-10-14 22:07:44 +08:00
}