$OpenBSD: patch-scripts_regular-install,v 1.3 2013/06/13 11:31:44 sthen Exp $
--- scripts/regular-install.orig	Wed Oct 17 19:14:43 2012
+++ scripts/regular-install	Thu Jun 13 08:18:24 2013
@@ -10,20 +10,16 @@ set -e
 ./Install "${PREFIX}" "${ERL}" "${WERL}" "${ETCDIR}/" \
     "${VARDIR}/" "${ERLBINDIR}/" "${DESTDIR}" "${LIBDIR}"
 
-conffile="${DESTDIR}${ETCDIR}/yaws/yaws.conf"
+conffile="${DESTDIR}${PREFIX}/share/examples/yaws/yaws.conf"
 if [ -f "$conffile" ]; then
     echo "Keeping old config file $conffile"
     cp yaws.conf "${conffile}.template"
 else
     echo "Installing $conffile"
-    if [ -n "$DESTDIR" ]; then
-        [ -d "$DESTDIR" ] || mkdir "$DESTDIR"
-    fi
-    [ -d "${DESTDIR}${ETCDIR}" ] || mkdir "${DESTDIR}${ETCDIR}"
-    [ -d "${DESTDIR}${ETCDIR}/yaws" ] || mkdir "${DESTDIR}${ETCDIR}/yaws"
+    mkdir -p "${DESTDIR}${PREFIX}/share/examples/yaws"
     cp yaws.conf "$conffile"
 fi
-cp ../ssl/yaws-cert.pem "${DESTDIR}${ETCDIR}/yaws"
-cp ../ssl/yaws-key.pem "${DESTDIR}${ETCDIR}/yaws"
+cp ../ssl/yaws-cert.pem "${DESTDIR}${PREFIX}/share/examples/yaws"
+cp ../ssl/yaws-key.pem "${DESTDIR}${PREFIX}/share/examples/yaws"
 
 exit 0
