From 15dc9d67da3baaba547994fca07248ad202e80cc Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Fri, 11 Jul 2014 15:53:26 +0300 Subject: main/aconf: moved from testing (with dependencies) --- main/aconf/APKBUILD | 74 ++++++++++++++++++++++ main/aconf/aconf.initd | 19 ++++++ ...01-b64-fix-segfault-caused-by-signed-char.patch | 25 ++++++++ main/lua5.2-b64/APKBUILD | 43 +++++++++++++ main/lua5.2-file-magic/APKBUILD | 40 ++++++++++++ testing/aconf/APKBUILD | 74 ---------------------- testing/aconf/aconf.initd | 19 ------ ...01-b64-fix-segfault-caused-by-signed-char.patch | 25 -------- testing/lua5.2-b64/APKBUILD | 43 ------------- testing/lua5.2-file-magic/APKBUILD | 40 ------------ 10 files changed, 201 insertions(+), 201 deletions(-) create mode 100644 main/aconf/APKBUILD create mode 100644 main/aconf/aconf.initd create mode 100644 main/lua5.2-b64/0001-b64-fix-segfault-caused-by-signed-char.patch create mode 100644 main/lua5.2-b64/APKBUILD create mode 100644 main/lua5.2-file-magic/APKBUILD delete mode 100644 testing/aconf/APKBUILD delete mode 100644 testing/aconf/aconf.initd delete mode 100644 testing/lua5.2-b64/0001-b64-fix-segfault-caused-by-signed-char.patch delete mode 100644 testing/lua5.2-b64/APKBUILD delete mode 100644 testing/lua5.2-file-magic/APKBUILD 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 +# 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 $? +} diff --git a/main/lua5.2-b64/0001-b64-fix-segfault-caused-by-signed-char.patch b/main/lua5.2-b64/0001-b64-fix-segfault-caused-by-signed-char.patch new file mode 100644 index 0000000000..418a8321d1 --- /dev/null +++ b/main/lua5.2-b64/0001-b64-fix-segfault-caused-by-signed-char.patch @@ -0,0 +1,25 @@ +From 8b49d06375685d4dc0ddd71a9b7310663dc92d51 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Mon, 24 Feb 2014 11:25:28 +0100 +Subject: [PATCH] b64: fix segfault caused by signed char + +--- + lua-b64.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lua-b64.c b/lua-b64.c +index ce74481..cb03f4f 100644 +--- a/lua-b64.c ++++ b/lua-b64.c +@@ -28,7 +28,7 @@ static const char *urlsafe_base64_tbl = + static int b64_encode_tbl(lua_State *L, const char *tbl) + { + size_t len, n = 0; +- const char *src = luaL_checklstring(L, 1, &len); ++ const unsigned char *src = (const unsigned char *)luaL_checklstring(L, 1, &len); + luaL_Buffer dst; + unsigned int triplet = 0; + unsigned int pad; +-- +1.8.5.4 + diff --git a/main/lua5.2-b64/APKBUILD b/main/lua5.2-b64/APKBUILD new file mode 100644 index 0000000000..fa2e6c4f54 --- /dev/null +++ b/main/lua5.2-b64/APKBUILD @@ -0,0 +1,43 @@ +# Maintainer: Natanael Copa +pkgname=lua5.2-b64 +pkgver=0.1 +pkgrel=1 +pkgdesc="Lua 5.2 base64 implementation with support for urlsafe" +url="https://github.com/ncopa/lua-b64" +arch="all" +license="MIT" +depends="" +depends_dev="" +makedepends="$depends_dev lua5.2-dev" +install="" +subpackages="" +source="lua-b64-$pkgver.tar.gz::https://github.com/ncopa/lua-b64/archive/v0.1.tar.gz + 0001-b64-fix-segfault-caused-by-signed-char.patch" + +_builddir="$srcdir"/lua-b64-$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() { + cd "$_builddir" + make +} + +package() { + cd "$_builddir" + install -D b64.so "$pkgdir"/usr/lib/lua/5.2/b64.so || return 1 +} + +md5sums="91e537a0aedc7bd2fb4ca38cda1d9f9f lua-b64-0.1.tar.gz +f396211df1ed6f94c2d23fc1c102ffdb 0001-b64-fix-segfault-caused-by-signed-char.patch" +sha256sums="5136414bc5db7e6bfc96ff7eb9ac56e797419d04c5b4d3483891c8714239d700 lua-b64-0.1.tar.gz +2e4b39f088c275fa572379283489232cecf383e2c6c6fd43e802b6be72cbc70e 0001-b64-fix-segfault-caused-by-signed-char.patch" +sha512sums="8740d5061db01dca166ce2c959548a3232c85dce156fce3502da35f457db79db2bf23242ee6d26b64f4141c451db733898328b8fc3d1f62b47e8f7ec790577d1 lua-b64-0.1.tar.gz +6da3b8048b2e6772a4aac954ea2db35f9c21897d720e7ff9dc6c1d63ffc37eeb4fb91be46bc13b32a2c3d1b88997172fe259ea699ac8591f0f3e1fd53cae378b 0001-b64-fix-segfault-caused-by-signed-char.patch" diff --git a/main/lua5.2-file-magic/APKBUILD b/main/lua5.2-file-magic/APKBUILD new file mode 100644 index 0000000000..95fac0d039 --- /dev/null +++ b/main/lua5.2-file-magic/APKBUILD @@ -0,0 +1,40 @@ +# Maintainer: Natanael Copa +pkgname=lua5.2-file-magic +pkgver=0.2 +pkgrel=0 +pkgdesc="Lua binding to libmagic" +url="https://github.com/ncopa/lua-file-magic" +arch="all" +license="LGPL" +depends="" +depends_dev="lua5.2-dev file-dev" +makedepends="$depends_dev" +install="" +subpackages="" +source="lua-file-magic-$pkgver.tar.gz::https://github.com/ncopa/lua-file-magic/archive/v$pkgver.tar.gz" + +_builddir="$srcdir"/lua-file-magic-$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() { + cd "$_builddir" + make || return 1 +} + +package() { + cd "$_builddir" + luaarchdir=$(pkg-config --variable=INSTALL_CMOD lua5.2) + install -D magic.so "$pkgdir"/$luaarchdir/magic.so +} + +md5sums="5a9cb6889c7ae3f60bae3e5790c12989 lua-file-magic-0.2.tar.gz" +sha256sums="c2a4ee6117e0f5a4acdc4e092f5ae948d2b0bf6a2a6a68d97d6a9bf5f3f1bcb7 lua-file-magic-0.2.tar.gz" +sha512sums="f107b27410a3acf1305536bed064fa730943369afbeaeadc4b723334d4c16c330fc8544e426fda223f5b10353d83d028f306a48ec5d6f6cb905fda45271b94c8 lua-file-magic-0.2.tar.gz" diff --git a/testing/aconf/APKBUILD b/testing/aconf/APKBUILD deleted file mode 100644 index dcf5ba9a54..0000000000 --- a/testing/aconf/APKBUILD +++ /dev/null @@ -1,74 +0,0 @@ -# Contributor: Kaarle Ritvanen -# 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/testing/aconf/aconf.initd b/testing/aconf/aconf.initd deleted file mode 100644 index 38334fbf5f..0000000000 --- a/testing/aconf/aconf.initd +++ /dev/null @@ -1,19 +0,0 @@ -#!/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 $? -} diff --git a/testing/lua5.2-b64/0001-b64-fix-segfault-caused-by-signed-char.patch b/testing/lua5.2-b64/0001-b64-fix-segfault-caused-by-signed-char.patch deleted file mode 100644 index 418a8321d1..0000000000 --- a/testing/lua5.2-b64/0001-b64-fix-segfault-caused-by-signed-char.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8b49d06375685d4dc0ddd71a9b7310663dc92d51 Mon Sep 17 00:00:00 2001 -From: Natanael Copa -Date: Mon, 24 Feb 2014 11:25:28 +0100 -Subject: [PATCH] b64: fix segfault caused by signed char - ---- - lua-b64.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lua-b64.c b/lua-b64.c -index ce74481..cb03f4f 100644 ---- a/lua-b64.c -+++ b/lua-b64.c -@@ -28,7 +28,7 @@ static const char *urlsafe_base64_tbl = - static int b64_encode_tbl(lua_State *L, const char *tbl) - { - size_t len, n = 0; -- const char *src = luaL_checklstring(L, 1, &len); -+ const unsigned char *src = (const unsigned char *)luaL_checklstring(L, 1, &len); - luaL_Buffer dst; - unsigned int triplet = 0; - unsigned int pad; --- -1.8.5.4 - diff --git a/testing/lua5.2-b64/APKBUILD b/testing/lua5.2-b64/APKBUILD deleted file mode 100644 index fa2e6c4f54..0000000000 --- a/testing/lua5.2-b64/APKBUILD +++ /dev/null @@ -1,43 +0,0 @@ -# Maintainer: Natanael Copa -pkgname=lua5.2-b64 -pkgver=0.1 -pkgrel=1 -pkgdesc="Lua 5.2 base64 implementation with support for urlsafe" -url="https://github.com/ncopa/lua-b64" -arch="all" -license="MIT" -depends="" -depends_dev="" -makedepends="$depends_dev lua5.2-dev" -install="" -subpackages="" -source="lua-b64-$pkgver.tar.gz::https://github.com/ncopa/lua-b64/archive/v0.1.tar.gz - 0001-b64-fix-segfault-caused-by-signed-char.patch" - -_builddir="$srcdir"/lua-b64-$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() { - cd "$_builddir" - make -} - -package() { - cd "$_builddir" - install -D b64.so "$pkgdir"/usr/lib/lua/5.2/b64.so || return 1 -} - -md5sums="91e537a0aedc7bd2fb4ca38cda1d9f9f lua-b64-0.1.tar.gz -f396211df1ed6f94c2d23fc1c102ffdb 0001-b64-fix-segfault-caused-by-signed-char.patch" -sha256sums="5136414bc5db7e6bfc96ff7eb9ac56e797419d04c5b4d3483891c8714239d700 lua-b64-0.1.tar.gz -2e4b39f088c275fa572379283489232cecf383e2c6c6fd43e802b6be72cbc70e 0001-b64-fix-segfault-caused-by-signed-char.patch" -sha512sums="8740d5061db01dca166ce2c959548a3232c85dce156fce3502da35f457db79db2bf23242ee6d26b64f4141c451db733898328b8fc3d1f62b47e8f7ec790577d1 lua-b64-0.1.tar.gz -6da3b8048b2e6772a4aac954ea2db35f9c21897d720e7ff9dc6c1d63ffc37eeb4fb91be46bc13b32a2c3d1b88997172fe259ea699ac8591f0f3e1fd53cae378b 0001-b64-fix-segfault-caused-by-signed-char.patch" diff --git a/testing/lua5.2-file-magic/APKBUILD b/testing/lua5.2-file-magic/APKBUILD deleted file mode 100644 index 95fac0d039..0000000000 --- a/testing/lua5.2-file-magic/APKBUILD +++ /dev/null @@ -1,40 +0,0 @@ -# Maintainer: Natanael Copa -pkgname=lua5.2-file-magic -pkgver=0.2 -pkgrel=0 -pkgdesc="Lua binding to libmagic" -url="https://github.com/ncopa/lua-file-magic" -arch="all" -license="LGPL" -depends="" -depends_dev="lua5.2-dev file-dev" -makedepends="$depends_dev" -install="" -subpackages="" -source="lua-file-magic-$pkgver.tar.gz::https://github.com/ncopa/lua-file-magic/archive/v$pkgver.tar.gz" - -_builddir="$srcdir"/lua-file-magic-$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() { - cd "$_builddir" - make || return 1 -} - -package() { - cd "$_builddir" - luaarchdir=$(pkg-config --variable=INSTALL_CMOD lua5.2) - install -D magic.so "$pkgdir"/$luaarchdir/magic.so -} - -md5sums="5a9cb6889c7ae3f60bae3e5790c12989 lua-file-magic-0.2.tar.gz" -sha256sums="c2a4ee6117e0f5a4acdc4e092f5ae948d2b0bf6a2a6a68d97d6a9bf5f3f1bcb7 lua-file-magic-0.2.tar.gz" -sha512sums="f107b27410a3acf1305536bed064fa730943369afbeaeadc4b723334d4c16c330fc8544e426fda223f5b10353d83d028f306a48ec5d6f6cb905fda45271b94c8 lua-file-magic-0.2.tar.gz" -- cgit v1.2.3