diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-12-29 00:28:22 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-12-29 01:42:18 +0100 |
commit | b7ba0960d5472ad42dbdd003d80371971924e0da (patch) | |
tree | af6e9fd4710218f6d9386fbb522fb6869b06222b | |
parent | 328ee5e65cd273648e296912760ebbe69381deba (diff) | |
download | aports-b7ba0960d5472ad42dbdd003d80371971924e0da.tar.bz2 aports-b7ba0960d5472ad42dbdd003d80371971924e0da.tar.xz |
main/lua5.3: modernize abuild
-rw-r--r-- | main/lua5.3/APKBUILD | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/main/lua5.3/APKBUILD b/main/lua5.3/APKBUILD index da7587a381..5afe8e832a 100644 --- a/main/lua5.3/APKBUILD +++ b/main/lua5.3/APKBUILD @@ -20,11 +20,11 @@ source="https://www.lua.org/ftp/$_pkgname-$pkgver.tar.gz builddir="$srcdir/$_pkgname-$pkgver" prepare() { - default_prepare || return 1 + default_prepare cd "$builddir" # disable readline - sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h + sed -i '/#define LUA_USE_READLINE/d' src/luaconf.h # we use libtool cat > configure.ac <<-EOF @@ -39,11 +39,11 @@ prepare() { build() { cd "$builddir" + ./configure \ --build=$CBUILD \ --host=$CHOST \ - --prefix=/usr \ - || return 1 + --prefix=/usr cd src make V=${pkgver%.*} \ @@ -51,7 +51,7 @@ build() { SYSLDFLAGS="$LDFLAGS" \ RPATH="/usr/lib" \ LIB_LIBS="-lpthread -lm -ldl -llinenoise" \ - alpine_all || return 1 + alpine_all } package() { @@ -62,20 +62,18 @@ package() { INSTALL_TOP="$pkgdir"/usr \ INSTALL_INC="$pkgdir"/usr/include/$pkgname \ INSTALL_LIB="$pkgdir"/usr/lib/$pkgname \ - alpine_install || return 1 + alpine_install for i in "$pkgdir"/usr/bin/* ; do - mv $i ${i}${_luaver} || return 1 + mv "$i" "$i"$_luaver done for i in "$pkgdir"/usr/lib/$pkgname/*.so.*; do - ln -s $pkgname/${i##*/} "$pkgdir"/usr/lib/${i##*/} || return 1 + ln -s $pkgname/${i##*/} "$pkgdir"/usr/lib/${i##*/} done - install -D -m 644 doc/lua.1 "$pkgdir"/usr/share/man/man1/lua$_luaver.1 \ - && install -D -m 644 doc/luac.1 \ - "$pkgdir"/usr/share/man/man1/luac$_luaver.1 \ - || return 1 + install -D -m 644 doc/lua.1 "$pkgdir"/usr/share/man/man1/lua$_luaver.1 + install -D -m 644 doc/luac.1 "$pkgdir"/usr/share/man/man1/luac$_luaver.1 install -d "$pkgdir"/usr/lib/pkgconfig cat > "$pkgdir"/usr/lib/pkgconfig/lua$_luaver.pc <<-EOF @@ -115,13 +113,12 @@ package() { } dev() { - default_dev || return 1 + default_dev mkdir -p "$subpkgdir"/usr/$pkgname "$subpkgdir"/usr/lib/$pkgname - ln -s ../include/$pkgname "$subpkgdir"/usr/$pkgname/include || return 1 - ln -s ../lib/$pkgname "$subpkgdir"/usr/$pkgname/lib || return 1 - mv "$pkgdir"/usr/lib/$pkgname/liblua.so "$subpkgdir"/usr/lib/$pkgname/ \ - || return 1 + ln -s ../include/$pkgname "$subpkgdir"/usr/$pkgname/include + ln -s ../lib/$pkgname "$subpkgdir"/usr/$pkgname/lib + mv "$pkgdir"/usr/lib/$pkgname/liblua.so "$subpkgdir"/usr/lib/$pkgname/ } libs() { @@ -132,14 +129,6 @@ libs() { mv "$pkgdir"/usr/lib "$subpkgdir"/usr/ } -md5sums="53a9c68bcc0eda58bdc2095ad5cdfc63 lua-5.3.4.tar.gz -67acac7d9e37da67806f6a08c8100599 lua-5.3-make.patch -eefd0de61b6993c62a880dc218c9abd6 lua-5.3-module_paths.patch -1447ddfe8a4217b1d23ece0583ab771c linenoise.patch" -sha256sums="f681aa518233bc407e23acf0f5887c884f17436f000d453b2491a9f11a52400c lua-5.3.4.tar.gz -64eafd1d2945623fe807384f9967f94d485b4b9b620ed977b3faca80548444ce lua-5.3-make.patch -d2e2d96d3b10e72dda2c78cb7f478d655c730195d46ab466c961a7846793c644 lua-5.3-module_paths.patch -a1761ba3151e5f0c921debecb39a7ac983a6311f08f7e5691de9f05c4cb02964 linenoise.patch" sha512sums="739e31f82e6a60fa99910c2005e991b3a1e21339af52847f653cb190b30842054d189ca116ffcfdf9b36e07888c9ce5642b1dd2988cc7eff9f8789f9a2e34997 lua-5.3.4.tar.gz 1bc6c623024c1738155b30ff9c0edcce0f336edc25aa20c3a1400c859421ea2015d75175cce8d515e055ac3e96028426b74812e04022af18a0ed4c4601556027 lua-5.3-make.patch 313ff823ed871f380a2cb0ba1f0afbba5cfa9b98da40e6e5e8f3c7a2e5993b13c2577efbe7147b79e3903ff27d5a814fa782c1c925092b08510cb4ce02abf464 lua-5.3-module_paths.patch |