# Maintainer: Kurt Marasco # Contributor: Pascal Ernster pkgname=hiawatha pkgver=10.0 pkgrel=1 pkgdesc='Secure and advanced webserver' url='https://www.hiawatha-webserver.org/' arch=all license='GPL' options="suid" subpackages="$pkgname-doc" makedepends="cmake libxml2-dev libxslt-dev mbedtls-dev" source="https://hiawatha-webserver.org/files/$pkgname-$pkgver.tar.gz hiawatha.initd hiawatha.conf.sample" _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$srcdir"/$pkgname-$pkgver 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 || return 1 make || return 1 } package() { cd "$srcdir"/$pkgname-$pkgver make DESTDIR="$pkgdir/" install || return 1 sed -i 's|#ServerId = www-data|ServerId = nobody|' \ "$pkgdir"/etc/hiawatha/hiawatha.conf || return 1 sed -i 's|www-data|nobody|g' logrotate.d/hiawatha || return 1 install -Dm644 logrotate.d/hiawatha \ "$pkgdir"/etc/logrotate.d/hiawatha || return 1 install -Dm755 "$srcdir"/hiawatha.initd \ "$pkgdir"/etc/init.d/hiawatha || return 1 install -Dm644 "$srcdir"/hiawatha.conf.sample \ "$pkgdir"/usr/share/doc/hiawatha/hiawatha.conf.sample || return 1 } md5sums="45400b720aaa3bb7663e4407f31fa4e6 hiawatha-10.0.tar.gz cce590c3649d97b221a04c61329673aa hiawatha.initd fb24fcbfa820a5b85f6c4c8a520a6920 hiawatha.conf.sample" sha256sums="a39d1f771d818025538bd1231f42001bf29a1ebf55ce3d82afb7305cc251dd0e hiawatha-10.0.tar.gz f28bc9e756e4a9fbc1da80f87667df0218acb85441585c7737e8a8cdd7017c54 hiawatha.initd 4671d2586cbe3cd6497b16ff422c6143cdab40641ef3c9c4988c478351a8f5e7 hiawatha.conf.sample" sha512sums="ec73fb92fc6c22a7e6db2e10b75720fc97d3e5bb070222d21f532734c324d6b9de4bfc4ac348072ef1f7590d8082d90108b0cbe562481af1fd4f47bdc62450c1 hiawatha-10.0.tar.gz f08ddf012fbead5b1e6724ebf7d58416abb557b6eb8c43064916921ffff1dbd1199491b36da12969b4c79715587d487a8d4d272bfb008c9dd59a103aac812571 hiawatha.initd b2aad6d02e03a3e25dc6dc30deab4637a7de5448255b6b707363e8c71ae1029e669bacdb6b88889ec1aa804fe717560e872dc44d049127af9aa155a8895c8a60 hiawatha.conf.sample"