wok diff nginx/receipt @ rev 14159

Up: nss-dev (3.14.1)
author Dominique Corbex <domcox@slitaz.org>
date Tue Mar 05 22:43:38 2013 +0100 (2013-03-05)
parents
children d4a28e8d9c5b
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nginx/receipt	Tue Mar 05 22:43:38 2013 +0100
     1.3 @@ -0,0 +1,91 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="nginx"
     1.7 +VERSION="0.7.65"
     1.8 +CATEGORY="network"
     1.9 +SHORT_DESC="Asynchronous HTTP server designed for heavy loads + mail proxy."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +SUGGESTED="php perl python"
    1.12 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.13 +WEB_SITE="http://nginx.org/"
    1.14 +WGET_URL="${WEB_SITE}download//$TARBALL"
    1.15 +DEPENDS="pcre openssl zlib"
    1.16 +BUILD_DEPENDS="pcre-dev openssl-dev zlib-dev"
    1.17 +CONFIG_FILES="/etc/nginx"
    1.18 +
    1.19 +# Rules to configure and make the package.
    1.20 +compile_rules()
    1.21 +{
    1.22 +	cd $src
    1.23 +
    1.24 +#  --with-rtsig_module                enable rtsig module
    1.25 +#  --with-select_module               enable select module
    1.26 +#  --with-poll_module                 enable poll module
    1.27 +#  --with-ipv6                        enable ipv6 support
    1.28 +#  --with-http_realip_module          enable ngx_http_realip_module
    1.29 +#  --with-http_addition_module        enable ngx_http_addition_module
    1.30 +#  --with-http_xslt_module            enable ngx_http_xslt_module
    1.31 +#  --with-http_image_filter_module    enable ngx_http_image_filter_module
    1.32 +#  --with-http_geoip_module           enable ngx_http_geoip_module
    1.33 +#  --with-http_sub_module             enable ngx_http_sub_module
    1.34 +#  --with-http_random_index_module    enable ngx_http_random_index_module
    1.35 +#  --with-http_secure_link_module     enable ngx_http_secure_link_module
    1.36 +#  --with-http_perl_module            enable ngx_http_perl_module
    1.37 +#  --with-google_perftools_module     enable ngx_google_perftools_module
    1.38 +
    1.39 +	./configure --prefix=/usr \
    1.40 +		--conf-path=/etc/nginx/nginx.conf \
    1.41 +		--pid-path=/var/run/nginx.pid \
    1.42 +		--lock-path=/var/lock/nginx.lock \
    1.43 +		--error-log-path=/var/log/nginx/error.log \
    1.44 +		--http-log-path=/var/log/nginx/access.log \
    1.45 +		--http-client-body-temp-path=/var/spool/nginx/body \
    1.46 +		--http-proxy-temp-path=/var/spool/nginx/proxy \
    1.47 +		--http-fastcgi-temp-path=/var/spool/nginx/fastcgi \
    1.48 +		--with-http_stub_status_module \
    1.49 +		--with-http_flv_module \
    1.50 +		--with-http_ssl_module \
    1.51 +		--with-http_dav_module \
    1.52 +		--with-mail --with-mail_ssl_module \
    1.53 +		--user=80 --group=80 &&
    1.54 +	make &&
    1.55 +	make DESTDIR=$PWD/_pkg install
    1.56 +}
    1.57 +
    1.58 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.59 +# On SliTaz Lighttpd runs as user/group : www/www or 80/80.
    1.60 +genpkg_rules()
    1.61 +{
    1.62 +	cp -a $_pkg/* $fs/
    1.63 +	rm -rf $fs/usr/html
    1.64 +	cp -a stuff/* $fs
    1.65 +}
    1.66 +
    1.67 +# Pre and post install commands for Tazpkg.
    1.68 +# We stop the server by default in case of upgarde.
    1.69 +pre_install()
    1.70 +{
    1.71 +	echo "Processing pre-install commands..."
    1.72 +	[ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
    1.73 +	# Backup config file.
    1.74 +	if [ -d $1/$CONFIG_FILES ]; then
    1.75 +		cp -a $1/$CONFIG_FILES $1/$CONFIG_FILES.bak
    1.76 +	fi
    1.77 +}
    1.78 +post_install()
    1.79 +{
    1.80 +	echo "Processing post-install commands..."
    1.81 +	# Restore original config.
    1.82 +	if [ -d $1/$CONFIG_FILES.bak ]; then
    1.83 +		rm -rf $1/$CONFIG_FILES
    1.84 +		mv $1/$CONFIG_FILES.bak $1/$CONFIG_FILES
    1.85 +	fi
    1.86 +	# Just in case.
    1.87 +	chown www.www $1/var/log/$PACKAGE
    1.88 +	if [ -z "$1" ]; then
    1.89 +		for i in apache lighttpd ; do
    1.90 +			[ -f /etc/init.d/$i ] && /etc/init.d/$i stop
    1.91 +		done
    1.92 +		/etc/init.d/$PACKAGE start
    1.93 +	fi
    1.94 +}