void-packages/srcpkgs/python3/template

70 lines
1.8 KiB
Plaintext
Raw Normal View History

# Template build file for 'python3'.
pkgname=python3
2013-09-17 09:11:04 +02:00
version=3.3.2
revision=1
wrksrc="Python-${version}"
short_desc="Interpreted, interactive, object-oriented programming language (3.x series)"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.python.org"
license="PSF"
distfiles="http://www.python.org/ftp/python/$version/Python-$version.tar.xz"
2013-09-17 09:11:04 +02:00
checksum=745b32c4b810e36fa66346198dbc2e313524fd68888922b85005656825e64b43
makedepends="libffi-devel readline-devel gdbm-devel openssl-devel
expat-devel db-devel sqlite-devel bzip2-devel zlib-devel liblzma-devel"
pre_configure() {
sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python3|" Lib/cgi.py
rm -r Modules/expat
rm -r Modules/zlib
rm -r Modules/_ctypes/{darwin,libffi}*
}
if [ "$CROSS_BUILD" ]; then
msg_error "$pkgname cannot be cross build.\n"
fi
# Native build
do_configure() {
# Force posix semaphores by default; sem_open requires /dev/shm and
# it's not mounted in chroot.
unset LD CC AR AS RANLIB
./configure ${configure_args} --with-threads --enable-ipv6 \
--with-signal-module --enable-shared --with-system-ffi \
--enable-unicode=ucs4 --with-system-expat --with-computed-gotos \
--with-system-expat --with-dbmliborder=gdbm:ndbm \
--disable-static ac_cv_posix_semaphores_enabled=yes
}
do_build() {
make ${makejobs}
}
do_install() {
make DESTDIR=${DESTDIR} install
chmod 755 ${DESTDIR}/usr/lib/libpython*.so*
install -Dm644 LICENSE ${DESTDIR}/usr/share/licenses/${pkgname}/LICENSE
# Remove test files.
rm -rf ${DESTDIR}/usr/lib/python3.3/test
# Remove python3.3m hardlink
rm -f ${DESTDIR}/usr/bin/python3.3m
}
python3-devel_package() {
depends="python3>=${version}"
2013-09-17 09:11:04 +02:00
short_desc+=" - development files"
pkg_install() {
vmove "usr/bin/python*-config"
vmove usr/lib/pkgconfig
vmove "usr/include/python3*/*"
}
}
python3_package() {
pkg_install() {
vmove usr
}
}