From 20313a4d0e4cbe767df8408e32046c642ea59465 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Tue, 1 May 2012 11:55:35 +0000 Subject: testing/awall: moved to main with dependencies (ipset, lua-signal, lua-sleep) --- main/awall/APKBUILD | 58 +++++++++++++++++++++++++++++++++++++++++++++ main/ipset/APKBUILD | 43 +++++++++++++++++++++++++++++++++ main/ipset/ipset.initd | 24 +++++++++++++++++++ main/lua-signal/APKBUILD | 36 ++++++++++++++++++++++++++++ main/lua-sleep/APKBUILD | 35 +++++++++++++++++++++++++++ testing/awall/APKBUILD | 58 --------------------------------------------- testing/ipset/APKBUILD | 43 --------------------------------- testing/ipset/ipset.initd | 24 ------------------- testing/lua-signal/APKBUILD | 36 ---------------------------- testing/lua-sleep/APKBUILD | 35 --------------------------- 10 files changed, 196 insertions(+), 196 deletions(-) create mode 100644 main/awall/APKBUILD create mode 100644 main/ipset/APKBUILD create mode 100644 main/ipset/ipset.initd create mode 100644 main/lua-signal/APKBUILD create mode 100644 main/lua-sleep/APKBUILD delete mode 100644 testing/awall/APKBUILD delete mode 100644 testing/ipset/APKBUILD delete mode 100644 testing/ipset/ipset.initd delete mode 100644 testing/lua-signal/APKBUILD delete mode 100644 testing/lua-sleep/APKBUILD diff --git a/main/awall/APKBUILD b/main/awall/APKBUILD new file mode 100644 index 0000000000..df7d371f70 --- /dev/null +++ b/main/awall/APKBUILD @@ -0,0 +1,58 @@ +# Contributor: Kaarle Ritvanen +# Maintainer: Kaarle Ritvanen +pkgname=awall +pkgver=0.1.1 +pkgrel=0 +pkgdesc="Alpine Wall" +url=http://git.alpinelinux.org/cgit/kunkku/awall/ +arch=noarch +license=GPL-2 +depends="bind-tools ip6tables ipset iptables lua lua-alt-getopt lua-filesystem lua-json4 lua-pc lua-signal lua-sleep lua-stringy" +subpackages=$pkgname-nat +source="${url}snapshot/awall-${pkgver}.tar.bz2" + +_builddir=$srcdir/awall-${pkgver} +_luadir=usr/share/lua/5.1 + +prepare() { + : +} + +build() { + : +} + +package() { + cd "$_builddir" + local dir=$pkgdir/$_luadir/awall + local bindir=$pkgdir/usr/sbin + local poldir=$pkgdir/usr/share/awall + + install -d "$poldir/mandatory" + install -d "$poldir/optional" + install -d "$poldir/sample" + + install -d "$bindir" + install -d "$dir/modules" + install -d "$pkgdir/etc/awall" + install -d "$pkgdir/var/run/awall" + + install awall-cli "$bindir/awall" + install -m 644 awall/*.lua "$dir" + install -m 644 awall/modules/filter.lua "$dir/modules" + + install -m 644 json/services.json "$poldir/mandatory" + install -m 644 sample-policy.json "$poldir/sample" +} + +nat() { + depends=awall + cd "$_builddir" + local moddir=$subpkgdir/$_luadir/awall/modules + local poldir=$subpkgdir/usr/share/awall/mandatory + install -d "$moddir" "$poldir" + install -m 644 json/masquerade.json "$poldir" + install -m 644 awall/modules/nat.lua "$moddir" +} + +md5sums="de2ae6f4b2825b523873ca82bd1f7c48 awall-0.1.1.tar.bz2" diff --git a/main/ipset/APKBUILD b/main/ipset/APKBUILD new file mode 100644 index 0000000000..e8b88ef82e --- /dev/null +++ b/main/ipset/APKBUILD @@ -0,0 +1,43 @@ +# Contributor: Kaarle Ritvanen +# Maintainer: Kaarle Ritvanen +pkgname=ipset +pkgver=6.11 +pkgrel=1 +pkgdesc="Manage Linux IP sets" +url=http://ipset.netfilter.org/ +arch=all +license=GPL-2 +depends_dev=libmnl-dev +makedepends="$depends_dev automake autoconf pkgconfig libtool linux-headers" +subpackages="$pkgname-dev $pkgname-doc" +source="${url}ipset-$pkgver.tar.bz2 ipset.initd" + +_builddir=$srcdir/ipset-$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" + ./configure --with-kmod=no --prefix=/usr && make +} + +package() { + cd "$_builddir" + make install DESTDIR=$pkgdir || return + rm $pkgdir/usr/lib/*.la + + mkdir -p "$pkgdir/etc/init.d" \ + "$pkgdir/etc/ipset.d" + install -m 755 "$startdir/ipset.initd" "$pkgdir/etc/init.d/ipset" +} + +md5sums="bfcc92e30a0fcf10ae6e7c4affa03c84 ipset-6.11.tar.bz2 +9f2e07dc13cafe456aa9d70fb631f175 ipset.initd" diff --git a/main/ipset/ipset.initd b/main/ipset/ipset.initd new file mode 100644 index 0000000000..6e3294c8e0 --- /dev/null +++ b/main/ipset/ipset.initd @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Init script for ipset +# Copyright (C) 2012 Kaarle Ritvanen +# Licensed under the terms of the GPL2 + +depend() { + before iptables ip6tables +} + +start() { + if ls /etc/ipset.d/* &> /dev/null; then + ebegin "Loading firewall IP sets" + for f in /etc/ipset.d/*; do + /usr/sbin/ipset restore < $f + done + eend $? + fi +} + +stop() { + ebegin "Flushing firewall IP sets" + /usr/sbin/ipset destroy + eend $? +} diff --git a/main/lua-signal/APKBUILD b/main/lua-signal/APKBUILD new file mode 100644 index 0000000000..2c9f105764 --- /dev/null +++ b/main/lua-signal/APKBUILD @@ -0,0 +1,36 @@ +# Contributor: Kaarle Ritvanen +# Maintainer: Kaarle Ritvanen +pkgname=lua-signal +pkgver=1.200 +pkgrel=0 +pkgdesc="Signal library for Lua" +url=http://www.batbytes.com/files/ +arch=all +license=MIT +depends=lua +makedepends=lua-dev +install="" +source=${url}lua-signal-${pkgver}.tar.gz + +_builddir=$srcdir/lua-signal +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() { + make -C "$_builddir" +} + +package() { + local moddir="$pkgdir/usr/lib/lua/5.1" + mkdir -p "$moddir" + make -C "$_builddir" install SIGNAL_DESTINATION="$moddir" +} + +md5sums="9bfcaa5f9c13488da5087a277b4eaa25 lua-signal-1.200.tar.gz" diff --git a/main/lua-sleep/APKBUILD b/main/lua-sleep/APKBUILD new file mode 100644 index 0000000000..22d135483a --- /dev/null +++ b/main/lua-sleep/APKBUILD @@ -0,0 +1,35 @@ +# Contributor: Kaarle Ritvanen +# Maintainer: Kaarle Ritvanen +pkgname=lua-sleep +pkgver=0.1 +pkgrel=0 +pkgdesc="Sleep functions for Lua" +url=http://projects.plentyfact.org/projects/lua-sleep +arch=all +license=public-domain +depends=lua +makedepends=lua-dev +source=http://projects.plentyfact.org/attachments/download/21/lua-sleep_${pkgver}.tar.gz + +_builddir=$srcdir/lua-sleep_$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() { + make -C "$_builddir" +} + +package() { + local dir=$pkgdir/usr/lib/lua/5.1 + install -d "$dir" + install "$_builddir/lsleep.so" "$dir" +} + +md5sums="aeb91a0abeb483868e27c4f5add59805 lua-sleep_0.1.tar.gz" diff --git a/testing/awall/APKBUILD b/testing/awall/APKBUILD deleted file mode 100644 index df7d371f70..0000000000 --- a/testing/awall/APKBUILD +++ /dev/null @@ -1,58 +0,0 @@ -# Contributor: Kaarle Ritvanen -# Maintainer: Kaarle Ritvanen -pkgname=awall -pkgver=0.1.1 -pkgrel=0 -pkgdesc="Alpine Wall" -url=http://git.alpinelinux.org/cgit/kunkku/awall/ -arch=noarch -license=GPL-2 -depends="bind-tools ip6tables ipset iptables lua lua-alt-getopt lua-filesystem lua-json4 lua-pc lua-signal lua-sleep lua-stringy" -subpackages=$pkgname-nat -source="${url}snapshot/awall-${pkgver}.tar.bz2" - -_builddir=$srcdir/awall-${pkgver} -_luadir=usr/share/lua/5.1 - -prepare() { - : -} - -build() { - : -} - -package() { - cd "$_builddir" - local dir=$pkgdir/$_luadir/awall - local bindir=$pkgdir/usr/sbin - local poldir=$pkgdir/usr/share/awall - - install -d "$poldir/mandatory" - install -d "$poldir/optional" - install -d "$poldir/sample" - - install -d "$bindir" - install -d "$dir/modules" - install -d "$pkgdir/etc/awall" - install -d "$pkgdir/var/run/awall" - - install awall-cli "$bindir/awall" - install -m 644 awall/*.lua "$dir" - install -m 644 awall/modules/filter.lua "$dir/modules" - - install -m 644 json/services.json "$poldir/mandatory" - install -m 644 sample-policy.json "$poldir/sample" -} - -nat() { - depends=awall - cd "$_builddir" - local moddir=$subpkgdir/$_luadir/awall/modules - local poldir=$subpkgdir/usr/share/awall/mandatory - install -d "$moddir" "$poldir" - install -m 644 json/masquerade.json "$poldir" - install -m 644 awall/modules/nat.lua "$moddir" -} - -md5sums="de2ae6f4b2825b523873ca82bd1f7c48 awall-0.1.1.tar.bz2" diff --git a/testing/ipset/APKBUILD b/testing/ipset/APKBUILD deleted file mode 100644 index 2968393813..0000000000 --- a/testing/ipset/APKBUILD +++ /dev/null @@ -1,43 +0,0 @@ -# Contributor: Kaarle Ritvanen -# Maintainer: -pkgname=ipset -pkgver=6.11 -pkgrel=1 -pkgdesc="Manage Linux IP sets" -url=http://ipset.netfilter.org/ -arch=all -license=GPL-2 -depends_dev=libmnl-dev -makedepends="$depends_dev automake autoconf pkgconfig libtool linux-headers" -subpackages="$pkgname-dev $pkgname-doc" -source="${url}ipset-$pkgver.tar.bz2 ipset.initd" - -_builddir=$srcdir/ipset-$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" - ./configure --with-kmod=no --prefix=/usr && make -} - -package() { - cd "$_builddir" - make install DESTDIR=$pkgdir || return - rm $pkgdir/usr/lib/*.la - - mkdir -p "$pkgdir/etc/init.d" \ - "$pkgdir/etc/ipset.d" - install -m 755 "$startdir/ipset.initd" "$pkgdir/etc/init.d/ipset" -} - -md5sums="bfcc92e30a0fcf10ae6e7c4affa03c84 ipset-6.11.tar.bz2 -9f2e07dc13cafe456aa9d70fb631f175 ipset.initd" diff --git a/testing/ipset/ipset.initd b/testing/ipset/ipset.initd deleted file mode 100644 index 6e3294c8e0..0000000000 --- a/testing/ipset/ipset.initd +++ /dev/null @@ -1,24 +0,0 @@ -#!/sbin/runscript -# Init script for ipset -# Copyright (C) 2012 Kaarle Ritvanen -# Licensed under the terms of the GPL2 - -depend() { - before iptables ip6tables -} - -start() { - if ls /etc/ipset.d/* &> /dev/null; then - ebegin "Loading firewall IP sets" - for f in /etc/ipset.d/*; do - /usr/sbin/ipset restore < $f - done - eend $? - fi -} - -stop() { - ebegin "Flushing firewall IP sets" - /usr/sbin/ipset destroy - eend $? -} diff --git a/testing/lua-signal/APKBUILD b/testing/lua-signal/APKBUILD deleted file mode 100644 index 37de2ccc2d..0000000000 --- a/testing/lua-signal/APKBUILD +++ /dev/null @@ -1,36 +0,0 @@ -# Contributor: Kaarle Ritvanen -# Maintainer: -pkgname=lua-signal -pkgver=1.200 -pkgrel=0 -pkgdesc="Signal library for Lua" -url=http://www.batbytes.com/files/ -arch=all -license=MIT -depends=lua -makedepends=lua-dev -install="" -source=${url}lua-signal-${pkgver}.tar.gz - -_builddir=$srcdir/lua-signal -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() { - make -C "$_builddir" -} - -package() { - local moddir="$pkgdir/usr/lib/lua/5.1" - mkdir -p "$moddir" - make -C "$_builddir" install SIGNAL_DESTINATION="$moddir" -} - -md5sums="9bfcaa5f9c13488da5087a277b4eaa25 lua-signal-1.200.tar.gz" diff --git a/testing/lua-sleep/APKBUILD b/testing/lua-sleep/APKBUILD deleted file mode 100644 index 716d63e740..0000000000 --- a/testing/lua-sleep/APKBUILD +++ /dev/null @@ -1,35 +0,0 @@ -# Contributor: Kaarle Ritvanen -# Maintainer: -pkgname=lua-sleep -pkgver=0.1 -pkgrel=0 -pkgdesc="Sleep functions for Lua" -url=http://projects.plentyfact.org/projects/lua-sleep -arch=all -license=public-domain -depends=lua -makedepends=lua-dev -source=http://projects.plentyfact.org/attachments/download/21/lua-sleep_${pkgver}.tar.gz - -_builddir=$srcdir/lua-sleep_$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() { - make -C "$_builddir" -} - -package() { - local dir=$pkgdir/usr/lib/lua/5.1 - install -d "$dir" - install "$_builddir/lsleep.so" "$dir" -} - -md5sums="aeb91a0abeb483868e27c4f5add59805 lua-sleep_0.1.tar.gz" -- cgit v1.2.3