aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-02-20 11:18:01 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-02-20 11:18:01 +0000
commitee3b409e6b5e22567a94f389b9725d00c8bdd24a (patch)
treecc70f3f94ff8064dc2df3cd44aaac30b15c8d272
parenta02ad24bfc22740604a1235129631aab78ccafe2 (diff)
downloadaports-ee3b409e6b5e22567a94f389b9725d00c8bdd24a.tar.gz
aports-ee3b409e6b5e22567a94f389b9725d00c8bdd24a.tar.bz2
aports-ee3b409e6b5e22567a94f389b9725d00c8bdd24a.tar.xz
main/knock: split -openrc, modernize
-rw-r--r--main/knock/APKBUILD31
1 files changed, 10 insertions, 21 deletions
diff --git a/main/knock/APKBUILD b/main/knock/APKBUILD
index 0bacc64cbb..617a9e45b3 100644
--- a/main/knock/APKBUILD
+++ b/main/knock/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=knock
pkgver=0.8
-pkgrel=0
+pkgrel=1
pkgdesc="A simple port-knocking daemon"
url="http://www.zeroflux.org/projects/knock"
arch="all"
@@ -10,7 +10,7 @@ license="GPL-2.0-or-later"
depends="iptables"
makedepends="libpcap-dev autoconf automake"
install=
-subpackages="$pkgname-doc"
+subpackages="$pkgname-doc $pkgname-openrc"
# Original hasnt been maintained in a long time - use this fork instead - includes IPv6 support
_fork="TDFKAOlli"
source="$pkgname-$pkgver.tar.gz::https://github.com/$_fork/$pkgname/archive/${pkgver}.tar.gz
@@ -18,20 +18,10 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/$_fork/$pkgname/archive/${pk
knock.confd"
options="!check"
-_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
-}
+builddir="$srcdir/$pkgname-$pkgver"
build() {
- cd "$_builddir"
+ cd "$builddir"
autoreconf -fi
./configure \
--build=$CBUILD \
@@ -39,19 +29,18 @@ build() {
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
- --infodir=/usr/share/info \
- || return 1
- make || return 1
+ --infodir=/usr/share/info
+ make
}
package() {
- cd "$_builddir"
- make DESTDIR="$pkgdir" install || return 1
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
install -m755 -D "$srcdir"/$pkgname.initd \
- "$pkgdir"/etc/init.d/knockd || return 1
+ "$pkgdir"/etc/init.d/knockd
install -m644 -D "$srcdir"/$pkgname.confd \
- "$pkgdir"/etc/conf.d/knockd || return 1
+ "$pkgdir"/etc/conf.d/knockd
}
sha512sums="cfc0b92e90c34ffa629b866e63f9f9f4b9c2423491680e6155efeb8f40c24446df29f961f2f8505441b153c2a87a32b834fd1182896b6de92dee430044680c27 knock-0.8.tar.gz