diff options
author | tmpfile <tmpfile@users.noreply.github.com> | 2017-07-11 01:49:05 -0300 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-07-14 18:28:52 +0000 |
commit | d8ab9d4b6aaf182da38099c2303b44225142a1f7 (patch) | |
tree | ab140fa9f17d29c0e87897f14732d4e3720e493d /main/lua-struct/APKBUILD | |
parent | c9eb19ea18f8b361c8825721b314ec5a6e6dee0c (diff) | |
download | aports-d8ab9d4b6aaf182da38099c2303b44225142a1f7.tar.bz2 aports-d8ab9d4b6aaf182da38099c2303b44225142a1f7.tar.xz |
main/lua-struct: modernize APKBUILD
Diffstat (limited to 'main/lua-struct/APKBUILD')
-rw-r--r-- | main/lua-struct/APKBUILD | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/main/lua-struct/APKBUILD b/main/lua-struct/APKBUILD index e0b5c44681..bb2599236a 100644 --- a/main/lua-struct/APKBUILD +++ b/main/lua-struct/APKBUILD @@ -1,7 +1,5 @@ -# Maintailer: Natanael Copa <ncopa@alpinelinux.org> - +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> _luaversions="5.1 5.2 5.3" - pkgname=lua-struct pkgver=0.2 pkgrel=2 @@ -9,11 +7,8 @@ pkgdesc="Library for Converting Data to and from C Structs for Lua" url="http://www.inf.puc-rio.br/~roberto/struct/" arch="all" license="MIT" -depends="" depends_dev="" makedepends="$depends_dev" -install="" -subpackages="" source="http://www.inf.puc-rio.br/~roberto/struct/struct-$pkgver.tar.gz makefile.patch " @@ -23,15 +18,9 @@ for _i in $_luaversions; do subpackages="$subpackages lua$_i-struct:_split${_i/./}" done -_builddir="$srcdir" +builddir="$srcdir" 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 + default_prepare for i in $_luaversions; do mkdir $i cp makefile *.c $i/ @@ -40,14 +29,13 @@ prepare() { build() { for i in $_luaversions; do - cd "$_builddir"/$i - make OPT_CFLAGS="$CFLAGS -std=c99" LUAPC="lua$i" || return 1 + cd "$builddir"/$i + make OPT_CFLAGS="$CFLAGS -std=c99" LUAPC="lua$i" done - } package() { - cd "$_builddir" + cd "$builddir" mkdir -p "$pkgdir" } @@ -55,20 +43,14 @@ _split() { local _v=$1 pkgdesc="$pkgdesc - Lua $_v" install_if="lua$_v $pkgname=$pkgver-r$pkgrel" - depends= + depends="" mkdir -p "$subpkgdir"/usr/lib/lua/$_v - install "$srcdir"/$_v/struct.so "$subpkgdir"/usr/lib/lua/$_v/struct.so \ - || return 1 + install "$builddir"/$_v/struct.so "$subpkgdir"/usr/lib/lua/$_v/struct.so } for _i in $_luaversions; do eval "_split${_i/./}() { _split $_i; }" done - -md5sums="99384bf1f54457ec9f796ad0b539d19c struct-0.2.tar.gz -45b8350d44a99d65ac7c1d2c33abd975 makefile.patch" -sha256sums="c71d1f9f9f74ac74a973f75961285651200daf53dcb4316f23ba7bea6817a7a5 struct-0.2.tar.gz -415cf549e0587252ab387f2ca624d2b17f511499908873b08774057e21da1b60 makefile.patch" sha512sums="6fea0bb2c04cdc47d402e0c8604bc78d9a68ec60f6d521ce031e4f9ede42fd2e2081f6732d74f2745883ad13bdef9f08fa4db5c0053fdc3204e2938dc01ea328 struct-0.2.tar.gz 444ca21864ec92dde759f0f8f5d9990d029e9dbb1df908b092360b2eb9633c64079aff55ae91a4ea4de4c27a89243db195c2f460a03193e8c493c507387a1501 makefile.patch" |