diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2020-03-07 00:11:59 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2020-03-07 02:11:19 +0100 |
commit | 631a77f7c8928b9ff9a5b23129da85cdd3d1e7ea (patch) | |
tree | 2e0578292349cd50604fa08a4fe7ceb8aff3003c /testing | |
parent | 5dd91db652c7199e1ce3b0b27c7c19e5773ce48c (diff) | |
download | aports-631a77f7c8928b9ff9a5b23129da85cdd3d1e7ea.tar.bz2 aports-631a77f7c8928b9ff9a5b23129da85cdd3d1e7ea.tar.xz |
testing/sslh: modernize and improve abuild
Diffstat (limited to 'testing')
-rw-r--r-- | testing/sslh/APKBUILD | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/testing/sslh/APKBUILD b/testing/sslh/APKBUILD index 4c67fc7e1f..8115553512 100644 --- a/testing/sslh/APKBUILD +++ b/testing/sslh/APKBUILD @@ -3,45 +3,54 @@ pkgname=sslh pkgver=1.20 pkgrel=1 -pkgdesc="Applicative Protocol Multiplexer (e.g. share SSH and HTTPS on the same port) " +pkgdesc="Applicative Protocol Multiplexer (e.g. share SSH and HTTPS on the same port)" url="http://www.rutschle.net/tech/sslh/README.html" arch="all !aarch64 !s390x" # limited by valgrind license="GPL-2.0-or-later" -makedepends="libconfig-dev libcap-dev pcre-dev perl perl-conf-libconfig perl-io-socket-inet6 lcov valgrind" +makedepends="libconfig-dev libcap-dev pcre-dev perl" +checkdepends="perl-conf-libconfig perl-io-socket-inet6 lcov valgrind" subpackages="$pkgname-doc $pkgname-openrc" -options="!check" #can't test in chroot due to sockets and processes opened source="http://www.rutschle.net/tech/$pkgname/$pkgname-v$pkgver.tar.gz generate-version.patch $pkgname.conf $pkgname.initd - $pkgname.confd" + $pkgname.confd + " builddir="$srcdir/$pkgname-v$pkgver" +# FIXME: Some tests fail. +# Can't test in chroot due to sockets and processes opened. (?) +options="!check" build() { - cd "$builddir" - export CFLAGS="$CFLAGS -std=gnu99" - make ENABLE_REGEX=1 USELIBPCRE=1 USELIBCONFIG=1 USELIBCAP=1 + make CFLAGS="$CFLAGS -std=gnu99" \ + ENABLE_REGEX=1 \ + USELIBPCRE=1 \ + USELIBCONFIG=1 \ + USELIBCAP=1 +} + +check() { + make test } package() { - cd "$builddir" make DESTDIR="$pkgdir" PREFIX=/usr install install -p sslh-select "$pkgdir/usr/sbin/sslh-select" mv "$pkgdir/usr/sbin/sslh" "$pkgdir/usr/sbin/sslh-fork" ln -s sslh-fork "$pkgdir/usr/sbin/sslh" - install -D -m755 "$srcdir/$pkgname.initd" \ - "$pkgdir/etc/init.d/$pkgname" - install -D -m644 "$srcdir/$pkgname.confd" \ - "$pkgdir/etc/conf.d/$pkgname" - install -D -m644 "$srcdir/$pkgname.conf" \ - "$pkgdir/etc/$pkgname/$pkgname.conf" - mv scripts/fail2ban "$pkgdir/etc/$pkgname/" + mkdir -p "$pkgdir/etc/$pkgname" + cp -r scripts/fail2ban "$pkgdir/etc/$pkgname/" + + install -D -m755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname" + install -D -m644 "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname" + install -D -m644 "$srcdir/$pkgname.conf" "$pkgdir/etc/$pkgname/$pkgname.conf" } doc() { default_doc + cd "$builddir" install -Dm 644 basic.cfg "$subpkgdir/usr/share/doc/$pkgname/basic.cfg" install -Dm 644 example.cfg "$subpkgdir/usr/share/doc/$pkgname/example.cfg" |