Core/python/PKGBUILD
2024-09-07 23:18:11 +08:00

53 lines
1.5 KiB
Bash

# 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
pkgver=3.12.5
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')
source=(https://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.xz
https://www.python.org/ftp/python/doc/${pkgver}/python-${pkgver}-docs-html.tar.bz2
${pkgname}-3.12.2-site-packages-lib64.patch)
sha256sums=(fa8a2e12c5e620b09f53e65bcd87550d2e5a1e2e04bf8ba991dcc55113876397
f698f4e5972fa985f3c1c5c9fdcee835632e5745630ec2437ac7b5ff573e36c7
83f0e0d43173057e1b29d503ab0479d24ada51aadf8b62e2d484b95d211478f5)
prepare() {
cd Python-${pkgver}
patch -Np1 -i ${srcdir}/${pkgname}-3.12.2-site-packages-lib64.patch
}
build() {
cd Python-${pkgver}
CFLAGS="${CFLAGS/-O2/-O3} -ffat-lto-objects"
${CONFIGURE} \
--enable-shared \
--with-system-expat \
--with-platlibdir=lib64 \
--enable-optimizations
make
}
package() {
cd Python-${pkgver}
make DESTDIR=${pkgdir} install
install -v -dm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html
cp -R --no-preserve=mode ${srcdir}/${pkgname}-${pkgver}-docs-html/* ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html
}