aboutsummaryrefslogtreecommitdiffstats
path: root/main/aconf
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-07-11 15:53:26 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-07-11 15:53:26 +0300
commit15dc9d67da3baaba547994fca07248ad202e80cc (patch)
treef5ba43b5b2f949892c46cb962ae2e6c210d3b4f0 /main/aconf
parent22b4d9f5e400b61dad560d5a1e7a27acbac9b0e2 (diff)
downloadaports-15dc9d67da3baaba547994fca07248ad202e80cc.tar.bz2
aports-15dc9d67da3baaba547994fca07248ad202e80cc.tar.xz
main/aconf: moved from testing (with dependencies)
Diffstat (limited to 'main/aconf')
-rw-r--r--main/aconf/APKBUILD74
-rw-r--r--main/aconf/aconf.initd19
2 files changed, 93 insertions, 0 deletions
diff --git a/main/aconf/APKBUILD b/main/aconf/APKBUILD
new file mode 100644
index 0000000000..dcf5ba9a54
--- /dev/null
+++ b/main/aconf/APKBUILD
@@ -0,0 +1,74 @@
+# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+# Maintainer:
+pkgname=aconf
+pkgver=0.4.0
+pkgrel=1
+pkgdesc="Alpine Configurator"
+url="http://git.alpinelinux.org/cgit/kunkku/aconf/"
+arch="noarch"
+license="BSD"
+depends="lua5.2-augeas lua5.2-b64 lua5.2-cjson lua5.2-crypto \
+ lua5.2-file-magic lua5.2-openrc lua5.2-posix lua5.2-stringy uwsgi \
+ uwsgi-lua"
+makedepends=""
+source="${url}snapshot/${pkgname}-${pkgver}.tar.bz2 $pkgname.initd"
+
+
+_modules="dnsmasq network openssh"
+
+subpackages=""
+for _m in $_modules; do
+ subpackages="$subpackages $pkgname-mod-$_m:_$_m"
+ eval "_deps_$_m=$_m"
+done
+
+_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
+}
+
+
+_moddir=usr/share/lua/5.2/$pkgname/modules
+_augdir=usr/share/$pkgname/augeas
+
+_module() {
+ eval "depends=\"$pkgname \$_deps_$1\""
+ mkdir -p "$subpkgdir/$_moddir" || return 1
+ mv "$pkgdir/$_moddir/$1.lua" "$subpkgdir/$_moddir" || return 1
+
+ _lens=$pkgdir/$_augdir/aconf_$1.aug
+ [ -f "$_lens" ] || return 0
+ mkdir -p "$subpkgdir/$_augdir" || return 1
+ mv "$_lens" "$subpkgdir/$_augdir"
+}
+
+for _m in $_modules; do
+ eval "_$_m() { _module $_m; }"
+done
+
+md5sums="eefb3a90b70cfb7e46674d80fa249ca2 aconf-0.4.0.tar.bz2
+77004904f5d4637f807e2d084a0e2085 aconf.initd"
+sha256sums="9a72acdde194726a4086f38e7002574d27e0d87b9a1afc541520bf4742125c2f aconf-0.4.0.tar.bz2
+76b01d0184dbd01ec712c362d7ef561d58b7cd59568833d5e6fa874ea4ac4f8e aconf.initd"
+sha512sums="27d7179590c391790a1392b4a87afa6b870001726cc9b43aa039881692917dc5260625957442cd3b052cf8c34fe00a5399a3ba02165f7f844d05ec5ac8541822 aconf-0.4.0.tar.bz2
+aea5ac6daa63326b69920ad3ed7e36ed832caef34400b5a47b41fe20aed67a5975876739b483c0296fadcec8fbffbb60c80fb261950ce264fe29356fb17caebe aconf.initd"
diff --git a/main/aconf/aconf.initd b/main/aconf/aconf.initd
new file mode 100644
index 0000000000..38334fbf5f
--- /dev/null
+++ b/main/aconf/aconf.initd
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+
+# init.d file for aconf
+# Copyright (c) 2013-2014 Kaarle Ritvanen
+
+name=aconf
+command=/usr/sbin/aconfd
+pidfile=/var/run/$name.pid
+
+depend() {
+ need net
+ after firewall
+}
+
+stop() {
+ ebegin "Stopping $name"
+ start-stop-daemon --stop --pidfile $pidfile --signal INT
+ eend $?
+}