Index: trunk/dports/www/yaws/Portfile
===================================================================
--- trunk/dports/www/yaws/Portfile	(revision 18684)
+++ trunk/dports/www/yaws/Portfile	(revision 18685)
@@ -1,7 +1,7 @@
-# $Id: Portfile,v 1.2 2004/09/29 11:37:14 pguyot Exp $
+# $Id: Portfile,v 1.3 2006/07/22 08:54:03 pguyot Exp $
 
 PortSystem			1.0
 name				yaws
-version				1.49
+version				1.64
 categories			www
 maintainers			pguyot@kallisys.net
@@ -13,16 +13,12 @@
 homepage			http://yaws.hyber.org/
 master_sites		http://yaws.hyber.org/download/
-checksums			md5 2056958a87de28163e8d2c437cfebb1e
+checksums			md5 e5a122aede7c120b301d6c10eaf76c9d \
+					sha1 42e4b1ce76d91d9823317014910679cbba05c017 \
+					rmd160 378ecf8bf2309e3ec2d574e1f44554ca31c6848c
 
 depends_build		bin:erlc:erlang
-depends_run			path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup
 
 extract.post_args	| tar -xf - --exclude \
 					"${name}-${version}/www/testdir/xx*xx.jpg"
-post-extract {
-	# Copy BSD rc.d stuff.
-	file mkdir ${worksrcpath}/scripts/bsd/
-	file copy ${filespath}/yaws.sh ${worksrcpath}/scripts/bsd/
-}
 
 patchfiles			patch-man-yaws.1 \
@@ -31,6 +27,5 @@
 					patch-scripts-Install \
 					patch-scripts-Makefile \
-					patch-scripts-yaws.conf.template \
-					patch-src-yaws_config.erl
+					patch-scripts-yaws.conf.template
 
 post-patch {
@@ -49,4 +44,5 @@
 	xinstall -d "${destroot}${prefix}/var/log/yaws/"
 	system "touch ${destroot}${prefix}/var/log/yaws/.turd"
+	file rename "${destroot}${prefix}/etc/yaws.conf" "${destroot}${prefix}/etc/yaws.conf.template"
 }
 
@@ -54,2 +50,7 @@
 	ui_msg "Copy and customize ${prefix}/etc/yaws.conf.template to ${prefix}/etc/yaws.conf"
 }
+
+startupitem.create	yes
+startupitem.name	yaws
+startupitem.start	"${prefix}/bin/yaws --daemon --heart --conf ${prefix}/etc/yaws.conf"
+startupitem.stop	"${prefix}/bin/yaws --stop"
Index: trunk/dports/www/yaws/files/patch-man-yaws.1
===================================================================
--- trunk/dports/www/yaws/files/patch-man-yaws.1	(revision 18684)
+++ trunk/dports/www/yaws/files/patch-man-yaws.1	(revision 18685)
@@ -1,7 +1,7 @@
---- man/yaws.1.orig	Wed May 26 13:16:03 2004
-+++ man/yaws.1	Wed Sep 29 11:43:07 2004
-@@ -37,9 +37,10 @@
+--- man/yaws.1.orig	2006-04-28 04:25:10.000000000 +0900
++++ man/yaws.1	2006-07-22 17:37:47.000000000 +0900
+@@ -39,9 +39,10 @@
  .TP
- \fB\-c file\fR
+ \fB\--conf file\fR
  Use a different configuration file than the default. The default configuration file
 -when running as root is /etc/yaws.conf. When running as a non priviliged user, yaws
@@ -13,4 +13,4 @@
 +finally in __PREFIX/etc/yaws.conf
  .TP
- \fB\-r module\fR
+ \fB\--runmod module\fR
  Tells yaws to call \fImodule:start/0\fR at startup. This makes it possible
Index: trunk/dports/www/yaws/files/patch-man-yaws.conf.5
===================================================================
--- trunk/dports/www/yaws/files/patch-man-yaws.conf.5	(revision 18684)
+++ trunk/dports/www/yaws/files/patch-man-yaws.conf.5	(revision 18685)
@@ -9,5 +9,5 @@
  .\" Add any additional description here
  .PP
-@@ -362,11 +362,11 @@
+@@ -467,11 +467,11 @@
  The following example defines a single server on port 80.
  .nf
@@ -23,5 +23,5 @@
  .fi
  
-@@ -375,17 +375,17 @@
+@@ -480,17 +480,17 @@
  
  .nf
@@ -44,5 +44,5 @@
  
  
-@@ -399,7 +399,7 @@
+@@ -504,7 +504,7 @@
  <server www.mydomain.org>
          port = 80
