54 lines
1.4 KiB
Bash
54 lines
1.4 KiB
Bash
#!/usr/bin/env bash
|
|
name='python3.10'
|
|
release='1'
|
|
version='3.10.8'
|
|
url='https://www.python.org/downloads/'
|
|
description='Next generation of the python high-level scripting language'
|
|
email='parduscix@yandex.ru'
|
|
maintainer='sulincix'
|
|
license=('custom')
|
|
source=("https://www.python.org/ftp/python/$version/Python-$version.tar.xz"
|
|
'turkman.patch')
|
|
depends=('bzip2' 'gdbm' 'libnsl' 'libxcrypt' 'openssl' 'zlib' 'sqlite')
|
|
makedepends=( )
|
|
md5sums=('e92356b012ed4d0e09675131d39b1bde'
|
|
'SKIP')
|
|
uses=(expat ffi)
|
|
ffi_depends=('libffi')
|
|
expat_depends=('expat')
|
|
arch=('x86_64')
|
|
group=(dev.lang python)
|
|
|
|
export CFLAGS="-O2 -s"
|
|
export CXXFLAGS="-O2 -s"
|
|
|
|
|
|
cd Python-$version
|
|
|
|
setup(){
|
|
patch -Np1 -i "../turkman.patch"
|
|
./configure --prefix=/usr \
|
|
--libdir=/usr/lib64 \
|
|
--enable-shared \
|
|
$(use_opt expat --with-system-expat "") \
|
|
$(use_opt ffi --with-system-ffi "") \
|
|
--enable-optimizations
|
|
}
|
|
|
|
build(){
|
|
make -j`nproc`
|
|
}
|
|
|
|
package(){
|
|
make install -j`nproc`
|
|
# this symlinks provided by main python metapackage
|
|
for bin in pydoc3 idle3 python3 python3-config pip3 2to3; do
|
|
rm -f ${DESTDIR}/usr/bin/$bin
|
|
done
|
|
rm -f ${DESTDIR}/usr/lib64/pkgconfig/python3.pc
|
|
rm -f ${DESTDIR}/usr/lib64/pkgconfig/python3-embed.pc
|
|
# move libpython3.so file
|
|
mv ${DESTDIR}/usr/lib64/libpython3.so ${DESTDIR}/usr/lib64/libpython3.so.3.10
|
|
}
|
|
|