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