@@ -53,5 +53,5 @@
          <auth>
              dir = secret/dir1
-@@ -424,7 +424,7 @@
+@@ -529,7 +529,7 @@
  <server www.funky.org>
          port = 80
@@ -62,5 +62,5 @@
  	<opaque>
  		mydbdir = /tmp
-@@ -448,14 +448,14 @@
+@@ -553,14 +553,14 @@
  
  .nf
@@ -79,5 +79,5 @@
  
  
-@@ -463,16 +463,16 @@
+@@ -568,16 +568,16 @@
  <server www.funky.org>
          port = 80
Index: trunk/dports/www/yaws/files/patch-man-yaws_api.5
===================================================================
--- trunk/dports/www/yaws/files/patch-man-yaws_api.5	(revision 18684)
+++ trunk/dports/www/yaws/files/patch-man-yaws_api.5	(revision 18685)
@@ -1,5 +1,5 @@
---- man/yaws_api.5.orig	Fri May 28 15:56:13 2004
-+++ man/yaws_api.5	Wed Sep 29 11:43:07 2004
-@@ -298,8 +298,8 @@
+--- man/yaws_api.5.orig	2006-04-28 04:25:10.000000000 +0900
++++ man/yaws_api.5	2006-07-22 17:37:47.000000000 +0900
+@@ -308,8 +308,8 @@
  .TP
  \fBsetconf(Gconf, Groups)\fR
Index: trunk/dports/www/yaws/files/patch-scripts-Install
===================================================================
--- trunk/dports/www/yaws/files/patch-scripts-Install	(revision 18684)
+++ trunk/dports/www/yaws/files/patch-scripts-Install	(revision 18685)
@@ -1,41 +1,103 @@
---- scripts/Install.orig	Fri Jun  4 15:15:55 2004
-+++ scripts/Install	Wed Sep 29 12:03:40 2004
-@@ -24,35 +24,6 @@
- install -d ${installprefix}/lib/yaws/examples/ebin
- install -d ${installprefix}/lib/yaws/examples/include
+--- scripts/Install.orig	2006-07-03 18:17:32.000000000 +0900
++++ scripts/Install	2006-07-22 17:22:26.000000000 +0900
+@@ -33,53 +33,53 @@
+ install -d ${destdir}/${prefix}/lib/yaws/examples/ebin
+ install -d ${destdir}/${prefix}/lib/yaws/examples/include
  
 -if [ -f /etc/gentoo-release ]; then
--    install -d  ${etcdir}/init.d/
--    install -d ${etcdir}/conf.d/
--    cp gentoo/init.d.yaws  ${etcdir}/init.d/yaws
--    chmod +x ${etcdir}/init.d/yaws
--    sed -e "s;%prefix%;$p;g" gentoo/conf.d.yaws > ${etcdir}/conf.d/yaws
+-    install -d ${destdir}/${etcdir}/init.d/
+-    install -d ${destdir}/${etcdir}/conf.d/
+-    install -d ${destdir}/${vardir}/run/yaws
+-    chmod a+rwx ${destdir}/${vardir}/run/yaws
+-    cp gentoo/init.d.yaws  ${destdir}/${etcdir}/init.d/yaws
+-    chmod +x ${destdir}/${etcdir}/init.d/yaws
+-    sed -e "s;%prefix%;$p;g" gentoo/conf.d.yaws > ${destdir}/${etcdir}/conf.d/yaws
 -elif [ -f /etc/redhat-release ]; then
--    install -d ${etcdir}/init.d
--    sed -e "s;%prefix%;$p;g" redhat/yaws.init.d  > ${etcdir}/init.d/yaws
--    chmod +x ${etcdir}/init.d/yaws
+-    install -d ${destdir}/${etcdir}/init.d
+-    sed -e "s;%prefix%;$p;g" redhat/yaws.init.d  > ${destdir}/${etcdir}/init.d/yaws
+-    chmod +x ${destdir}/${etcdir}/init.d/yaws
+-    install -d ${destdir}/${vardir}/run/yaws
+-    chmod a+rwx ${destdir}/${vardir}/run/yaws
 -elif [ -f /etc/suseservers ]; then
