summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/apk-tools/APKBUILD29
1 files changed, 20 insertions, 9 deletions
diff --git a/main/apk-tools/APKBUILD b/main/apk-tools/APKBUILD
index 33dbef2c1..170b1533e 100644
--- a/main/apk-tools/APKBUILD
+++ b/main/apk-tools/APKBUILD
@@ -1,11 +1,11 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=apk-tools
pkgver=2.1.0
-pkgrel=1
+pkgrel=2
pkgdesc="Alpine Package Keeper - package manager for alpine"
-subpackages="$pkgname-static"
+subpackages="$pkgname-static lua-apk:luaapk"
depends=
-makedepends="zlib-dev openssl-dev pkgconfig"
+makedepends="zlib-dev openssl-dev lua-dev"
source="http://git.alpinelinux.org/cgit/$pkgname.git/snapshot/$pkgname-$pkgver.tar.bz2
0001-db-remount-read-only-after-the-file-handles-have-bee.patch
0002-db-more-fix-for-read-only-cache-remounting.patch
@@ -15,25 +15,30 @@ url="http://git.alpinelinux.org/cgit/apk-tools/"
arch="all"
license=GPL-2
+_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$_builddir"
sed -i -e 's:-Werror::' Make.rules
for i in $source; do
case $i in
*.patch) patch -p1 -i "$srcdir"/$i || return 1
esac
done
+
+ echo "FULL_VERSION=$pkgver-r$pkgrel" > config.mk || return 1
}
build() {
- cd "$srcdir/$pkgname-$pkgver"
- make FULL_VERSION="$pkgver-r$pkgrel" || return 1
- make FULL_VERSION="$pkgver-r$pkgrel" static || return 1
+ cd "$_builddir"
+ make || return 1
+ make static || return 1
+ ${CC:-gcc} $CFLAGS -fPIC -DAPK_VERSION=\"$pkgver-r$pkgrel\" $LDFLAGS -shared \
+ -llua src/version.o src/lua-apk.c -o apk.so
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
- make FULL_VERSION="$pkgver-r$pkgrel" DESTDIR="$pkgdir" install
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
cd "$pkgdir/sbin"
ln -s apk apk_add
ln -s apk apk_audit
@@ -50,6 +55,12 @@ static() {
"$subpkgdir"/sbin/apk.static
}
+luaapk() {
+ pkgdesc="Lua module for apk-tools"
+ mkdir -p "$subpkgdir"/usr/lib/lua/5.1
+ install "$_builddir"/apk.so "$subpkgdir"/usr/lib/lua/5.1/
+}
+
md5sums="9f6d71c9be814afece7a4b73430bd078 apk-tools-2.1.0.tar.bz2
6eb78a324be996c831d4850c81ad5821 0001-db-remount-read-only-after-the-file-handles-have-bee.patch
9ca0a44c17b43e95a7f1bd8107db74da 0002-db-more-fix-for-read-only-cache-remounting.patch"