1 # Maintainer: Kurt Marasco <celilo _at lavabit _dot com>
6 pkgdesc="Secure and advanced webserver"
7 url="http://www.hiawatha-webserver.org/"
10 depends=('openssl' 'libxslt')
11 optdepends=('php-cgi: for php-fcgi support')
15 etc/hiawatha/hiawatha.conf
16 etc/hiawatha/hiawatha.conf.sample
17 etc/hiawatha/php-fcgi.conf
18 etc/hiawatha/cgi-wrapper.conf
19 etc/hiawatha/mimetype.conf
20 srv/http/hiawatha/cdcatalog.xml
21 srv/http/hiawatha/cdcatalog.xslt
25 "http://hiawatha-webserver.org/files/${pkgname}-${pkgver}.tar.gz"
28 'hiawatha.conf.sample'
33 '8aff3f8c759871ea1d1ff22e98030332'
34 '351d1098f29df91362ffab3ce2a2fb0e'
35 'e23a8bc0690ba618ae737c7670683562'
36 'e5e50c0fdce0aea076b7401af5168c6f'
37 '74237747cbda94044a69382504e49685'
38 '6af9cdecf8e221be8aae3d5a20dc099f'
42 cd "$srcdir/${pkgname}-${pkgver}"
44 ./configure webrootdir="/srv/http/hiawatha" \
47 --mandir=/usr/share/man
49 make DESTDIR="$pkgdir" install
51 # The default capabilities are installed plus xslt support
52 # The following build options are available to customize your installation:
53 #option description required libraries when feature enabled
54 #--disable-dependency-tracking speeds up one-time build
55 #--enable-dependency-tracking do not reject slow dependency extractors
56 #--disable-largefile disable support for large files
57 #--disable-cache disable file caching
58 #--enable-chroot enable chroot support
59 #--enable-command enable CommandChannel
60 #--enable-debug enable debug info (for development only)
61 #--disable-ipv6 disable IPv6 support
62 #--disable-monitor disable monitor
63 #--disable-ssl disable SSL support libssl-dev
64 #--disable-toolkit disable URL toolkit
65 #--disable-xslt enable XSLT support libxml2-dev, libxslt1-dev
66 # modify the above ./configure command to customize
70 # Fix hiawatha.conf (formerly httpd.conf)
71 sed -e 's|#ServerId = www-data|ServerId = http|' \
72 -e 's|/var/www/|/srv/http/|g' \
74 -i "$pkgdir/etc/hiawatha/hiawatha.conf"
77 sed -e 's|www-data|http|'\
78 -e 's|/usr/bin/php5-cgi|/usr/bin/php-cgi|'\
79 -e 's|/etc/php5/cgi/php.ini|/etc/php/cgi/php.ini|'\
80 -i "$pkgdir/etc/hiawatha/php-fcgi.conf"
81 echo "#unix socket example" >> "$pkgdir/etc/hiawatha/php-fcgi.conf"
82 echo "#Server = /usr/bin/php-cgi ; /tmp/hiawatha.sock ; http:http ; /etc/php/php.ini" >> "$pkgdir/etc/hiawatha/php-fcgi.conf"
83 echo "Server = /usr/bin/php-cgi ; 127.0.0.1:2005 ; http:http ; /etc/php/php.ini" >> "$pkgdir/etc/hiawatha/php-fcgi.conf"
85 # Fix hiawatha logrotate file (/etc/logrotate.d/hiawatha)
86 sed -e 's|www-data|http|g' -i "$srcdir/$pkgname-$pkgver/etc/logrotate.d/hiawatha"
87 mkdir "$pkgdir/etc/logrotate.d"
88 install -m644 "$srcdir/$pkgname-$pkgver/etc/logrotate.d/hiawatha" "$pkgdir/etc/logrotate.d/hiawatha"
91 install -D -m755 "$srcdir/hiawatha" "$pkgdir/etc/rc.d/hiawatha"
92 install -D -m755 "$srcdir/php-fcgi" "$pkgdir/etc/rc.d/php-fcgi"
94 # Install sample configuration implementing a virtual server for phpmyadmin, php-fastcgi, and a default website on localhost
95 install -m644 "$srcdir/hiawatha.conf.sample" "$pkgdir/etc/hiawatha/"
97 # Install sample XSLT transformation on default website on localhost
98 install -m644 "$srcdir/cdcatalog.xml" "$pkgdir/srv/http/hiawatha/"
99 install -m644 "$srcdir/cdcatalog.xslt" "$pkgdir/srv/http/hiawatha/"