--    install -d ${etcdir}/init.d
--    sed -e "s;%prefix%;$p;g" suse/yaws.init.d  > ${etcdir}/init.d/yaws
--    chmod +x ${etcdir}/init.d/yaws
--elif [ "`uname -s`" = "Darwin" ]; then
+-    install -d ${destdir}/${etcdir}/init.d
+-    sed -e "s;%prefix%;$p;g" suse/yaws.init.d  > ${destdir}/${etcdir}/init.d/yaws
+-    chmod +x ${destdir}/${etcdir}/init.d/yaws
+-    install -d ${destdir}/${vardir}/run/yaws
+-    chmod a+rwx ${destdir}/${vardir}/run/yaws
+-elif [ -f /etc/debian_version ]; then
+-    install -d ${destdir}/${etcdir}/init.d
+-    sed -e "s;%prefix%;$p;g" debian/yaws.init.d  > ${destdir}/${etcdir}/init.d/yaws
+-    chmod +x ${destdir}/${etcdir}/init.d/yaws
+-    install -d ${destdir}/${vardir}/run/yaws
+-    chmod a+rwx ${destdir}/${vardir}/run/yaws
+-
+-elif [ "`uname -s`" = "Darwin" -a `id -u` = 0 ]; then
 -     startupdir="/Library/StartupItems/Yaws"
--     if [ ! -d ${startupdir} ]; then
+-     if [ ! -e ${startupdir} && ]; then
 -       mkdir ${startupdir};
+-     elif [ ! -d ${startupdir} ]; then
+-	 echo "${startupdir} exists but is not a directory, bailing out ..."
+-	 exit 1
 -     fi
 -     sed -e "s;%prefix%;$p;g" darwin/Yaws.StartupItem > ${startupdir}/Yaws
 -     chmod +x ${startupdir}/Yaws
 -     cp darwin/Yaws.plist ${startupdir}/StartupParameters.plist
+-      # MacOS is particular about the ownership of startup items.
+-     chown -R root:wheel ${startupdir}
+-elif [ "`uname -s`" = "FreeBSD" ]; then
+-    sed -e "s;%prefix%;$p;g" -e "s;%etcdir%;$e;g" freebsd/yaws.sh > ${destdir}/${etcdir}/rc.d/yaws.sh
 -else
+-    install -d ${destdir}/${etcdir} 
 -    echo "Don't know how to make /etc/init scrips for this system"
--    echo "possibly add $1/bin/yaws -D -heart to your /etc/rc.local manually"
+-    echo "possibly add ${prefix}/bin/yaws --daemon --heart to your /etc/rc.local manually"
 -fi
--
--
--
--
--
--
-+install -d ${etcdir}/rc.d/
-+sed -e "s;%prefix%;$p;g" bsd/yaws.sh  > ${etcdir}/rc.d/yaws.sh
-+chmod +x ${etcdir}/rc.d/yaws.sh
++# if [ -f /etc/gentoo-release ]; then
++#     install -d ${destdir}/${etcdir}/init.d/
++#     install -d ${destdir}/${etcdir}/conf.d/
++#     install -d ${destdir}/${vardir}/run/yaws
++#     chmod a+rwx ${destdir}/${vardir}/run/yaws
++#     cp gentoo/init.d.yaws  ${destdir}/${etcdir}/init.d/yaws
++#     chmod +x ${destdir}/${etcdir}/init.d/yaws
++#     sed -e "s;%prefix%;$p;g" gentoo/conf.d.yaws > ${destdir}/${etcdir}/conf.d/yaws
++# elif [ -f /etc/redhat-release ]; then
++#     install -d ${destdir}/${etcdir}/init.d
++#     sed -e "s;%prefix%;$p;g" redhat/yaws.init.d  > ${destdir}/${etcdir}/init.d/yaws
++#     chmod +x ${destdir}/${etcdir}/init.d/yaws
++#     install -d ${destdir}/${vardir}/run/yaws
++#     chmod a+rwx ${destdir}/${vardir}/run/yaws
++# elif [ -f /etc/suseservers ]; then
++#     install -d ${destdir}/${etcdir}/init.d
++#     sed -e "s;%prefix%;$p;g" suse/yaws.init.d  > ${destdir}/${etcdir}/init.d/yaws
++#     chmod +x ${destdir}/${etcdir}/init.d/yaws
++#     install -d ${destdir}/${vardir}/run/yaws
++#     chmod a+rwx ${destdir}/${vardir}/run/yaws
++# elif [ -f /etc/debian_version ]; then
++#     install -d ${destdir}/${etcdir}/init.d
++#     sed -e "s;%prefix%;$p;g" debian/yaws.init.d  > ${destdir}/${etcdir}/init.d/yaws
++#     chmod +x ${destdir}/${etcdir}/init.d/yaws
++#     install -d ${destdir}/${vardir}/run/yaws
++#     chmod a+rwx ${destdir}/${vardir}/run/yaws
++# 
++# elif [ "`uname -s`" = "Darwin" -a `id -u` = 0 ]; then
++#      startupdir="/Library/StartupItems/Yaws"
++#      if [ ! -e ${startupdir} && ]; then
++#        mkdir ${startupdir};
++#      elif [ ! -d ${startupdir} ]; then
++# 	 echo "${startupdir} exists but is not a directory, bailing out ..."
++# 	 exit 1
++#      fi
++#      sed -e "s;%prefix%;$p;g" darwin/Yaws.StartupItem > ${startupdir}/Yaws
++#      chmod +x ${startupdir}/Yaws
++#      cp darwin/Yaws.plist ${startupdir}/StartupParameters.plist
++#       # MacOS is particular about the ownership of startup items.
++#      chown -R root:wheel ${startupdir}
++# elif [ "`uname -s`" = "FreeBSD" ]; then
++#     sed -e "s;%prefix%;$p;g" -e "s;%etcdir%;$e;g" freebsd/yaws.sh > ${destdir}/${etcdir}/rc.d/yaws.sh
++# else
++#     install -d ${destdir}/${etcdir} 
++#     echo "Don't know how to make /etc/init scrips for this system"
++#     echo "possibly add ${prefix}/bin/yaws --daemon --heart to your /etc/rc.local manually"
++# fi
+ 
+ 
+ 
Index: trunk/dports/www/yaws/files/patch-scripts-yaws.conf.template
===================================================================
--- trunk/dports/www/yaws/files/patch-scripts-yaws.conf.template	(revision 18684)
+++ trunk/dports/www/yaws/files/patch-scripts-yaws.conf.template	(revision 18685)
@@ -1,4 +1,4 @@
---- scripts/yaws.conf.template.orig	Tue May 25 16:10:08 2004
-+++ scripts/yaws.conf.template	Wed Sep 29 12:06:45 2004
+--- scripts/yaws.conf.template.orig	2005-12-01 05:10:20.000000000 +0900
++++ scripts/yaws.conf.template	2006-07-22 17:23:51.000000000 +0900
 @@ -15,14 +15,14 @@
  # beam code can be placed. The daemon will add this
