aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2020-04-29 22:11:48 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2020-04-29 22:33:02 +0300
commit7f0dbd9c05bebb35e1d114f028a1b17b9fc91864 (patch)
tree61537346b7ebd42caa2421960fdf1e74dcc61700
parent8e985e693fe3ec18523682c473355defaa3b83e4 (diff)
downloadaports-7f0dbd9c05bebb35e1d114f028a1b17b9fc91864.tar.gz
aports-7f0dbd9c05bebb35e1d114f028a1b17b9fc91864.tar.bz2
aports-7f0dbd9c05bebb35e1d114f028a1b17b9fc91864.tar.xz
main/aconf: fix Lua module path and modernize
-rw-r--r--main/aconf/APKBUILD35
1 files changed, 13 insertions, 22 deletions
diff --git a/main/aconf/APKBUILD b/main/aconf/APKBUILD
index 85a4763265..164e23aba8 100644
--- a/main/aconf/APKBUILD
+++ b/main/aconf/APKBUILD
@@ -2,16 +2,19 @@
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=aconf
pkgver=0.8.0
-pkgrel=0
+pkgrel=1
pkgdesc="Alpine Configurator"
url="https://git.alpinelinux.org/cgit/user/kunkku/aconf/"
arch="noarch"
license="BSD"
-depends="lua5.3-augeas lua5.3-b64 lua5.3-cjson lua5.3-file-magic lua5.3-openrc
- lua5.3-ossl lua5.3-posix lua5.3-stringy uwsgi uwsgi-lua"
+_luaver="5.3"
+_lua="lua$_luaver"
+depends="$_lua-augeas $_lua-b64 $_lua-cjson $_lua-file-magic $_lua-openrc
+ $_lua-ossl $_lua-posix $_lua-stringy uwsgi uwsgi-lua"
makedepends="ldoc"
source="https://dev.alpinelinux.org/archive/aconf/aconf-$pkgver.tar.xz
$pkgname.initd"
+builddir="$srcdir/$pkgname-$pkgver"
_modules="dnsmasq dns-zone network openssh strongswan"
@@ -30,41 +33,29 @@ _deps_dns_zone=
_deps_network=
-_builddir=$srcdir/$pkgname-$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
-}
build() {
- return 0
+ :
}
package() {
- cd "$_builddir"
- make ROOT_DIR=$pkgdir install || return 1
- install -m755 -D "$srcdir"/$pkgname.initd \
- "$pkgdir"/etc/init.d/$pkgname || return 1
+ make LUA_VERSION=$_luaver ROOT_DIR=$pkgdir install
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
}
-_moddir=usr/share/lua/5.2/$pkgname/modules
+_moddir=usr/share/lua/$_luaver/$pkgname/modules
_augdir=usr/share/$pkgname/augeas
_module() {
local m=$(_escape $1)
eval "depends=\"$pkgname \$_deps_$m\""
- mkdir -p "$subpkgdir/$_moddir" || return 1
- mv "$pkgdir/$_moddir/$1.lua" "$subpkgdir/$_moddir" || return 1
+ mkdir -p "$subpkgdir/$_moddir"
+ mv "$pkgdir/$_moddir/$1.lua" "$subpkgdir/$_moddir"
local lens=$pkgdir/$_augdir/aconf_$m.aug
[ -f "$lens" ] || return 0
- mkdir -p "$subpkgdir/$_augdir" || return 1
+ mkdir -p "$subpkgdir/$_augdir"
mv "$lens" "$subpkgdir/$_augdir"
}