mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-26 11:52:25 +01:00
67 lines
1.4 KiB
Plaintext
67 lines
1.4 KiB
Plaintext
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=python
|
|
pkgver=2.6.5
|
|
pkgrel=6
|
|
pkgdesc="A high-level scripting language"
|
|
url="http://www.python.org"
|
|
arch="x86 x86_64"
|
|
license="custom"
|
|
subpackages="$pkgname-dev $pkgname-doc $pkgname-tests
|
|
py-gdbm:gdbm
|
|
"
|
|
depends=
|
|
makedepends="expat-dev openssl-dev zlib-dev ncurses-dev bzip2-dev !gettext
|
|
gdbm-dev sqlite-dev libffi-dev"
|
|
source="http://www.$pkgname.org/ftp/$pkgname/$pkgver/Python-$pkgver.tar.bz2
|
|
$pkgname-2.6-internal-expat.patch
|
|
"
|
|
|
|
prepare() {
|
|
cd "$srcdir/Python-$pkgver"
|
|
for i in ../*.patch; do
|
|
msg "Apply $i"
|
|
patch -p1 < $i || return 1
|
|
done
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir/Python-$pkgver"
|
|
./configure --prefix=/usr \
|
|
--enable-shared \
|
|
--with-threads \
|
|
--with-system-ffi \
|
|
--enable-unicode=ucs4 \
|
|
|| return 1
|
|
|
|
make || return 1
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir/Python-$pkgver"
|
|
make -j1 DESTDIR="$pkgdir" install
|
|
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
}
|
|
|
|
_mv_files() {
|
|
local i
|
|
for i in "$@"; do
|
|
mkdir -p "$subpkgdir"/${i%/*}
|
|
mv "$pkgdir"/$i "$subpkgdir"/$i || return 1
|
|
done
|
|
}
|
|
|
|
tests() {
|
|
pkgdesc="The test modules from the main python package"
|
|
cd "$pkgdir"
|
|
_mv_files $(find usr/lib -type d -name 'test*')
|
|
}
|
|
|
|
gdbm() {
|
|
pkgdesc="GNU dbm database support for Python"
|
|
cd "$pkgdir"
|
|
_mv_files $(find usr/lib -name '*gdbm*')
|
|
}
|
|
|
|
md5sums="6bef0417e71a1a1737ccf5750420fdb3 Python-2.6.5.tar.bz2
|
|
9d64df5e0a6aed149a792c7bff16e3d9 python-2.6-internal-expat.patch"
|