@@ -18,5 +18,5 @@
  
  
-@@ -91,7 +91,7 @@
+@@ -129,7 +129,7 @@
  <server localhost>
  	port = %port%
@@ -25,7 +25,7 @@
 +	docroot = __PREFIX/tmp
  	dir_listings = true
+ 	dav = true
  	<auth>
- 		realm = foobar
-@@ -107,7 +107,7 @@
+@@ -146,7 +146,7 @@
  
  <server %host%>
Index: trunk/dports/www/yaws/files/patch-src-yaws_config.erl
===================================================================
--- trunk/dports/www/yaws/files/patch-src-yaws_config.erl	(revision 18684)
+++ 	(revision )
@@ -1,16 +1,0 @@
---- src/yaws_config.erl.orig	Fri May 28 13:38:11 2004
-+++ src/yaws_config.erl	Wed Sep 29 13:16:40 2004
-@@ -30,11 +30,11 @@
- paths() ->
-     case yaws:getuid() of
- 	{ok, "0"} ->    %% root 
--	    ["/etc/yaws.conf"];
-+	    ["/Volumes/Medias/opt/local/etc/yaws.conf"];
- 	_ -> %% developer
- 	    [filename:join([os:getenv("HOME"), "yaws.conf"]),
- 	     "./yaws.conf", 
--	     "/etc/yaws.conf"]
-+	     "/Volumes/Medias/opt/local/etc/yaws.conf"]
-     end.
- 
- 
Index: trunk/dports/www/yaws/files/yaws.sh
===================================================================
--- trunk/dports/www/yaws/files/yaws.sh	(revision 18684)
+++ 	(revision )
@@ -1,39 +1,0 @@
-#!/bin/sh
-
-YAWS_BIN=%prefix%/bin/yaws
-YAWS_CONF_FILE=%prefix%/etc/yaws.conf
-
-test -x $YAWS_BIN || exit 5
-
-case "$1" in
-
-start)
-	$YAWS_BIN -D -heart -c $YAWS_CONF_FILE
-	;;
-
-stop)
-	$YAWS_BIN -s -c $YAWS_CONF_FILE
-	;;
-
-try-restart)
-	$0 status >/dev/null @@ $0 restart
-	;;
-
-restart)
-	$0 stop
-	$0 start
-	;;
-
-reload)
-	$YAWS_BIN -h -c $YAWS_CONF_FILE
-	;;
-
-status)
-	$YAWS_BIN -S -c $YAWS_CONF_FILE
-	;;
-
-    *)
-	echo "Usage: $0 {start|stop|status|try-restart|restart|reload}"
-	exit 1
-	;;
-esac
