# 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 pkgname=python pkgver=3.12.7 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 https://www.python.org/ftp/python/doc/${pkgver}/python-${pkgver}-docs-html.tar.bz2 ${pkgname}-3.12.2-site-packages-lib64.patch) sha256sums=(24887b92e2afd4a2ac602419ad4b596372f67ac9b077190f459aba390faf5550 9f2792b63230a4ea5f68b800bca87707ce6c7e69da66e1610bc2385a7da9281a 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-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 } 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 }