updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / hiawatha / PKGBUILD
blob260768c3c7c2904b46a532515a9de00c9120cd7e
1 # Maintainer: Kurt Marasco <celilo _at lavabit _dot com> 
3 pkgname=hiawatha
4 pkgver=7.8.2
5 pkgrel=1
6 pkgdesc="Secure and advanced webserver"
7 url="http://www.hiawatha-webserver.org/"
8 arch=('i686' 'x86_64')
9 license=('GPL')
10 depends=('openssl' 'libxslt')
11 optdepends=('php-cgi: for php-fcgi support')
12 backup=(
13         etc/rc.d/hiawatha
14         etc/rc.d/php-fcgi
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
24 source=(
25         "http://hiawatha-webserver.org/files/${pkgname}-${pkgver}.tar.gz" 
26         'hiawatha' 
27         'php-fcgi' 
28         'hiawatha.conf.sample'
29         'cdcatalog.xml'
30         'cdcatalog.xslt'
32 md5sums=(
33         '8aff3f8c759871ea1d1ff22e98030332'
34         '351d1098f29df91362ffab3ce2a2fb0e'
35         'e23a8bc0690ba618ae737c7670683562'
36         'e5e50c0fdce0aea076b7401af5168c6f'
37         '74237747cbda94044a69382504e49685'
38         '6af9cdecf8e221be8aae3d5a20dc099f'
41 build() {
42   cd "$srcdir/${pkgname}-${pkgver}"
44   ./configure webrootdir="/srv/http/hiawatha" \
45         --prefix=/ \
46         --exec-prefix=/usr \
47         --mandir=/usr/share/man
48   make
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' \
73       -e 's|//|/|g' \
74       -i "$pkgdir/etc/hiawatha/hiawatha.conf"
76 # Fix php-fcgi.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"
89       
90 # Add startup scripts
91   install -D -m755 "$srcdir/hiawatha" "$pkgdir/etc/rc.d/hiawatha"
92   install -D -m755 "$srcdir/php-fcgi" "$pkgdir/etc/rc.d/php-fcgi"
93   
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/"