[csw-devel] SF.net SVN: gar:[11144] csw/mgar/pkg/lighttpd/tags
driodeiros at users.sourceforge.net
driodeiros at users.sourceforge.net
Mon Oct 4 14:41:40 CEST 2010
Revision: 11144
http://gar.svn.sourceforge.net/gar/?rev=11144&view=rev
Author: driodeiros
Date: 2010-10-04 12:41:40 +0000 (Mon, 04 Oct 2010)
Log Message:
-----------
Legacy scripts for lighttpd added.
Added Paths:
-----------
csw/mgar/pkg/lighttpd/tags/legacy/
csw/mgar/pkg/lighttpd/tags/legacy/build_lighttpd.sh
csw/mgar/pkg/lighttpd/tags/legacy/checkinstall
csw/mgar/pkg/lighttpd/tags/legacy/copy_to.sh
csw/mgar/pkg/lighttpd/tags/legacy/cswlighttpd
csw/mgar/pkg/lighttpd/tags/legacy/i.smfno
csw/mgar/pkg/lighttpd/tags/legacy/i.smfyes
csw/mgar/pkg/lighttpd/tags/legacy/lighttpd.conf
csw/mgar/pkg/lighttpd/tags/legacy/lighttpd.xml
csw/mgar/pkg/lighttpd/tags/legacy/postinstall
csw/mgar/pkg/lighttpd/tags/legacy/preremove
csw/mgar/pkg/lighttpd/tags/legacy/space
Added: csw/mgar/pkg/lighttpd/tags/legacy/build_lighttpd.sh
===================================================================
--- csw/mgar/pkg/lighttpd/tags/legacy/build_lighttpd.sh (rev 0)
+++ csw/mgar/pkg/lighttpd/tags/legacy/build_lighttpd.sh 2010-10-04 12:41:40 UTC (rev 11144)
@@ -0,0 +1,139 @@
+#!/usr/bin/bash
+set -e
+
+# NOTE: if creatpkg -r fails: rm -rf /var/spool/pkg/CSWlighttpd
+
+VERSION="1.4.28"
+TARBALL="lighttpd-$VERSION.tar.gz"
+ROOT_TB="lighttpd-$VERSION"
+PKG_NAME="lighttpd"
+REV=",REV=`date +%Y.%m.%d`"
+CURRENT="$HOME/opencsw/lighttpd"
+
+#export PATH="/usr/ccs/bin:/usr/bin:/opt/csw/bin:/opt/sfw/bin:/opt/local/bin:$PATH"
+#export PATH="$PATH:/opt/studio/SOS11/SUNWspro/bin:/opt/studio/SOS11/SUNWspro/lib"
+# For Studio
+#export PATH="/opt/studio/SOS11/SUNWspro/bin:/opt/studio/SOS11/SUNWspro/lib:$PATH:/opt/csw/bin:/usr/ccs/bin"
+# For gcc
+export PATH="/opt/csw/gcc4/bin:/opt/csw/gcc4/lib:$PATH:/opt/csw/bin:/usr/ccs/bin"
+
+rm -rf /var/spool/pkg/CSWlighttpd
+
+# 1. prepare metadata
+rm -rf $HOME/pkgs/$PKG_NAME
+mkdir -p $HOME/pkgs/$PKG_NAME
+# Stuff for smf support
+cp checkinstall preremove postinstall i.smfno i.smfyes space $HOME/pkgs/$PKG_NAME
+cd $HOME/pkgs/$PKG_NAME
+rm -rf $HOME/build/$ROOT_TB
+mkdir -p $HOME/build
+
+(
+cat <<-EOF
+PKG=CSWlighttpd
+NAME=lighttpd - Security, speed, compliance, and flexibility http server
+VERSION=$VERSION$REV
+CATEGORY=application
+VENDOR=http://www.lighttpd.net/ packaged for CSW by David Rio Deiros
+HOTLINE=http://www.opencsw.org/bugtrack/
+EMAIL=drio at opencsw.org
+EOF
+) > ./pkginfo
+
+# 2. compile source code
+cd $HOME/build
+rm -rf $ROOT_TB
+echo "Untaring..."
+gtar zxvf $HOME/src/$TARBALL > /dev/null
+cp $HOME/patches/lighttpd.drio.patch .
+# Not needed anymore
+#gpatch -p0 < ./lighttpd.drio.patch
+cd $ROOT_TB
+cp COPYING $HOME/pkgs/$PKG_NAME/copyright
+
+#export CFLAGS="-xarch=386"
+#./configure --prefix=/opt/csw --with-openssl --with-pcre
+./configure --prefix=/opt/csw --with-openssl-includes=/opt/csw/include --with-openssl-libs=/opt/csw/lib --disable-ipv6
+#make
+gmake -j4
+
+stagepkg
+cd cswstage
+
+# 3. create start/stop scrip (for smf also)
+mkdir -p ./etc/init.d/
+cp $CURRENT/cswlighttpd ./etc/init.d
+for i in 0 1 2 3 'S'; do
+ mkdir ./etc/rc$i.d
+ ln -s ./etc/init.d/cswlighttpd ./etc/rc$i.d/cswlighttpd
+done
+mkdir -p ./opt/csw/var/svc/manifest/network
+cp $CURRENT/lighttpd.xml ./opt/csw/var/svc/manifest/network
+mkdir -p ./opt/csw/lib/svc/method
+cp $CURRENT/cswlighttpd ./opt/csw/lib/svc/method
+
+# log/config/rootdir
+mkdir -p ./opt/csw/share/lighttpd-root
+echo "Lighttpd works!" >> ./opt/csw/share/lighttpd-root/index.html
+chmod 755 ./opt/csw/share/lighttpd-root
+chmod 755 ./opt/csw/share/lighttpd-root/index.html
+mkdir -p ./opt/csw/var/lighttpd/
+
+mkdir ./opt/csw/etc
+cp $CURRENT/lighttpd.conf ./opt/csw/etc/lighttpd.conf.CSW
+chmod 644 ./opt/csw/etc/lighttpd.conf.CSW
+
+(
+cat <<-EOF
+d none /opt/csw/var/lighttpd 0755 nobody nobody
+d none /opt/csw/share/lighttpd-root 0755 nobody nobody
+f none /opt/csw/share/lighttpd-root/index.html 0755 nobody nobody
+f none /opt/csw/etc/lighttpd.conf.CSW 0644 root bin
+f smfno /etc/init.d/cswlighttpd=cswlighttpd 0755 root bin
+l smfno /etc/rc0.d/K15cswlighttpd=/etc/init.d/cswlighttpd
+l smfno /etc/rc1.d/K15cswlighttpd=/etc/init.d/cswlighttpd
+l smfno /etc/rc2.d/K15cswlighttpd=/etc/init.d/cswlighttpd
+l smfno /etc/rc3.d/S40cswlighttpd=/etc/init.d/cswlighttpd
+l smfno /etc/rcS.d/K15cswlighttpd=/etc/init.d/cswlighttpd
+d smfyes /opt/csw/var/svc 0755 root bin
+d smfyes /opt/csw/var/svc/manifest 0755 root bin
+d smfyes /opt/csw/var/svc/manifest/network 0755 root bin
+f smfyes /opt/csw/var/svc/manifest/network/lighttpd.xml=/lighttpd.xml 0644 root bin
+d smfyes /opt/csw/lib/svc 0755 root bin
+d smfyes /opt/csw/lib/svc/method 0755 root bin
+f smfyes /opt/csw/lib/svc/method/cswlighttpd=cswlighttpd 0755 root bin
+EOF
+) >> ./lastpart
+
+grep "^i" ./prototype > ./head
+for i in checkinstall preremove postinstall i.smfno i.smfyes space;do
+ echo "i $i" >> ./head
+done
+grep -v "^i" ./prototype > realfiles
+cat ./head ./realfiles ./lastpart > ./prototype
+rm -f ./head ./lastpart ./realfiles
+
+#cp $CURRENT/lighttpd.xml $HOME/pkgs/$PKG_NAME
+#cp $CURRENT/cswlighttpd $HOME/pkgs/$PKG_NAME
+#cp $CURRENT/index.html $HOME/build/$ROOT_TB/cswstage
+cp $CURRENT/lighttpd.xml $HOME/build/$ROOT_TB/cswstage
+cp $CURRENT/cswlighttpd $HOME/build/$ROOT_TB/cswstage
+cp prototype $HOME/pkgs/$PKG_NAME
+cd $HOME/pkgs/$PKG_NAME
+rm -f *.pkg*
+touch ./depend
+#DPS=`createpkg -r $HOME/build/$ROOT_TB/cswstage 2>&1 | grep "^>" | grep -v SUNW | grep -v SPRO | sed 's/> //g'`
+DPS="CSWexpat CSWfconfig CSWftype2 CSWgcc4g++rt CSWiconv CSWlibxft2 CSWlibxrender CSWxpm CSWzlib CSWbzip2 CSWosslrt CSWpcrert"
+
+rm -f ./depend
+for i in $DPS;do
+ echo -e "P\t$i" >> ./depend
+done
+#echo "i depend" >> prototype
+rm -f *.g
+
+rm -f $HOME/pkgs/$PKG_NAME/*.gz
+createpkg -r $HOME/build/$ROOT_TB/cswstage
+
+mv *.pkg.gz $HOME/ready
+gls -lach $HOME/ready
Property changes on: csw/mgar/pkg/lighttpd/tags/legacy/build_lighttpd.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: csw/mgar/pkg/lighttpd/tags/legacy/checkinstall
===================================================================
--- csw/mgar/pkg/lighttpd/tags/legacy/checkinstall (rev 0)
+++ csw/mgar/pkg/lighttpd/tags/legacy/checkinstall 2010-10-04 12:41:40 UTC (rev 11144)
@@ -0,0 +1,18 @@
+trap `exit 3` 15
+# Assign Solaris release class to install release specific files
+smf=no
+if [ -f $PKG_INSTALL_ROOT/usr/sbin/svccfg -a -f $PKG_INSTALL_ROOT/usr/sbin/svcadm ] ; then smf=yes ; fi
+if [ $smf = yes ]
+then
+ CLASSES='none smfyes'
+else
+ CLASSES='none smfno'
+fi
+
+# Make env variables available to other packaging scripts
+
+cat >$1 <<!
+CLASSES='$CLASSES'
+!
+
+exit 0
Added: csw/mgar/pkg/lighttpd/tags/legacy/copy_to.sh
===================================================================
--- csw/mgar/pkg/lighttpd/tags/legacy/copy_to.sh (rev 0)
+++ csw/mgar/pkg/lighttpd/tags/legacy/copy_to.sh 2010-10-04 12:41:40 UTC (rev 11144)
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+
+sudo cp ./lighttpd.xml /var/svc/manifest/network/
+sudo cp ./cswlighttpd /lib/svc/method/
+sudo chmod a+rx /lib/svc/method/cswlighttpd
+sudo cp ./lighttpd.conf /opt/csw/etc/
+
+#/opt/csw/share/lighttpd
+#/opt/csw/var/lighttpd
+
+sudo mkdir -p /opt/csw/share/lighttpd/
+sudo chown nobody:nobody /opt/csw/share/lighttpd/
+
+sudo mkdir -p /opt/csw/var/lighttpd
+sudo touch /opt/csw/var/lighttpd/access.log
+sudo chown -R nobody:nobody /opt/csw/var/lighttpd
+
+sudo echo 'Lighttpd working.' > /opt/csw/share/lighttpd-root/index.html
Property changes on: csw/mgar/pkg/lighttpd/tags/legacy/copy_to.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: csw/mgar/pkg/lighttpd/tags/legacy/cswlighttpd
===================================================================
--- csw/mgar/pkg/lighttpd/tags/legacy/cswlighttpd (rev 0)
+++ csw/mgar/pkg/lighttpd/tags/legacy/cswlighttpd 2010-10-04 12:41:40 UTC (rev 11144)
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# Copyright 2005 Sergiusz Pawlowicz All rights reserved.
+# Use is subject to license terms.
+# Modified for lighttpd
+#
+#
+
+LIGHTTPD_HOME=/opt/csw
+CONF_FILE=/opt/csw/etc/lighttpd.conf
+PIDFILE=/var/run/lighttpd.pid
+HTTPD="${LIGHTTPD_HOME}/sbin/lighttpd"
+
+[ ! -f ${CONF_FILE} ] && exit $CONF_FILE
+
+case "$1" in
+start)
+ /bin/rm -f ${PIDFILE}
+# Enable NCA:
+ NCAKMODCONF=/etc/nca/ncakmod.conf
+ if [ -f $NCAKMODCONF ]; then
+ . $NCAKMODCONF
+ if [ "x$status" = "xenabled" ]; then
+ HTTPD="env LD_PRELOAD=/usr/lib/ncad_addr.so $HTTPD"
+ fi
+ fi
+ exec $HTTPD -f ${CONF_FILE} 2>&1
+ ;;
+refresh)
+ if [ -f "$PIDFILE" ]; then
+ /usr/bin/kill -HUP `/usr/bin/cat $PIDFILE`
+ fi
+ ;;
+stop)
+ if [ -f "$PIDFILE" ]; then
+ /usr/bin/kill -QUIT `/usr/bin/cat $PIDFILE`
+ fi
+ ;;
+*)
+ echo "Usage: $0 {start|stop|refresh}"
+ exit 1
+ ;;
+esac
Property changes on: csw/mgar/pkg/lighttpd/tags/legacy/cswlighttpd
___________________________________________________________________
Added: svn:executable
+ *
Added: csw/mgar/pkg/lighttpd/tags/legacy/i.smfno
===================================================================
--- csw/mgar/pkg/lighttpd/tags/legacy/i.smfno (rev 0)
+++ csw/mgar/pkg/lighttpd/tags/legacy/i.smfno 2010-10-04 12:41:40 UTC (rev 11144)
@@ -0,0 +1,17 @@
+# Copy the non-SMF specific files to the base directory.
+# The files to copy are:
+# /etc/init.d/cswmysql5=cswmysql5
+# /etc/rc0.d/K15cswmysql5=/etc/init.d/cswmysql5
+# /etc/rc1.d/K15cswmysql5=/etc/init.d/cswmysql5
+# /etc/rc2.d/K15cswmysql5=/etc/init.d/cswmysql5
+# /etc/rc3.d/S40cswmysql5=/etc/init.d/cswmysql5
+# /etc/rcS.d/K15cswmysql5=/etc/init.d/cswmysql5
+#
+echo "Installing class <smfno>."
+while read src dest
+do
+ # Do copy
+ /bin/cp $src $dest || exit 2
+ echo $dest
+done
+exit 0
Added: csw/mgar/pkg/lighttpd/tags/legacy/i.smfyes
===================================================================
--- csw/mgar/pkg/lighttpd/tags/legacy/i.smfyes (rev 0)
+++ csw/mgar/pkg/lighttpd/tags/legacy/i.smfyes 2010-10-04 12:41:40 UTC (rev 11144)
@@ -0,0 +1,19 @@
+# PKGINST parameter provided by installation services
+# Copy the SMF specific files to the base directory.
+# The files specific to SMF are:
+# /opt/csw/var/svc
+# /opt/csw/var/svc/manifest
+# /opt/csw/var/svc/manifest/network
+# /opt/csw/var/svc/manifest/network/mysql5.xml=/mysql5.xml
+# /opt/csw/lib/svc
+# /opt/csw/lib/svc/method
+# /opt/csw/lib/svc/method/svc-mysql5
+#
+echo "Installing class <smfyes>."
+while read src dest
+do
+ # Do copy
+ /bin/cp $src $dest || exit 2
+ echo $dest
+done
+exit 0
Added: csw/mgar/pkg/lighttpd/tags/legacy/lighttpd.conf
===================================================================
--- csw/mgar/pkg/lighttpd/tags/legacy/lighttpd.conf (rev 0)
+++ csw/mgar/pkg/lighttpd/tags/legacy/lighttpd.conf 2010-10-04 12:41:40 UTC (rev 11144)
@@ -0,0 +1,322 @@
+# lighttpd configuration file
+#
+# use it as a base for lighttpd 1.0.0 and above
+#
+# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $
+
+############ Options you really have to take care of ####################
+
+## modules to load
+# at least mod_access and mod_accesslog should be loaded
+# all other module should only be loaded if really neccesary
+# - saves some time
+# - saves memory
+server.modules = (
+# "mod_rewrite",
+# "mod_redirect",
+# "mod_alias",
+ "mod_access",
+# "mod_cml",
+# "mod_trigger_b4_dl",
+# "mod_auth",
+# "mod_status",
+# "mod_setenv",
+# "mod_fastcgi",
+# "mod_proxy",
+# "mod_simple_vhost",
+# "mod_evhost",
+# "mod_userdir",
+# "mod_cgi",
+# "mod_compress",
+# "mod_ssi",
+# "mod_usertrack",
+# "mod_expire",
+# "mod_secdownload",
+# "mod_rrdtool",
+ "mod_accesslog" )
+
+## a static document-root, for virtual-hosting take look at the
+## server.virtual-* options
+server.document-root = "/opt/csw/share/lighttpd-root"
+
+## where to send error-messages to
+server.errorlog = "/opt/csw/var/lighttpd/error.log"
+
+# files to check for if .../ is requested
+index-file.names = ( "index.php", "index.html",
+ "index.htm", "default.htm" )
+
+## set the event-handler (read the performance section in the manual)
+# server.event-handler = "freebsd-kqueue" # needed on OS X
+
+# mimetype mapping
+mimetype.assign = (
+ ".pdf" => "application/pdf",
+ ".sig" => "application/pgp-signature",
+ ".spl" => "application/futuresplash",
+ ".class" => "application/octet-stream",
+ ".ps" => "application/postscript",
+ ".torrent" => "application/x-bittorrent",
+ ".dvi" => "application/x-dvi",
+ ".gz" => "application/x-gzip",
+ ".pac" => "application/x-ns-proxy-autoconfig",
+ ".swf" => "application/x-shockwave-flash",
+ ".tar.gz" => "application/x-tgz",
+ ".tgz" => "application/x-tgz",
+ ".tar" => "application/x-tar",
+ ".zip" => "application/zip",
+ ".mp3" => "audio/mpeg",
+ ".m3u" => "audio/x-mpegurl",
+ ".wma" => "audio/x-ms-wma",
+ ".wax" => "audio/x-ms-wax",
+ ".ogg" => "application/ogg",
+ ".wav" => "audio/x-wav",
+ ".gif" => "image/gif",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".png" => "image/png",
+ ".xbm" => "image/x-xbitmap",
+ ".xpm" => "image/x-xpixmap",
+ ".xwd" => "image/x-xwindowdump",
+ ".css" => "text/css",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".js" => "text/javascript",
+ ".asc" => "text/plain",
+ ".c" => "text/plain",
+ ".cpp" => "text/plain",
+ ".log" => "text/plain",
+ ".conf" => "text/plain",
+ ".text" => "text/plain",
+ ".txt" => "text/plain",
+ ".dtd" => "text/xml",
+ ".xml" => "text/xml",
+ ".mpeg" => "video/mpeg",
+ ".mpg" => "video/mpeg",
+ ".mov" => "video/quicktime",
+ ".qt" => "video/quicktime",
+ ".avi" => "video/x-msvideo",
+ ".asf" => "video/x-ms-asf",
+ ".asx" => "video/x-ms-asf",
+ ".wmv" => "video/x-ms-wmv",
+ ".bz2" => "application/x-bzip",
+ ".tbz" => "application/x-bzip-compressed-tar",
+ ".tar.bz2" => "application/x-bzip-compressed-tar"
+ )
+
+# Use the "Content-Type" extended attribute to obtain mime type if possible
+#mimetype.use-xattr = "enable"
+
+
+## send a different Server: header
+## be nice and keep it at lighttpd
+# server.tag = "lighttpd"
+
+#### accesslog module
+accesslog.filename = "/opt/csw/var/lighttpd/access.log"
+
+## deny access the file-extensions
+#
+# ~ is for backupfiles from vi, emacs, joe, ...
+# .inc is often used for code includes which should in general not be part
+# of the document-root
+url.access-deny = ( "~", ".inc" )
+
+$HTTP["url"] =~ "\.pdf$" {
+ server.range-requests = "disable"
+}
+
+##
+# which extensions should not be handle via static-file transfer
+#
+# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
+static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
+
+######### Options that are good to be but not neccesary to be changed #######
+
+## bind to port (default: 80)
+#server.port = 81
+
+## bind to localhost (default: all interfaces)
+#server.bind = "grisu.home.kneschke.de"
+
+## error-handler for status 404
+#server.error-handler-404 = "/error-handler.html"
+#server.error-handler-404 = "/error-handler.php"
+
+## to help the rc.scripts
+server.pid-file = "/var/run/lighttpd.pid"
+
+
+###### virtual hosts
+##
+## If you want name-based virtual hosting add the next three settings and load
+## mod_simple_vhost
+##
+## document-root =
+## virtual-server-root + virtual-server-default-host + virtual-server-docroot
+## or
+## virtual-server-root + http-host + virtual-server-docroot
+##
+#simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
+#simple-vhost.default-host = "grisu.home.kneschke.de"
+#simple-vhost.document-root = "/pages/"
+
+
+##
+## Format: <errorfile-prefix><status-code>.html
+## -> ..../status-404.html for 'File not found'
+#server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
+
+## virtual directory listings
+#dir-listing.activate = "enable"
+
+## enable debugging
+#debug.log-request-header = "enable"
+#debug.log-response-header = "enable"
+#debug.log-request-handling = "enable"
+#debug.log-file-not-found = "enable"
+
+### only root can use these options
+#
+# chroot() to directory (default: no chroot() )
+#server.chroot = "/"
+
+## change uid to <uid> (default: don't care)
+server.username = "nobody"
+
+## change uid to <uid> (default: don't care)
+server.groupname = "nobody"
+
+#### compress module
+#compress.cache-dir = "/tmp/lighttpd/cache/compress/"
+#compress.filetype = ("text/plain", "text/html")
+
+#### proxy module
+## read proxy.txt for more info
+#proxy.server = ( ".php" =>
+# ( "localhost" =>
+# (
+# "host" => "192.168.0.101",
+# "port" => 80
+# )
+# )
+# )
+
+#### fastcgi module
+## read fastcgi.txt for more info
+## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
+#fastcgi.server = ( ".php" =>
+# ( "localhost" =>
+# (
+# "socket" => "/tmp/php-fastcgi.socket",
+# "bin-path" => "/usr/local/bin/php"
+# )
+# )
+# )
+
+#### CGI module
+#cgi.assign = ( ".pl" => "/usr/bin/perl",
+# ".cgi" => "/usr/bin/perl" )
+#
+
+#### SSL engine
+#ssl.engine = "enable"
+#ssl.pemfile = "server.pem"
+
+#### status module
+#status.status-url = "/server-status"
+#status.config-url = "/server-config"
+
+#### auth module
+## read authentication.txt for more info
+#auth.backend = "plain"
+#auth.backend.plain.userfile = "lighttpd.user"
+#auth.backend.plain.groupfile = "lighttpd.group"
+
+#auth.backend.ldap.hostname = "localhost"
+#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
+#auth.backend.ldap.filter = "(uid=$)"
+
+#auth.require = ( "/server-status" =>
+# (
+# "method" => "digest",
+# "realm" => "download archiv",
+# "require" => "user=jan"
+# ),
+# "/server-config" =>
+# (
+# "method" => "digest",
+# "realm" => "download archiv",
+# "require" => "valid-user"
+# )
+# )
+
+#### url handling modules (rewrite, redirect, access)
+#url.rewrite = ( "^/$" => "/server-status" )
+#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
+#### both rewrite/redirect support back reference to regex conditional using %n
+#$HTTP["host"] =~ "^www\.(.*)" {
+# url.redirect = ( "^/(.*)" => "http://%1/$1" )
+#}
+
+#
+# define a pattern for the host url finding
+# %% => % sign
+# %0 => domain name + tld
+# %1 => tld
+# %2 => domain name without tld
+# %3 => subdomain 1 name
+# %4 => subdomain 2 name
+#
+#evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
+
+#### expire module
+#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
+
+#### ssi
+#ssi.extension = ( ".shtml" )
+
+#### rrdtool
+#rrdtool.binary = "/usr/bin/rrdtool"
+#rrdtool.db-name = "/var/www/lighttpd.rrd"
+
+#### setenv
+#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
+#setenv.add-response-header = ( "X-Secret-Message" => "42" )
+
+## for mod_trigger_b4_dl
+# trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
+# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
+# trigger-before-download.trigger-url = "^/trigger/"
+# trigger-before-download.download-url = "^/download/"
+# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
+# trigger-before-download.trigger-timeout = 10
+
+## for mod_cml
+## don't forget to add index.cml to server.indexfiles
+# cml.extension = ".cml"
+# cml.memcache-hosts = ( "127.0.0.1:11211" )
+
+#### variable usage:
+## variable name without "." is auto prefixed by "var." and becomes "var.bar"
+#bar = 1
+#var.mystring = "foo"
+
+## integer add
+#bar += 1
+## string concat, with integer cast as string, result: "www.foo1.com"
+#server.name = "www." + mystring + var.bar + ".com"
+## array merge
+#index-file.names = (foo + ".php") + index-file.names
+#index-file.names += (foo + ".php")
+
+#### include
+#include /etc/lighttpd/lighttpd-inc.conf
+## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
+#include "lighttpd-inc.conf"
+
+#### include_shell
+#include_shell "echo var.a=1"
+## the above is same as:
+#var.a=1
Added: csw/mgar/pkg/lighttpd/tags/legacy/lighttpd.xml
===================================================================
--- csw/mgar/pkg/lighttpd/tags/legacy/lighttpd.xml (rev 0)
+++ csw/mgar/pkg/lighttpd/tags/legacy/lighttpd.xml 2010-10-04 12:41:40 UTC (rev 11144)
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+ Copyright 2005 Sergiusz Pawlowicz. All rights reserved.
+ http://pawlowicz.name/
+ Use is subject to license terms.
+
+ ident "0.1"
+ Modified for CSWlighttpd by David Rio Deiros 01/07
+-->
+
+<service_bundle type='manifest' name='lighttpd'>
+
+<service
+ name='network/lighttpd'
+ type='service'
+ version='1'>
+
+ <!--
+ Because we may have multiple instances of network/http
+ provided by different implementations, we keep dependencies
+ and methods within the instance.
+ -->
+
+ <instance name='lighttpd' enabled='false'>
+ <dependency name='loopback'
+ grouping='require_all'
+ restart_on='error'
+ type='service'>
+ <service_fmri value='svc:/network/loopback:default'/>
+ </dependency>
+
+ <dependency name='physical'
+ grouping='optional_all'
+ restart_on='error'
+ type='service'>
+ <service_fmri value='svc:/network/physical:default'/>
+ </dependency>
+
+ <dependency name='multiuser-server'
+ grouping='require_all'
+ restart_on='error'
+ type='service'>
+ <service_fmri value='svc:/milestone/multi-user-server:default'/>
+ </dependency>
+
+ <exec_method
+ type='method'
+ name='start'
+ exec='/opt/csw/lib/svc/method/cswlighttpd start'
+ timeout_seconds='60' />
+
+ <exec_method
+ type='method'
+ name='stop'
+ exec='/opt/csw/lib/svc/method/cswlighttpd stop'
+ timeout_seconds='60' />
+
+ <exec_method
+ type='method'
+ name='refresh'
+ exec='/opt/csw/lib/svc/method/cswlighttpd refresh'
+ timeout_seconds='60' />
+
+ <property_group name='startd' type='framework'>
+ <!-- sub-process core dumps shouldn't restart
+ session -->
+ <propval name='ignore_error' type='astring'
+ value='core,signal' />
+ </property_group>
+
+ </instance>
+
+ <template>
+ <common_name>
+ <loctext xml:lang='C'>
+ Lighttpd HTTP server
+ </loctext>
+ </common_name>
+ <documentation>
+ <manpage title='lighttpd' section='1M' />
+ <doc_link name='lighttpd.net'
+ uri='http://www.lighttpd.net/' />
+ </documentation>
+ </template>
+</service>
+
+</service_bundle>
Added: csw/mgar/pkg/lighttpd/tags/legacy/postinstall
===================================================================
--- csw/mgar/pkg/lighttpd/tags/legacy/postinstall (rev 0)
+++ csw/mgar/pkg/lighttpd/tags/legacy/postinstall 2010-10-04 12:41:40 UTC (rev 11144)
@@ -0,0 +1,68 @@
+# lighttpd - postinstall script
+#
+if [ "$PKG_INSTALL_ROOT" = "" ]
+then
+ PKG_INSTALL_ROOT=/
+ CONFDIR="/opt/csw/etc"
+else
+ CONFDIR="$PKG_INSTALL_ROOT/opt/csw/etc"
+fi
+
+# daemons are started by default
+enable_daemon=yes
+
+# Source csw.conf, if it exists
+if [ -f $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf ] ; then
+ . $PKG_INSTALL_ROOT/opt/csw/etc/csw.conf
+fi
+if [ -f $PKG_INSTALL_ROOT/etc/opt/csw/csw.conf ] ; then
+ . $PKG_INSTALL_ROOT/etc/opt/csw/csw.conf
+fi
+
+# If defined, autoenable for the specific daemon name takes precedence
+if [ "$autoenable_lighttpd" = "no" ] ; then
+ enable_daemon=no
+elif [ "$autoenable_daemons" = "no" -a ! -n "$autoenable_lighttpd" ] ; then
+ enable_daemon=no
+fi
+
+# We don't want to overwrite the lighttpd.conf the user may have already installed
+case "$autoenable_demons" in
+ ""|"yes")
+ if [ ! -f $CONFDIR/lighttpd.conf ]; then
+ echo copying default template lighttpd.conf.CSW to lighttpd.conf
+ cp -p $CONFDIR/lighttpd.conf.CSW $CONFDIR/lighttpd.conf
+ else
+ echo lighttpd.conf already exists. Not copying lighttpd.conf.CSW
+ fi
+ ;;
+esac
+
+# Set variable smf depending on the availability of SMF binaries
+smf=no
+if [ -f $PKG_INSTALL_ROOT/usr/sbin/svccfg -a -f $PKG_INSTALL_ROOT/usr/sbin/svcadm ]; then
+ smf=yes
+fi
+
+# let's add lighttpd to the smf framework if necessary (we won't enable it yet)
+if [ $smf = yes ]; then
+ echo "Configuring service in SMF"
+ /usr/sbin/svccfg import /opt/csw/var/svc/manifest/network/lighttpd.xml >/dev/null 2>&1
+ /usr/sbin/svcadm disable svc:network/lighttpd >/dev/null 2>&1
+ echo "Lighttpd is using Service Management Facility."
+ echo " The FMRI is: svc:network/lighttpd"
+fi
+
+if [ "$PKG_INSTALL_ROOT" = "" ] ; then PKG_INSTALL_ROOT=/ ; fi
+
+# Let's enable the daemon (if necessary)
+if [ "$enable_daemon" = "yes" -a "$PKG_INSTALL_ROOT" = "/" ]; then
+ echo "Starting lighttpd"
+ if [ $smf = no ]; then
+ /etc/init.d/cswlighttpd start >/dev/null 2>&1
+ else
+ /usr/sbin/svcadm enable svc:network/lighttpd >/dev/null 2>&1
+ fi
+fi
+
+exit 0
Added: csw/mgar/pkg/lighttpd/tags/legacy/preremove
===================================================================
--- csw/mgar/pkg/lighttpd/tags/legacy/preremove (rev 0)
+++ csw/mgar/pkg/lighttpd/tags/legacy/preremove 2010-10-04 12:41:40 UTC (rev 11144)
@@ -0,0 +1,29 @@
+# lighttpd - preremove script
+# Stop lighttpd if it is running.
+CONFFILE=$CONFDIR/lighttpd.conf
+if [ "$PKG_ROOT_DIR" = "" ] ; then PKG_ROOT_DIR=/ ; fi
+
+smf=no
+if [ -f $PKG_ROOT_DIR/usr/sbin/svccfg -a -f $PKG_ROOT_DIR/usr/sbin/svcadm ] ; then smf=yes ; fi
+
+if [ $smf = yes ]
+then
+ /usr/sbin/svcadm disable -s svc:network/lighttpd >/dev/null 2>&1
+ /usr/sbin/svccfg delete svc:network/lighttpd >/dev/null 2>&1
+else
+ case "$PKG_ROOT_DIR" in
+ "/")
+ test -x /etc/init.d/cswlighttpd && /etc/init.d/cswlighttpd stop
+ ;;
+ esac
+fi
+
+# Remove lighttpd.conf if necessary
+if cmp $CONFFILE $CONFFILE.CSW >/dev/null ; then
+ echo "$CONFFILE unchanged from default. Removing it."
+ rm $CONFFILE
+else
+ echo "$CONFFILE has been modified. Leaving it as-is."
+fi
+
+exit 0
Added: csw/mgar/pkg/lighttpd/tags/legacy/space
===================================================================
--- csw/mgar/pkg/lighttpd/tags/legacy/space (rev 0)
+++ csw/mgar/pkg/lighttpd/tags/legacy/space 2010-10-04 12:41:40 UTC (rev 11144)
@@ -0,0 +1,4 @@
+
+# No additional space is actually needed.
+# In fact, only one set of the Solaris release specific files are installed.
+# So the space required for this package is less than what is in pkgmap.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list