aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-dbi/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-11-24 00:37:29 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-11-24 01:02:12 +0100
commitd6c8a15c1b57ceecfe8e8e22fea826baaeb30d4b (patch)
tree943303bf5479a6d8c075022a0738e5808b37badf /main/lua-dbi/APKBUILD
parent23cdeab27bff0c0e17ebce1ce3dc793360e327cd (diff)
downloadaports-d6c8a15c1b57ceecfe8e8e22fea826baaeb30d4b.tar.gz
aports-d6c8a15c1b57ceecfe8e8e22fea826baaeb30d4b.tar.bz2
aports-d6c8a15c1b57ceecfe8e8e22fea826baaeb30d4b.tar.xz
main/lua-dbi: improve abuild
Diffstat (limited to 'main/lua-dbi/APKBUILD')
-rw-r--r--main/lua-dbi/APKBUILD34
1 files changed, 15 insertions, 19 deletions
diff --git a/main/lua-dbi/APKBUILD b/main/lua-dbi/APKBUILD
index f17cf855b7..342a98f253 100644
--- a/main/lua-dbi/APKBUILD
+++ b/main/lua-dbi/APKBUILD
@@ -1,34 +1,33 @@
# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
-_luaversions="5.1 5.2 5.3"
pkgname=lua-dbi
-_realname=luadbi
+_pkgname=luadbi
pkgver=0.5
pkgrel=7
pkgdesc="A database interface library for Lua"
url="http://code.google.com/p/luadbi"
arch="all"
license="GPL"
-depends=""
makedepends="lua-dev mariadb-dev postgresql-dev sqlite-dev"
-install=""
_subpackages="$pkgname-mysql $pkgname-postgresql $pkgname-sqlite3"
source="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/luadbi/luadbi.$pkgver.tar.gz
lua-dbi-0.5-sync-hg-47382fea7a9c.patch"
+builddir="$srcdir"
+_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
makedepends="$makedepends lua$_v-dev"
- for subpkg in $_subpackages; do
- subpackages="$subpackages lua$_v-${subpkg#lua-}:_subpackage"
+ for _subpkg in $_subpackages; do
+ subpackages="$subpackages lua$_v-${_subpkg#lua-}:_subpackage"
done
done
-builddir="$srcdir"
prepare() {
- default_prepare || return 1
+ default_prepare
+
local lver; for lver in $_luaversions; do
- cp -r "$builddir" "$builddir-$lver" || return 1
+ cp -r "$builddir" "$builddir-$lver"
done
}
@@ -37,7 +36,7 @@ build() {
msg "Building for Lua $lver..."
cd "$builddir-$lver"
echo LUA_IMPL=lua$lver >> .config
- make LUA_VERSION=$lver || return 1
+ make LUA_VERSION=$lver
done
}
@@ -47,18 +46,15 @@ package() {
_subpackage() {
local lver="${subpkgname:3:3}"
- pkgdesc="$pkgdesc (for Lua $lver)"
+ local db=${subpkgname##*-}
+ pkgdesc="$pkgdesc $lver and $db"
depends="lua$lver"
install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
+
cd "$builddir-$lver"
- install -D -m755 "$builddir-$lver"/DBI.lua \
- "$subpkgdir"/usr/share/lua/$lver/DBI.lua || return 1
- for db in sqlite3 postgresql mysql; do
- if [ "${subpkgname%$db}" != "$subpkgname" ]; then
- install -D -m644 "$builddir-$lver"/dbd${db}.so \
- "$subpkgdir"/usr/lib/lua/$lver/dbd${db}.so
- fi
- done
+
+ install -D -m755 DBI.lua "$subpkgdir"/usr/share/lua/$lver/DBI.lua
+ install -D -m644 dbd$db.so "$subpkgdir"/usr/lib/lua/$lver/dbd$db.so
}
md5sums="ede2b003aadddc151aac87050c3d926e luadbi.0.5.tar.gz