blob: e1a8039bfffbc724cde9b5d4d909d378ebbe1c10 (
plain)
1 # Description: Tiny/Turbo/Throttling HTTP Server.
2 # URL: http://www.acme.com/software/thttpd/thttpd.html
3 # Packager: James Mills, prologic at shortcircuit dot net dot au
4 # Maintainer: Thomas Penteker, tek at serverop dot de
5 # Depends on:
6
7 name=thttpd
8 version=2.27
9 release=1
10 source=(http://www.acme.com/software/$name/$name-$version.tar.gz \
11 thttpd.rc thttpd.conf config.h.patch)
12
13 build() {
14 cd $name-$version
15 ./configure --prefix=/usr
16 patch -i $SRC/config.h.patch
17 sed -i '1i#define _POSIX_C_SOURCE 1' extras/htpasswd.c
18 make
19
20 install -d $PKG/{var/log,var/www/{cgi-bin,users}}
21
22 install -D -m755 thttpd $PKG/usr/sbin/thttpd
23 install -D -m644 thttpd.8 $PKG/usr/man/man8/thttpd.8
24 install -D -m755 ../thttpd.rc $PKG/etc/rc.d/thttpd
25 install -D -m644 ../thttpd.conf $PKG/etc/thttpd.conf
26
27 # Install 'extras'
28 install -D -m755 extras/htpasswd $PKG/usr/bin/htpasswd
29 install -D -m755 extras/htpasswd.1 $PKG/usr/man/man1/htpasswd.1
30
31 install -D -m755 extras/syslogtocern $PKG/usr/sbin/syslogtocern
32 install -D -m755 extras/syslogtocern.8 $PKG/usr/man/man8/syslogtocern.8
33
34 # Install CGI
35 install -D -m755 cgi-src/phf $PKG/var/www/cgi-bin/phf
36 install -D -m755 cgi-bin/printenv $PKG/var/www/cgi-bin/printenv
37
38 install -D -m755 cgi-src/redirect $PKG/var/www/cgi-bin/redirect
39 install -D -m755 cgi-src/redirect.8 $PKG/usr/man/man8/redirect.8
40
41 install -D -m755 cgi-src/ssi $PKG/var/www/cgi-bin/ssi
42 install -D -m755 cgi-src/ssi.8 $PKG/usr/man/man8/ssi.8
43
44 chmod 755 $PKG/var/www
45 chmod 1777 $PKG/var/www/users
46 touch $PKG/var/log/thttpd.log
47 }
|