2006-11-20 07:26:53 +10:00
|
|
|
# Description: Tiny/Turbo/Throttling HTTP Server.
|
|
|
|
# URL: http://www.acme.com/software/thttpd/thttpd.html
|
2008-03-05 04:26:59 +01:00
|
|
|
# Maintainer: Thomas Penteker, tek at serverop dot de
|
2020-01-20 15:35:24 +00:00
|
|
|
# Depends on:
|
2006-11-14 09:01:22 +10:00
|
|
|
|
|
|
|
name=thttpd
|
2019-01-07 21:50:12 +01:00
|
|
|
version=2.29
|
2020-01-20 15:35:24 +00:00
|
|
|
release=2
|
|
|
|
source=(https://www.acme.com/software/$name/$name-$version.tar.gz \
|
2006-11-20 07:26:53 +10:00
|
|
|
thttpd.rc thttpd.conf config.h.patch)
|
2006-11-14 09:01:22 +10:00
|
|
|
|
|
|
|
build() {
|
2006-11-20 07:26:53 +10:00
|
|
|
cd $name-$version
|
|
|
|
./configure --prefix=/usr
|
|
|
|
patch -i $SRC/config.h.patch
|
2011-08-19 16:59:14 +02:00
|
|
|
sed -i '1i#define _POSIX_C_SOURCE 1' extras/htpasswd.c
|
2006-11-20 07:26:53 +10:00
|
|
|
make
|
|
|
|
|
2008-11-27 19:30:46 +01:00
|
|
|
install -d $PKG/{var/log,var/www/{cgi-bin,users}}
|
2020-01-20 15:35:24 +00:00
|
|
|
|
2006-11-20 07:26:53 +10:00
|
|
|
install -D -m755 thttpd $PKG/usr/sbin/thttpd
|
2020-01-20 15:35:24 +00:00
|
|
|
install -D -m644 thttpd.8 $PKG/usr/share/man/man8/thttpd.8
|
2006-11-20 07:26:53 +10:00
|
|
|
install -D -m755 ../thttpd.rc $PKG/etc/rc.d/thttpd
|
|
|
|
install -D -m644 ../thttpd.conf $PKG/etc/thttpd.conf
|
|
|
|
|
|
|
|
# Install 'extras'
|
|
|
|
install -D -m755 extras/htpasswd $PKG/usr/bin/htpasswd
|
2020-01-20 15:35:24 +00:00
|
|
|
install -D -m755 extras/htpasswd.1 $PKG/usr/share/man/man1/htpasswd.1
|
2006-11-20 07:26:53 +10:00
|
|
|
|
|
|
|
install -D -m755 extras/syslogtocern $PKG/usr/sbin/syslogtocern
|
2020-01-20 15:35:24 +00:00
|
|
|
install -D -m755 extras/syslogtocern.8 $PKG/usr/share/man/man8/syslogtocern.8
|
2006-11-20 07:26:53 +10:00
|
|
|
|
|
|
|
# Install CGI
|
2008-11-27 19:30:46 +01:00
|
|
|
install -D -m755 cgi-src/phf $PKG/var/www/cgi-bin/phf
|
|
|
|
install -D -m755 cgi-bin/printenv $PKG/var/www/cgi-bin/printenv
|
2006-11-20 07:26:53 +10:00
|
|
|
|
2008-11-27 19:30:46 +01:00
|
|
|
install -D -m755 cgi-src/redirect $PKG/var/www/cgi-bin/redirect
|
2020-01-20 15:35:24 +00:00
|
|
|
install -D -m755 cgi-src/redirect.8 $PKG/usr/share/man/man8/redirect.8
|
2006-11-20 07:26:53 +10:00
|
|
|
|
2008-11-27 19:30:46 +01:00
|
|
|
install -D -m755 cgi-src/ssi $PKG/var/www/cgi-bin/ssi
|
2020-01-20 15:35:24 +00:00
|
|
|
install -D -m755 cgi-src/ssi.8 $PKG/usr/share/man/man8/ssi.8
|
2006-11-20 07:26:53 +10:00
|
|
|
|
2008-11-27 19:30:46 +01:00
|
|
|
chmod 755 $PKG/var/www
|
|
|
|
chmod 1777 $PKG/var/www/users
|
2006-11-20 07:26:53 +10:00
|
|
|
touch $PKG/var/log/thttpd.log
|
2006-11-14 09:01:22 +10:00
|
|
|
}
|
|
|
|
|