aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-08-06 08:15:23 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-08-06 15:29:43 -0300
commitb0f534ef8ac40639519f4a3637e0c86505f224cd (patch)
tree419d9705ca39f6f609c399d75b8928d373ed3263
parent870556a9ace199b9c08270036dd021c4ae06a4bd (diff)
downloadaports-b0f534ef8ac40639519f4a3637e0c86505f224cd.tar.bz2
aports-b0f534ef8ac40639519f4a3637e0c86505f224cd.tar.xz
testing/hiawatha: cleanup
-rw-r--r--testing/hiawatha/APKBUILD87
-rw-r--r--testing/hiawatha/hiawatha.initd7
2 files changed, 48 insertions, 46 deletions
diff --git a/testing/hiawatha/APKBUILD b/testing/hiawatha/APKBUILD
index 90e34932b6..ccb7ed8a9e 100644
--- a/testing/hiawatha/APKBUILD
+++ b/testing/hiawatha/APKBUILD
@@ -3,69 +3,66 @@
# Contributor: Stuart Cardall <developer at it-offshore dot co.uk>
pkgname=hiawatha
pkgver=10.9
-pkgrel=1
+pkgrel=2
pkgdesc='Secure and advanced webserver'
url='https://www.hiawatha-webserver.org/'
-arch=all
+arch="all"
license='GPL-2.0-only'
options="suid !check"
-subpackages="$pkgname-doc $pkgname-openrc $pkgname-letsencrypt"
+subpackages="$pkgname-doc $pkgname-openrc $pkgname-letsencrypt::noarch"
makedepends="cmake libxml2-dev libxslt-dev mbedtls-dev"
-source="https://hiawatha-webserver.org/files/$pkgname-$pkgver.tar.gz
- hiawatha.initd
- hiawatha.conf.sample
- letsencrypt.helper
- "
-builddir="$srcdir"/$pkgname-$pkgver
+source="https://hiawatha-webserver.org/files/hiawatha-$pkgver.tar.gz
+ hiawatha.initd
+ hiawatha.conf.sample
+ letsencrypt.helper
+ "
build() {
- cd "$builddir"
- cmake . -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_BINDIR=/usr/bin \
- -DCMAKE_INSTALL_SBINDIR=/usr/sbin \
- -DCMAKE_INSTALL_SYSCONFDIR=/etc/hiawatha \
- -DCMAKE_INSTALL_LIBDIR=/usr/lib \
- -DCMAKE_INSTALL_MANDIR=/usr/share/man \
- -DCONFIG_DIR=/etc/hiawatha \
- -DLOG_DIR=/var/log/hiawatha \
- -DPID_DIR=/var/run \
- -DUSE_SYSTEM_MBEDTLS=ON \
- -DWEBROOT_DIR=/var/www/hiawatha \
- -DWORK_DIR=/var/lib/hiawatha
+ cmake . \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_BINDIR=/usr/bin \
+ -DCMAKE_INSTALL_SBINDIR=/usr/sbin \
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc/hiawatha \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DCMAKE_INSTALL_MANDIR=/usr/share/man \
+ -DCONFIG_DIR=/etc/hiawatha \
+ -DLOG_DIR=/var/log/hiawatha \
+ -DPID_DIR=/var/run \
+ -DUSE_SYSTEM_MBEDTLS=ON \
+ -DWEBROOT_DIR=/var/www/hiawatha \
+ -DWORK_DIR=/var/lib/hiawatha
- make
+ make
}
package() {
- cd "$builddir"
- make DESTDIR="$pkgdir/" install
+ make DESTDIR="$pkgdir/" install
- sed -i 's|#ServerId = www-data|ServerId = nobody|' \
- "$pkgdir"/etc/hiawatha/hiawatha.conf
- sed -i 's|www-data|nobody|g' logrotate.d/hiawatha
- install -Dm644 logrotate.d/hiawatha \
- "$pkgdir"/etc/logrotate.d/hiawatha
- install -Dm755 "$srcdir"/hiawatha.initd \
- "$pkgdir"/etc/init.d/hiawatha
- install -Dm644 "$srcdir"/hiawatha.conf.sample \
- "$pkgdir"/usr/share/doc/hiawatha/hiawatha.conf.sample
+ sed -i 's|#ServerId = www-data|ServerId = nobody|' \
+ "$pkgdir"/etc/hiawatha/hiawatha.conf
+ sed -i 's|www-data|nobody|g' logrotate.d/hiawatha
+ install -Dm644 logrotate.d/hiawatha \
+ "$pkgdir"/etc/logrotate.d/hiawatha
+ install -Dm755 "$srcdir"/hiawatha.initd \
+ "$pkgdir"/etc/init.d/hiawatha
+ install -Dm644 "$srcdir"/hiawatha.conf.sample \
+ "$pkgdir"/usr/share/doc/hiawatha/hiawatha.conf.sample
}
letsencrypt() {
- subpkgarch=noarch
- depends="php7 php7-openssl php7-json"
- pkgdesc="PHP scripts to generate SSL certificates with letsencrypt"
+ depends="php7 php7-openssl php7-json"
+ pkgdesc="PHP scripts to generate SSL certificates with letsencrypt"
- mkdir -p "$subpkgdir"/usr/sbin "$subpkgdir"/usr/share/man/man1
- mv "$pkgdir"-doc/usr/share/man/man1/lefh.1.gz "$subpkgdir"/usr/share/man/man1/
- mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
- mv "$pkgdir"/usr/sbin/lefh "$subpkgdir"/usr/sbin/
- mkdir -p "$subpkgdir"/usr/lib/hiawatha/letsencrypt/scripts
- install -Dm750 "$builddir"/extra/letsencrypt/scripts/* "$subpkgdir"/usr/lib/hiawatha/letsencrypt/scripts/
- install -Dm750 "$srcdir"/letsencrypt.helper "$subpkgdir"/usr/sbin/letsencrypt
+ mkdir -p "$subpkgdir"/usr/sbin "$subpkgdir"/usr/share/man/man1
+ mv "$pkgdir"-doc/usr/share/man/man1/lefh.1.gz "$subpkgdir"/usr/share/man/man1/
+ mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
+ mv "$pkgdir"/usr/sbin/lefh "$subpkgdir"/usr/sbin/
+ mkdir -p "$subpkgdir"/usr/lib/hiawatha/letsencrypt/scripts
+ install -Dm750 "$builddir"/extra/letsencrypt/scripts/* "$subpkgdir"/usr/lib/hiawatha/letsencrypt/scripts/
+ install -Dm750 "$srcdir"/letsencrypt.helper "$subpkgdir"/usr/sbin/letsencrypt
}
sha512sums="ccd59d6c302d797a88d88206c770e794b9a2a374040bd08da67530c13a36d0232bf759df1f8d54790dcf1ae3dc25cadbd7d3af542f559b845a5cf346020eb74a hiawatha-10.9.tar.gz
-4e1201110396e13b979948caae9c2dfb34f55398225d924164d2f0818b6778500ef3426b0ad358210ef7780289fbd752f7e006220941437fbcdd378746bf5a3d hiawatha.initd
+cec0adfb48e1751cf13031f2c28f4590340b2c747aa8e81d18c16bc8789bce69b2d9d99290a93b74b501db3b63190a071033a78abeeb8f60becba2dcaf3b5c40 hiawatha.initd
b2aad6d02e03a3e25dc6dc30deab4637a7de5448255b6b707363e8c71ae1029e669bacdb6b88889ec1aa804fe717560e872dc44d049127af9aa155a8895c8a60 hiawatha.conf.sample
bc31823ba0894bf4dc2f1d9aac3c03382d60a1302f4d35027ca4d3e38d8a14cfdbc94af3235800b9e8cc68c4efceb1ba04c654d16ee0d297591f25a470cc567c letsencrypt.helper"
diff --git a/testing/hiawatha/hiawatha.initd b/testing/hiawatha/hiawatha.initd
index be4b13737b..b8304cfce8 100644
--- a/testing/hiawatha/hiawatha.initd
+++ b/testing/hiawatha/hiawatha.initd
@@ -1,7 +1,12 @@
#!/sbin/openrc-run
-pidfile=/var/run/hiawatha.pid
+supervisor=supervise-daemon
+
+name="Webserver"
+description="Secure and Advanced Hiawatha Webserver"
+
command=/usr/sbin/hiawatha
+command_args_foreground="-d"
depend() {
after firewall