aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-01-04 21:31:31 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-01-04 21:44:27 +0100
commit4f8001c741882501003be78e32d0c95666278a0b (patch)
tree5e5d3024eafb6d5da25f67dd8f29c7eab319ca7d
parentcd5dd02c13cbdb98e682c16184c4692086c12ffc (diff)
downloadaports-4f8001c741882501003be78e32d0c95666278a0b.tar.gz
aports-4f8001c741882501003be78e32d0c95666278a0b.tar.bz2
aports-4f8001c741882501003be78e32d0c95666278a0b.tar.xz
main/lua5.2-file-magic: fix and modernize abuild
-rw-r--r--main/lua5.2-file-magic/APKBUILD35
1 files changed, 11 insertions, 24 deletions
diff --git a/main/lua5.2-file-magic/APKBUILD b/main/lua5.2-file-magic/APKBUILD
index 95fac0d039..92a9877af5 100644
--- a/main/lua5.2-file-magic/APKBUILD
+++ b/main/lua5.2-file-magic/APKBUILD
@@ -1,40 +1,27 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=lua5.2-file-magic
+_pkgname=lua-file-magic
pkgver=0.2
pkgrel=0
pkgdesc="Lua binding to libmagic"
url="https://github.com/ncopa/lua-file-magic"
arch="all"
license="LGPL"
-depends=""
-depends_dev="lua5.2-dev file-dev"
-makedepends="$depends_dev"
-install=""
-subpackages=""
-source="lua-file-magic-$pkgver.tar.gz::https://github.com/ncopa/lua-file-magic/archive/v$pkgver.tar.gz"
-
-_builddir="$srcdir"/lua-file-magic-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+depends="lua5.2"
+makedepends="lua5.2-dev file-dev"
+source="$_pkgname-$pkgver.tar.gz::https://github.com/ncopa/$_pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
build() {
- cd "$_builddir"
- make || return 1
+ cd "$builddir"
+ make
}
package() {
- cd "$_builddir"
- luaarchdir=$(pkg-config --variable=INSTALL_CMOD lua5.2)
- install -D magic.so "$pkgdir"/$luaarchdir/magic.so
+ cd "$builddir"
+
+ local cmod_dir=$(pkg-config --variable=INSTALL_CMOD lua5.2)
+ install -D magic.so "$pkgdir"/$cmod_dir/magic.so
}
-md5sums="5a9cb6889c7ae3f60bae3e5790c12989 lua-file-magic-0.2.tar.gz"
-sha256sums="c2a4ee6117e0f5a4acdc4e092f5ae948d2b0bf6a2a6a68d97d6a9bf5f3f1bcb7 lua-file-magic-0.2.tar.gz"
sha512sums="f107b27410a3acf1305536bed064fa730943369afbeaeadc4b723334d4c16c330fc8544e426fda223f5b10353d83d028f306a48ec5d6f6cb905fda45271b94c8 lua-file-magic-0.2.tar.gz"