### this file is sourced not run
PKGVER=9.14
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=hiawatha-$PKGVER.tar.gz
MD5SUM=400aaf5af8b0060a91aaae7a462450ba
SRC_URL=https://www.hiawatha-webserver.org/files/$TARBALL
BUNDLE=

SLACKREQ='libxml2 libxslt openssl'
SLACKDESC="hiawatha: hiawatha $PKGVER (Secure and lightweight web server)  
hiawatha:  
hiawatha: Hiawatha is an advanced and secure webserver for Unix. Hiawatha has 
hiawatha: been written with security in mind. Although Hiawatha has everything 
hiawatha: a modern webserver needs, it'\''s nevertheless a small and lightweight 
hiawatha: webserver. And lastly, it'\''s easy to use. Its configuration syntax is 
hiawatha: easy to learn.  
hiawatha: 
hiawatha: 
hiawatha: 
hiawatha: https://www.hiawatha-webserver.org/
"

### default pkg_download
### default pkg_prepare
### package: add startup files
pkg_package() {
	mkdir -p etc/init.d &&
	cp $CHROOT_DIR/tmp/pkg/60-hiawatha etc/init.d
}

### build
pkg_build() {
	cd /tmp/hiawatha*
	CMAKEFLAGS="$CMAKEFLAGS -DENABLE_TOMAHAWK=ON \
	    -DWEBROOT_DIR=/srv/www -DCMAKE_INSTALL_SYSCONFDIR=/etc \
	    -DLOG_DIR=/var/log/hiawatha -DPID_DIR=/var/run \
	    -DWORK_DIR=/var/lib/hiawatha"
	pkg_build_cmake &&
	pkg_build_slackdesc
}


