wok annotate lighttpd-ssl/receipt @ rev 15858
Up: audacious-plugins to 3.4.3.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Wed Jan 29 20:11:11 2014 +0000 (2014-01-29) |
parents | 2a5cc8208d36 |
children | ade0043b3fac |
rev | line source |
---|---|
pascal@1787 | 1 # SliTaz package receipt. |
pascal@1787 | 2 |
pascal@1787 | 3 PACKAGE="lighttpd-ssl" |
pascal@15579 | 4 VERSION="1.4.33" |
pascal@1787 | 5 CATEGORY="network" |
pascal@1787 | 6 SHORT_DESC="Fast and light HTTP Web server with SSL support." |
pascal@1787 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@15379 | 8 LICENSE="BSD" |
pascal@1787 | 9 SUGGESTED="lighttpd-modules php perl python" |
pascal@1787 | 10 SOURCE="lighttpd" |
pascal@15579 | 11 TARBALL="$SOURCE-$VERSION.tar.xz" |
pascal@1787 | 12 WEB_SITE="http://www.lighttpd.net/" |
pascal@4576 | 13 WGET_URL="http://download.lighttpd.net/lighttpd/releases-1.4.x/$TARBALL" |
slaxemulator@8894 | 14 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf /etc/ssl/lighttpd" |
pascal@1787 | 15 PROVIDE="lighttpd" |
pascal@1787 | 16 BASE_MODULES=" |
pascal@1787 | 17 access |
pascal@1787 | 18 accesslog |
pascal@1787 | 19 alias |
pascal@1787 | 20 cgi |
pascal@1787 | 21 dirlisting |
pascal@1787 | 22 indexfile |
pascal@1787 | 23 staticfile |
pascal@1787 | 24 rewrite |
pascal@1787 | 25 status |
pascal@1787 | 26 userdir" |
pascal@1787 | 27 |
pascal@15379 | 28 DEPENDS="pcre openssl" |
pascal@15379 | 29 BUILD_DEPENDS="pcre-dev bzip2-dev openssl-dev" |
pascal@15379 | 30 |
pascal@1787 | 31 # Rules to configure and make the package. |
pascal@1787 | 32 compile_rules() |
pascal@1787 | 33 { |
pascal@1787 | 34 cd $src |
pascal@15579 | 35 sed -i '/addrs_left/d' src/mod_extforward.c |
pascal@1787 | 36 ./configure \ |
pascal@1787 | 37 --enable-shared \ |
pascal@1787 | 38 --disable-ipv6 \ |
pascal@1787 | 39 --with-openssl \ |
pascal@1787 | 40 --prefix=/usr \ |
pascal@1787 | 41 --libdir=/usr/lib/lighttpd \ |
pascal@1787 | 42 --mandir=/usr/share/man \ |
pascal@1787 | 43 $CONFIGURE_ARGS && |
pascal@1787 | 44 make && |
pascal@15579 | 45 make DESTDIR=$DESTDIR install |
pascal@1787 | 46 } |
pascal@1787 | 47 |
pascal@1787 | 48 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1787 | 49 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pascal@1787 | 50 genpkg_rules() |
pascal@1787 | 51 { |
pascal@1787 | 52 mkdir -p $fs/usr |
pascal@15579 | 53 #cp -a $install/usr/bin $fs/usr |
pascal@15579 | 54 cp -a $install/usr/sbin $fs/usr |
pankso@4572 | 55 |
pascal@1787 | 56 # Modules. |
pascal@1787 | 57 mkdir -p $fs/usr/lib/lighttpd |
pascal@1787 | 58 for module in $BASE_MODULES |
pascal@1787 | 59 do |
pascal@15579 | 60 cp $install/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd |
pascal@1787 | 61 echo -n "Copying : mod_${module}.so" && status |
pascal@1787 | 62 done |
pankso@4572 | 63 |
pascal@1787 | 64 # Server root and config file. |
slaxemulator@8652 | 65 cp -a $WOK/$SOURCE/stuff/var $fs |
slaxemulator@8652 | 66 cp -a $WOK/$SOURCE/stuff/etc $fs |
pascal@1787 | 67 chown -R 0.0 $fs/var/www |
pascal@1787 | 68 chown -R 0.0 $fs/etc |
pascal@1790 | 69 mkdir -p $fs/etc/ssl/lighttpd |
pascal@1790 | 70 cat >> $fs/etc/lighttpd/lighttpd.conf <<EOT |
pascal@1789 | 71 |
pascal@1789 | 72 # Enable HTTPS support |
pascal@1789 | 73 # |
pascal@1791 | 74 \$SERVER["socket"] == ":443" { |
pascal@1789 | 75 protocol = "https://" |
pascal@1789 | 76 ssl.engine = "enable" |
pascal@1789 | 77 ssl.pemfile = "/etc/ssl/lighttpd/lighttpd.pem" |
pascal@1789 | 78 } |
pascal@1789 | 79 EOT |
pankso@4572 | 80 |
pascal@1787 | 81 # Logs directory. |
pascal@1787 | 82 mkdir -p $fs/var/log/lighttpd |
pascal@1787 | 83 chown 80.80 $fs/var/log/lighttpd |
pascal@1787 | 84 } |
pascal@1787 | 85 |
pascal@1787 | 86 # Pre and post install commands for Tazpkg. |
pascal@1787 | 87 # We stop the server by default in case of upgarde. |
pascal@1787 | 88 pre_install() |
pascal@1787 | 89 { |
pascal@1787 | 90 echo "Processing pre-install commands..." |
pascal@1788 | 91 [ -f /etc/init.d/lighttpd ] && /etc/init.d/lighttpd stop |
pascal@1787 | 92 } |
pascal@1906 | 93 |
pascal@1787 | 94 post_install() |
pascal@1787 | 95 { |
pascal@1787 | 96 echo "Processing post-install commands..." |
pascal@1789 | 97 if [ ! -f $1/etc/ssl/lighttpd/lighttpd.pem ]; then |
pascal@1789 | 98 openssl req -new -x509 \ |
pascal@1789 | 99 -keyout $1/etc/ssl/lighttpd/lighttpd.pem \ |
pascal@1789 | 100 -out $1/etc/ssl/lighttpd/lighttpd.pem \ |
pascal@1906 | 101 -days 3650 -nodes <<EOT |
pascal@1789 | 102 $(. /etc/locale.conf ; echo ${LANG#*_}) |
pascal@1789 | 103 $(cat /etc/TZ) |
pascal@1789 | 104 |
pascal@1789 | 105 $(cat /etc/hostname) |
pascal@1789 | 106 |
pascal@1789 | 107 |
pascal@1789 | 108 |
pascal@1789 | 109 EOT |
pascal@1789 | 110 fi |
pascal@1787 | 111 # Just in case. |
pascal@1905 | 112 chown www.www $1/var/log/lighttpd |
pascal@1905 | 113 if [ -z "$1" ]; then |
pascal@1905 | 114 for i in apache ; do |
pascal@1905 | 115 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
pascal@1905 | 116 done |
erjo@2620 | 117 /etc/init.d/lighttpd start |
pascal@1905 | 118 fi |
pascal@1787 | 119 } |