USE_CMAKE= yes
-EGDIR= ${PREFIX}/share/examples/hiawatha
-
CMAKE_ARGS+= -DUSE_SHARED_MBEDTLS_LIBRARY=OFF
CMAKE_ARGS+= -DUSE_STATIC_MBEDTLS_LIBRARY=ON
CMAKE_ARGS+= -DWEBROOT_DIR="${PREFIX}/var/hiawatha"
# TODO: having issues requiring PHP
CHECK_INTERPRETER_SKIP+= sbin/lefh
-
+EGDIR= ${PREFIX}/share/examples/hiawatha
ETCDIR= ${PKG_SYSCONFDIR}/hiawatha
+FILESDIR= ${PKGDIR}/../../wip/hiawatha/files
CONF_FILES+= ${EGDIR}/error.xslt ${ETCDIR}/error.xslt
CONF_FILES+= ${EGDIR}/hiawatha.conf ${ETCDIR}/hiawatha.conf
CONF_FILES+= ${EGDIR}/mimetype.conf ${ETCDIR}/mimetype.conf
CONF_FILES+= ${EGDIR}/cgi-wrapper.conf ${ETCDIR}/cgi-wrapper.conf
-INSTALLATION_DIRS+= ${EGDIR}
+INSTALLATION_DIRS+= ${EGDIR} ${RCDIR}
+
+RCD_SCRIPTS= hiawatha
post-install:
${MV} ${DESTDIR}${ETCDIR}/hiawatha.conf ${DESTDIR}${EGDIR}
share/examples/hiawatha/hiawatha.conf
share/examples/hiawatha/index.xslt
share/examples/hiawatha/mimetype.conf
+share/examples/rc.d/hiawatha
var/hiawatha/index.html
@pkgdir var/run
@pkgdir var/log/hiawatha
--- /dev/null
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: $
+#
+# PROVIDE: hiawatha
+# REQUIRE: DAEMON
+
+pidfile=/usr/pkg/var/run/hiawatha.pid
+
+name="hiawatha"
+command="hiawatha"
+
+cmd=${1:-start}
+
+case ${cmd} in
+ start)
+ echo "Starting ${name}."
+ ${command}&
+ echo $! > ${pidfile}
+ ;;
+
+ stop)
+ echo "Stopping ${name}."
+ kill `cat ${pidfile}`
+ rm ${pidfile}
+ ;;
+
+ restart)
+ ( $0 stop )
+ sleep 5
+ $0 start
+ ;;
+
+ *)
+ echo 1>&2 "Usage: $0 [restart|start|stop]"
+ exit 1
+ ;;
+esac
+exit 0