diff options
author | Gaetan Bisson | 2016-09-05 09:22:00 -1000 |
---|---|---|
committer | Gaetan Bisson | 2016-09-05 09:22:00 -1000 |
commit | 3eabda5622d9e3ede8170378d06180f7480c7e10 (patch) | |
tree | 79730f0db11e8ab3933b72ba3d1045968ead7d91 | |
download | aur-3eabda5622d9e3ede8170378d06180f7480c7e10.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 63 | ||||
-rw-r--r-- | config | 4 | ||||
-rw-r--r-- | discreet.patch | 34 | ||||
-rw-r--r-- | service | 10 |
5 files changed, 134 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..712b79e3998f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = sthttpd-git + pkgdesc = Supported fork of the thttpd web server + pkgver = 20150722.aa3f36c + pkgrel = 1 + url = https://github.com/blueness/sthttpd + arch = i686 + arch = x86_64 + license = custom:BSD + makedepends = git + provides = sthttpd + conflicts = sthttpd + backup = etc/thttpd.conf + source = git+https://github.com/blueness/sthttpd + source = discreet.patch + source = service + source = config + sha1sums = SKIP + sha1sums = ae0143fce29cf7eb84ebbee9640b9a2c977b5093 + sha1sums = 73bd76de0e89a9cc31e5605659837d83b3c8dfde + sha1sums = 7a6413491b6ba68625d450caa3c6f071af0ca1ac + +pkgname = sthttpd-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ee96c000c368 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Gaetan Bisson <bisson@archlinux.org> +# Contributor: Damir Perisa <damir.perisa@bluewin.ch> +# Contributor: Stewart Starbuck <stewart@stewartstarbuck.co.uk> + +_pkgname=sthttpd +pkgname=sthttpd-git +pkgver=20150722.aa3f36c +pkgrel=1 +pkgdesc='Supported fork of the thttpd web server' +url='https://github.com/blueness/sthttpd' +license=('custom:BSD') +arch=('i686' 'x86_64') +backup=('etc/thttpd.conf') +makedepends=('git') +source=('git+https://github.com/blueness/sthttpd' + 'discreet.patch' + 'service' + 'config') +sha1sums=('SKIP' + 'ae0143fce29cf7eb84ebbee9640b9a2c977b5093' + '73bd76de0e89a9cc31e5605659837d83b3c8dfde' + '7a6413491b6ba68625d450caa3c6f071af0ca1ac') + +provides=("${_pkgname}") +conflicts=("${_pkgname}") + +pkgver() { + cd "${srcdir}/${_pkgname}" + git log -1 --format='%cd.%h' --date=short | tr -d - +} + +prepare() { + cd "${srcdir}/${_pkgname}" + ./autogen.sh + patch -p1 -i ../discreet.patch + sed '/DEFAULT_CHARSET/c #define DEFAULT_CHARSET "utf-8"' -i src/thttpd.h +} + +build() { + cd "${srcdir}/${_pkgname}" + export WEBDIR=/srv/http + export WEBGROUP=http + ./configure \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --mandir=/usr/share/man \ + + make +} + +package() { + cd "${srcdir}/${_pkgname}" + make DESTDIR="${pkgdir}" install + rm -fr "${pkgdir}"/srv + + install -Dm644 ../config "${pkgdir}"/etc/thttpd.conf + install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/thttpd.service + install -Dm644 README.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + + # Avoid conflicts with Apache + mv "${pkgdir}"/usr/bin/htpasswd{,-thttpd} + mv "${pkgdir}"/usr/share/man/man1/htpasswd{,-thttpd}.1 +} diff --git a/config b/config new file mode 100644 index 000000000000..1f0ea0687529 --- /dev/null +++ b/config @@ -0,0 +1,4 @@ +dir=/srv/http +vhost +user=http +cgipat=**.cgi diff --git a/discreet.patch b/discreet.patch new file mode 100644 index 000000000000..6131851ad47f --- /dev/null +++ b/discreet.patch @@ -0,0 +1,34 @@ +diff -Naur old/src/libhttpd.c new/src/libhttpd.c +--- old/src/libhttpd.c 2014-10-04 03:43:00.000000000 +0900 ++++ new/src/libhttpd.c 2015-08-14 17:15:30.081099286 +0900 +@@ -738,7 +738,7 @@ + (void) my_snprintf( buf, sizeof(buf), "\ + <HTML>\n\ + <HEAD><TITLE>%d %s</TITLE></HEAD>\n\ +-<BODY BGCOLOR=\"#cc9999\" TEXT=\"#000000\" LINK=\"#2020ff\" VLINK=\"#4040cc\">\n\ ++<BODY>\n\ + <H2>%d %s</H2>\n", + status, title, status, title ); + add_response( hc, buf ); +@@ -763,11 +763,8 @@ + char buf[1000]; + + (void) my_snprintf( buf, sizeof(buf), "\ +-<HR>\n\ +-<ADDRESS><A HREF=\"%s\">%s</A></ADDRESS>\n\ + </BODY>\n\ +-</HTML>\n", +- SERVER_ADDRESS, EXPOSED_SERVER_SOFTWARE ); ++</HTML>\n" ); + add_response( hc, buf ); + } + +@@ -2768,7 +2765,7 @@ + (void) fprintf( fp, "\ + <HTML>\n\ + <HEAD><TITLE>Index of %.80s</TITLE></HEAD>\n\ +-<BODY BGCOLOR=\"#99cc99\" TEXT=\"#000000\" LINK=\"#2020ff\" VLINK=\"#4040cc\">\n\ ++<BODY>\n\ + <H2>Index of %.80s</H2>\n\ + <PRE>\n\ + mode links bytes last-changed name\n\ diff --git a/service b/service new file mode 100644 index 000000000000..2b40115baeb2 --- /dev/null +++ b/service @@ -0,0 +1,10 @@ +[Unit] +Description=Tiny HTTP Daemon + +[Service] +PIDFile=/run/thttpd.pid +ExecStart=/usr/bin/thttpd -D -C /etc/thttpd.conf +Restart=always + +[Install] +WantedBy=multi-user.target |