summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-12-13 09:57:46 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-12-13 10:30:47 +0000
commit1ae19df2b98aef5cf89a25eeed2846f52572527b (patch)
tree32357381ac102aa6ad115a96d35165723a4fb134 /main
parent078e4d08b361c60e458db1b8908acf09379fddde (diff)
downloadaports-1ae19df2b98aef5cf89a25eeed2846f52572527b.tar.bz2
aports-1ae19df2b98aef5cf89a25eeed2846f52572527b.tar.xz
main/python: split out tests subpackage and add py-gdbm
Diffstat (limited to 'main')
-rw-r--r--main/python/APKBUILD35
1 files changed, 30 insertions, 5 deletions
diff --git a/main/python/APKBUILD b/main/python/APKBUILD
index 1bdc2ab0a..8aa850839 100644
--- a/main/python/APKBUILD
+++ b/main/python/APKBUILD
@@ -1,13 +1,16 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=python
pkgver=2.6.5
-pkgrel=5
+pkgrel=6
pkgdesc="A high-level scripting language"
url="http://www.python.org"
license="custom"
-subpackages="$pkgname-dev $pkgname-doc"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-tests
+ py-gdbm:gdbm
+ "
depends=
-makedepends="expat-dev openssl-dev zlib-dev ncurses-dev bzip2-dev !gettext"
+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
"
@@ -25,16 +28,38 @@ build() {
./configure --prefix=/usr \
--enable-shared \
--with-threads \
+ --with-system-ffi \
--enable-unicode=ucs4 \
- --disable-gdbm
+ || return 1
make || return 1
}
package() {
cd "$srcdir/Python-$pkgver"
- make DESTDIR="$pkgdir" install
+ 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"