[arch-commits] Commit in thttpd/repos (24 files)

Gaetan Bisson bisson at archlinux.org
Sat Jun 13 19:45:48 UTC 2015


    Date: Saturday, June 13, 2015 @ 21:45:48
  Author: bisson
Revision: 135281

archrelease: copy trunk to community-i686, community-x86_64

Added:
  thttpd/repos/community-i686/PKGBUILD
    (from rev 135280, thttpd/trunk/PKGBUILD)
  thttpd/repos/community-i686/config
    (from rev 135280, thttpd/trunk/config)
  thttpd/repos/community-i686/crypt.patch
    (from rev 135280, thttpd/trunk/crypt.patch)
  thttpd/repos/community-i686/discreet.patch
    (from rev 135280, thttpd/trunk/discreet.patch)
  thttpd/repos/community-i686/forwarded-for.patch
    (from rev 135280, thttpd/trunk/forwarded-for.patch)
  thttpd/repos/community-i686/service
    (from rev 135280, thttpd/trunk/service)
  thttpd/repos/community-x86_64/PKGBUILD
    (from rev 135280, thttpd/trunk/PKGBUILD)
  thttpd/repos/community-x86_64/config
    (from rev 135280, thttpd/trunk/config)
  thttpd/repos/community-x86_64/crypt.patch
    (from rev 135280, thttpd/trunk/crypt.patch)
  thttpd/repos/community-x86_64/discreet.patch
    (from rev 135280, thttpd/trunk/discreet.patch)
  thttpd/repos/community-x86_64/forwarded-for.patch
    (from rev 135280, thttpd/trunk/forwarded-for.patch)
  thttpd/repos/community-x86_64/service
    (from rev 135280, thttpd/trunk/service)
Deleted:
  thttpd/repos/community-i686/PKGBUILD
  thttpd/repos/community-i686/config
  thttpd/repos/community-i686/crypt.patch
  thttpd/repos/community-i686/discreet.patch
  thttpd/repos/community-i686/forwarded-for.patch
  thttpd/repos/community-i686/service
  thttpd/repos/community-x86_64/PKGBUILD
  thttpd/repos/community-x86_64/config
  thttpd/repos/community-x86_64/crypt.patch
  thttpd/repos/community-x86_64/discreet.patch
  thttpd/repos/community-x86_64/forwarded-for.patch
  thttpd/repos/community-x86_64/service

--------------------------------------+
 /PKGBUILD                            |  146 +++++++++++++++++++++++++++++++++
 /config                              |    8 +
 /crypt.patch                         |   48 ++++++++++
 /discreet.patch                      |   74 ++++++++++++++++
 /forwarded-for.patch                 |   32 +++++++
 /service                             |   20 ++++
 community-i686/PKGBUILD              |   73 ----------------
 community-i686/config                |    4 
 community-i686/crypt.patch           |   24 -----
 community-i686/discreet.patch        |   37 --------
 community-i686/forwarded-for.patch   |   16 ---
 community-i686/service               |   10 --
 community-x86_64/PKGBUILD            |   73 ----------------
 community-x86_64/config              |    4 
 community-x86_64/crypt.patch         |   24 -----
 community-x86_64/discreet.patch      |   37 --------
 community-x86_64/forwarded-for.patch |   16 ---
 community-x86_64/service             |   10 --
 18 files changed, 328 insertions(+), 328 deletions(-)

Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD	2015-06-13 19:44:48 UTC (rev 135280)
+++ community-i686/PKGBUILD	2015-06-13 19:45:48 UTC (rev 135281)
@@ -1,73 +0,0 @@
-# $Id$
-# Maintainer: Gaetan Bisson <bisson at archlinux.org>
-# Contributor: Damir Perisa <damir.perisa at bluewin.ch>
-# Contributor: Stewart Starbuck <stewart at stewartstarbuck.co.uk>
-
-pkgname=thttpd
-pkgver=2.26
-pkgrel=4
-pkgdesc='Simple, small, portable, fast, and secure HTTP server'
-url='http://www.acme.com/software/thttpd/'
-license=('custom:BSD')
-arch=('i686' 'x86_64')
-backup=('etc/thttpd.conf')
-source=("http://www.acme.com/software/thttpd/${pkgname}-${pkgver}.tar.gz"
-        'forwarded-for.patch'
-        'discreet.patch'
-        'crypt.patch'
-        'service'
-        'config')
-sha1sums=('6acdc827203ab5878743cf0efee818d796ff740e'
-          '1293fbaf83a489c65d6d2b107d797c687233d96a'
-          'b954028d4360ad856f7fb1edc8534f0652f33d20'
-          '603007a9292e84eea864b9ffb3bdf34c7e4dd8c9'
-          '73bd76de0e89a9cc31e5605659837d83b3c8dfde'
-          '7a6413491b6ba68625d450caa3c6f071af0ca1ac')
-
-prepare() {
-	cd "${srcdir}/${pkgname}-${pkgver}"
-	patch -p1 -i ../forwarded-for.patch
-	patch -p1 -i ../discreet.patch
-	patch -p1 -i ../crypt.patch
-	sed \
-		-e 's/^CFLAGS =/CFLAGS +=/' \
-		-e '/^STATICFLAG =/c STATICFLAG =' \
-		-i {*/,}Makefile.in
-}
-
-build() {
-	cd "${srcdir}/${pkgname}-${pkgver}"
-
-	# ./configure messes up DEFS when FORTIFY_SOURCE=1
-	CPPFLAGS= ./configure \
-		--prefix=/usr \
-		--mandir=/usr/share/man \
-
-	CFLAGS+=" $CPPFLAGS"
-	make
-}
-
-package() {
-	cd "${srcdir}/${pkgname}-${pkgver}"
-	install -d "${pkgdir}"/usr/share/man/man1
-	make \
-		BINDIR="${pkgdir}"/usr/bin \
-		WEBDIR="${pkgdir}"/srv/http \
-		MANDIR="${pkgdir}"/usr/share/man \
-		WEBGROUP=root \
-		install
-
-	rm -fr "${pkgdir}"/srv
-	chown root:root -R "${pkgdir}"
-	chmod 755 -R "${pkgdir}"/usr/bin # strip needs u+w
-
-	install -Dm644 ../config "${pkgdir}"/etc/thttpd.conf
-	install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/thttpd.service
-
-	install -d "${pkgdir}"/usr/share/licenses/"${pkgname}"
-	head -n 26 thttpd.c > "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
-
-	# conflicts with apache
-	mv "${pkgdir}"/usr/bin/htpasswd{,-thttpd}
-	mv "${pkgdir}"/usr/share/man/man1/htpasswd{,-thttpd}.1
-}

Copied: thttpd/repos/community-i686/PKGBUILD (from rev 135280, thttpd/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD	                        (rev 0)
+++ community-i686/PKGBUILD	2015-06-13 19:45:48 UTC (rev 135281)
@@ -0,0 +1,73 @@
+# $Id$
+# Maintainer: Gaetan Bisson <bisson at archlinux.org>
+# Contributor: Damir Perisa <damir.perisa at bluewin.ch>
+# Contributor: Stewart Starbuck <stewart at stewartstarbuck.co.uk>
+
+pkgname=thttpd
+pkgver=2.26
+pkgrel=5
+pkgdesc='Simple, small, portable, fast, and secure HTTP server'
+url='http://www.acme.com/software/thttpd/'
+license=('custom:BSD')
+arch=('i686' 'x86_64')
+backup=('etc/thttpd.conf')
+source=("http://www.acme.com/software/thttpd/${pkgname}-${pkgver}.tar.gz"
+        'forwarded-for.patch'
+        'discreet.patch'
+        'crypt.patch'
+        'service'
+        'config')
+sha1sums=('9b943aeeab9ef92dfd60595649cbe9cf7394968c'
+          '1293fbaf83a489c65d6d2b107d797c687233d96a'
+          'b954028d4360ad856f7fb1edc8534f0652f33d20'
+          '603007a9292e84eea864b9ffb3bdf34c7e4dd8c9'
+          '73bd76de0e89a9cc31e5605659837d83b3c8dfde'
+          '7a6413491b6ba68625d450caa3c6f071af0ca1ac')
+
+prepare() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	patch -p1 -i ../forwarded-for.patch
+	patch -p1 -i ../discreet.patch
+	patch -p1 -i ../crypt.patch
+	sed \
+		-e 's/^CFLAGS =/CFLAGS +=/' \
+		-e '/^STATICFLAG =/c STATICFLAG =' \
+		-i {*/,}Makefile.in
+}
+
+build() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+
+	# ./configure messes up DEFS when FORTIFY_SOURCE=1
+	CPPFLAGS= ./configure \
+		--prefix=/usr \
+		--mandir=/usr/share/man \
+
+	CFLAGS+=" $CPPFLAGS"
+	make
+}
+
+package() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	install -d "${pkgdir}"/usr/share/man/man1
+	make \
+		BINDIR="${pkgdir}"/usr/bin \
+		WEBDIR="${pkgdir}"/srv/http \
+		MANDIR="${pkgdir}"/usr/share/man \
+		WEBGROUP=root \
+		install
+
+	rm -fr "${pkgdir}"/srv
+	chown root:root -R "${pkgdir}"
+	chmod 755 -R "${pkgdir}"/usr/bin # strip needs u+w
+
+	install -Dm644 ../config "${pkgdir}"/etc/thttpd.conf
+	install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/thttpd.service
+
+	install -d "${pkgdir}"/usr/share/licenses/"${pkgname}"
+	head -n 26 thttpd.c > "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
+
+	# conflicts with apache
+	mv "${pkgdir}"/usr/bin/htpasswd{,-thttpd}
+	mv "${pkgdir}"/usr/share/man/man1/htpasswd{,-thttpd}.1
+}

Deleted: community-i686/config
===================================================================
--- community-i686/config	2015-06-13 19:44:48 UTC (rev 135280)
+++ community-i686/config	2015-06-13 19:45:48 UTC (rev 135281)
@@ -1,4 +0,0 @@
-dir=/srv/http
-vhost
-user=http
-cgipat=**.cgi

Copied: thttpd/repos/community-i686/config (from rev 135280, thttpd/trunk/config)
===================================================================
--- community-i686/config	                        (rev 0)
+++ community-i686/config	2015-06-13 19:45:48 UTC (rev 135281)
@@ -0,0 +1,4 @@
+dir=/srv/http
+vhost
+user=http
+cgipat=**.cgi

Deleted: community-i686/crypt.patch
===================================================================
--- community-i686/crypt.patch	2015-06-13 19:44:48 UTC (rev 135280)
+++ community-i686/crypt.patch	2015-06-13 19:45:48 UTC (rev 135281)
@@ -1,24 +0,0 @@
-diff -Naur old/extras/htpasswd.c new/extras/htpasswd.c
---- old/extras/htpasswd.c	2014-10-19 10:28:39.782856897 -1000
-+++ new/extras/htpasswd.c	2014-10-19 10:29:12.842911168 -1000
-@@ -8,6 +8,8 @@
- ** if stdin is a pipe or file.  This is necessary for use from CGI.
- */
- 
-+#define _XOPEN_SOURCE
-+
- #include <sys/types.h>
- #include <stdio.h>
- #include <string.h>
-diff -Naur old/libhttpd.c new/libhttpd.c
---- old/libhttpd.c	2014-10-19 10:28:39.782856897 -1000
-+++ new/libhttpd.c	2014-10-19 10:29:01.679559501 -1000
-@@ -39,6 +39,8 @@
- #include <sys/param.h>
- #include <sys/stat.h>
- 
-+#define __USE_XOPEN
-+
- #include <ctype.h>
- #include <errno.h>
- #include <fcntl.h>

Copied: thttpd/repos/community-i686/crypt.patch (from rev 135280, thttpd/trunk/crypt.patch)
===================================================================
--- community-i686/crypt.patch	                        (rev 0)
+++ community-i686/crypt.patch	2015-06-13 19:45:48 UTC (rev 135281)
@@ -0,0 +1,24 @@
+diff -Naur old/extras/htpasswd.c new/extras/htpasswd.c
+--- old/extras/htpasswd.c	2014-10-19 10:28:39.782856897 -1000
++++ new/extras/htpasswd.c	2014-10-19 10:29:12.842911168 -1000
+@@ -8,6 +8,8 @@
+ ** if stdin is a pipe or file.  This is necessary for use from CGI.
+ */
+ 
++#define _XOPEN_SOURCE
++
+ #include <sys/types.h>
+ #include <stdio.h>
+ #include <string.h>
+diff -Naur old/libhttpd.c new/libhttpd.c
+--- old/libhttpd.c	2014-10-19 10:28:39.782856897 -1000
++++ new/libhttpd.c	2014-10-19 10:29:01.679559501 -1000
+@@ -39,6 +39,8 @@
+ #include <sys/param.h>
+ #include <sys/stat.h>
+ 
++#define __USE_XOPEN
++
+ #include <ctype.h>
+ #include <errno.h>
+ #include <fcntl.h>

Deleted: community-i686/discreet.patch
===================================================================
--- community-i686/discreet.patch	2015-06-13 19:44:48 UTC (rev 135280)
+++ community-i686/discreet.patch	2015-06-13 19:45:48 UTC (rev 135281)
@@ -1,37 +0,0 @@
-diff -Naur old/libhttpd.c new/libhttpd.c
---- old/libhttpd.c	2014-08-15 11:32:31.040595413 +0900
-+++ new/libhttpd.c	2014-08-15 11:34:57.690595931 +0900
-@@ -754,7 +754,7 @@
-     <title>%d %s</title>\n\
-   </head>\n\
- \n\
--  <body bgcolor=\"#cc9999\" text=\"#000000\" link=\"#2020ff\" vlink=\"#4040cc\">\n\
-+  <body>\n\
- \n\
-     <h2>%d %s</h2>\n",
- 	status, title, status, title );
-@@ -780,14 +780,9 @@
-     char buf[1000];
- 
-     (void) my_snprintf( buf, sizeof(buf), "\
--    <hr>\n\
--\n\
--    <address><a href=\"%s\">%s</a></address>\n\
--\n\
-   </body>\n\
- \n\
--</html>\n",
--	SERVER_ADDRESS, EXPOSED_SERVER_SOFTWARE );
-+</html>\n" );
-     add_response( hc, buf );
-     }
- 
-@@ -2798,7 +2793,7 @@
-     <title>Index of %.80s</title>\n\
-   </head>\n\
- \n\
--  <body bgcolor=\"#99cc99\" text=\"#000000\" link=\"#2020ff\" vlink=\"#4040cc\">\n\
-+  <body>\n\
- \n\
-     <h2>Index of %.80s</h2>\n\
- \n\

Copied: thttpd/repos/community-i686/discreet.patch (from rev 135280, thttpd/trunk/discreet.patch)
===================================================================
--- community-i686/discreet.patch	                        (rev 0)
+++ community-i686/discreet.patch	2015-06-13 19:45:48 UTC (rev 135281)
@@ -0,0 +1,37 @@
+diff -Naur old/libhttpd.c new/libhttpd.c
+--- old/libhttpd.c	2014-08-15 11:32:31.040595413 +0900
++++ new/libhttpd.c	2014-08-15 11:34:57.690595931 +0900
+@@ -754,7 +754,7 @@
+     <title>%d %s</title>\n\
+   </head>\n\
+ \n\
+-  <body bgcolor=\"#cc9999\" text=\"#000000\" link=\"#2020ff\" vlink=\"#4040cc\">\n\
++  <body>\n\
+ \n\
+     <h2>%d %s</h2>\n",
+ 	status, title, status, title );
+@@ -780,14 +780,9 @@
+     char buf[1000];
+ 
+     (void) my_snprintf( buf, sizeof(buf), "\
+-    <hr>\n\
+-\n\
+-    <address><a href=\"%s\">%s</a></address>\n\
+-\n\
+   </body>\n\
+ \n\
+-</html>\n",
+-	SERVER_ADDRESS, EXPOSED_SERVER_SOFTWARE );
++</html>\n" );
+     add_response( hc, buf );
+     }
+ 
+@@ -2798,7 +2793,7 @@
+     <title>Index of %.80s</title>\n\
+   </head>\n\
+ \n\
+-  <body bgcolor=\"#99cc99\" text=\"#000000\" link=\"#2020ff\" vlink=\"#4040cc\">\n\
++  <body>\n\
+ \n\
+     <h2>Index of %.80s</h2>\n\
+ \n\

Deleted: community-i686/forwarded-for.patch
===================================================================
--- community-i686/forwarded-for.patch	2015-06-13 19:44:48 UTC (rev 135280)
+++ community-i686/forwarded-for.patch	2015-06-13 19:45:48 UTC (rev 135281)
@@ -1,16 +0,0 @@
-diff -Naur old/libhttpd.c new/libhttpd.c
---- old/libhttpd.c	2005-06-30 03:50:39.000000000 +1000
-+++ new/libhttpd.c	2012-10-24 12:12:17.144560917 +1100
-@@ -2207,6 +2207,12 @@
- 		if ( strcasecmp( cp, "keep-alive" ) == 0 )
- 		    hc->keep_alive = 1;
- 		}
-+	    else if ( strncasecmp( buf, "X-Forwarded-For:", 16 ) == 0 )
-+		{
-+		cp = &buf[16];
-+		cp += strspn( cp, " \t" );
-+		inet_aton( cp, &(hc->client_addr.sa_in.sin_addr) );
-+		}
- #ifdef LOG_UNKNOWN_HEADERS
- 	    else if ( strncasecmp( buf, "Accept-Charset:", 15 ) == 0 ||
- 		      strncasecmp( buf, "Accept-Language:", 16 ) == 0 ||

Copied: thttpd/repos/community-i686/forwarded-for.patch (from rev 135280, thttpd/trunk/forwarded-for.patch)
===================================================================
--- community-i686/forwarded-for.patch	                        (rev 0)
+++ community-i686/forwarded-for.patch	2015-06-13 19:45:48 UTC (rev 135281)
@@ -0,0 +1,16 @@
+diff -Naur old/libhttpd.c new/libhttpd.c
+--- old/libhttpd.c	2005-06-30 03:50:39.000000000 +1000
++++ new/libhttpd.c	2012-10-24 12:12:17.144560917 +1100
+@@ -2207,6 +2207,12 @@
+ 		if ( strcasecmp( cp, "keep-alive" ) == 0 )
+ 		    hc->keep_alive = 1;
+ 		}
++	    else if ( strncasecmp( buf, "X-Forwarded-For:", 16 ) == 0 )
++		{
++		cp = &buf[16];
++		cp += strspn( cp, " \t" );
++		inet_aton( cp, &(hc->client_addr.sa_in.sin_addr) );
++		}
+ #ifdef LOG_UNKNOWN_HEADERS
+ 	    else if ( strncasecmp( buf, "Accept-Charset:", 15 ) == 0 ||
+ 		      strncasecmp( buf, "Accept-Language:", 16 ) == 0 ||

Deleted: community-i686/service
===================================================================
--- community-i686/service	2015-06-13 19:44:48 UTC (rev 135280)
+++ community-i686/service	2015-06-13 19:45:48 UTC (rev 135281)
@@ -1,10 +0,0 @@
-[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

Copied: thttpd/repos/community-i686/service (from rev 135280, thttpd/trunk/service)
===================================================================
--- community-i686/service	                        (rev 0)
+++ community-i686/service	2015-06-13 19:45:48 UTC (rev 135281)
@@ -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

Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD	2015-06-13 19:44:48 UTC (rev 135280)
+++ community-x86_64/PKGBUILD	2015-06-13 19:45:48 UTC (rev 135281)
@@ -1,73 +0,0 @@
-# $Id$
-# Maintainer: Gaetan Bisson <bisson at archlinux.org>
-# Contributor: Damir Perisa <damir.perisa at bluewin.ch>
-# Contributor: Stewart Starbuck <stewart at stewartstarbuck.co.uk>
-
-pkgname=thttpd
-pkgver=2.26
-pkgrel=4
-pkgdesc='Simple, small, portable, fast, and secure HTTP server'
-url='http://www.acme.com/software/thttpd/'
-license=('custom:BSD')
-arch=('i686' 'x86_64')
-backup=('etc/thttpd.conf')
-source=("http://www.acme.com/software/thttpd/${pkgname}-${pkgver}.tar.gz"
-        'forwarded-for.patch'
-        'discreet.patch'
-        'crypt.patch'
-        'service'
-        'config')
-sha1sums=('6acdc827203ab5878743cf0efee818d796ff740e'
-          '1293fbaf83a489c65d6d2b107d797c687233d96a'
-          'b954028d4360ad856f7fb1edc8534f0652f33d20'
-          '603007a9292e84eea864b9ffb3bdf34c7e4dd8c9'
-          '73bd76de0e89a9cc31e5605659837d83b3c8dfde'
-          '7a6413491b6ba68625d450caa3c6f071af0ca1ac')
-
-prepare() {
-	cd "${srcdir}/${pkgname}-${pkgver}"
-	patch -p1 -i ../forwarded-for.patch
-	patch -p1 -i ../discreet.patch
-	patch -p1 -i ../crypt.patch
-	sed \
-		-e 's/^CFLAGS =/CFLAGS +=/' \
-		-e '/^STATICFLAG =/c STATICFLAG =' \
-		-i {*/,}Makefile.in
-}
-
-build() {
-	cd "${srcdir}/${pkgname}-${pkgver}"
-
-	# ./configure messes up DEFS when FORTIFY_SOURCE=1
-	CPPFLAGS= ./configure \
-		--prefix=/usr \
-		--mandir=/usr/share/man \
-
-	CFLAGS+=" $CPPFLAGS"
-	make
-}
-
-package() {
-	cd "${srcdir}/${pkgname}-${pkgver}"
-	install -d "${pkgdir}"/usr/share/man/man1
-	make \
-		BINDIR="${pkgdir}"/usr/bin \
-		WEBDIR="${pkgdir}"/srv/http \
-		MANDIR="${pkgdir}"/usr/share/man \
-		WEBGROUP=root \
-		install
-
-	rm -fr "${pkgdir}"/srv
-	chown root:root -R "${pkgdir}"
-	chmod 755 -R "${pkgdir}"/usr/bin # strip needs u+w
-
-	install -Dm644 ../config "${pkgdir}"/etc/thttpd.conf
-	install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/thttpd.service
-
-	install -d "${pkgdir}"/usr/share/licenses/"${pkgname}"
-	head -n 26 thttpd.c > "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
-
-	# conflicts with apache
-	mv "${pkgdir}"/usr/bin/htpasswd{,-thttpd}
-	mv "${pkgdir}"/usr/share/man/man1/htpasswd{,-thttpd}.1
-}

Copied: thttpd/repos/community-x86_64/PKGBUILD (from rev 135280, thttpd/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2015-06-13 19:45:48 UTC (rev 135281)
@@ -0,0 +1,73 @@
+# $Id$
+# Maintainer: Gaetan Bisson <bisson at archlinux.org>
+# Contributor: Damir Perisa <damir.perisa at bluewin.ch>
+# Contributor: Stewart Starbuck <stewart at stewartstarbuck.co.uk>
+
+pkgname=thttpd
+pkgver=2.26
+pkgrel=5
+pkgdesc='Simple, small, portable, fast, and secure HTTP server'
+url='http://www.acme.com/software/thttpd/'
+license=('custom:BSD')
+arch=('i686' 'x86_64')
+backup=('etc/thttpd.conf')
+source=("http://www.acme.com/software/thttpd/${pkgname}-${pkgver}.tar.gz"
+        'forwarded-for.patch'
+        'discreet.patch'
+        'crypt.patch'
+        'service'
+        'config')
+sha1sums=('9b943aeeab9ef92dfd60595649cbe9cf7394968c'
+          '1293fbaf83a489c65d6d2b107d797c687233d96a'
+          'b954028d4360ad856f7fb1edc8534f0652f33d20'
+          '603007a9292e84eea864b9ffb3bdf34c7e4dd8c9'
+          '73bd76de0e89a9cc31e5605659837d83b3c8dfde'
+          '7a6413491b6ba68625d450caa3c6f071af0ca1ac')
+
+prepare() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	patch -p1 -i ../forwarded-for.patch
+	patch -p1 -i ../discreet.patch
+	patch -p1 -i ../crypt.patch
+	sed \
+		-e 's/^CFLAGS =/CFLAGS +=/' \
+		-e '/^STATICFLAG =/c STATICFLAG =' \
+		-i {*/,}Makefile.in
+}
+
+build() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+
+	# ./configure messes up DEFS when FORTIFY_SOURCE=1
+	CPPFLAGS= ./configure \
+		--prefix=/usr \
+		--mandir=/usr/share/man \
+
+	CFLAGS+=" $CPPFLAGS"
+	make
+}
+
+package() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+	install -d "${pkgdir}"/usr/share/man/man1
+	make \
+		BINDIR="${pkgdir}"/usr/bin \
+		WEBDIR="${pkgdir}"/srv/http \
+		MANDIR="${pkgdir}"/usr/share/man \
+		WEBGROUP=root \
+		install
+
+	rm -fr "${pkgdir}"/srv
+	chown root:root -R "${pkgdir}"
+	chmod 755 -R "${pkgdir}"/usr/bin # strip needs u+w
+
+	install -Dm644 ../config "${pkgdir}"/etc/thttpd.conf
+	install -Dm644 ../service "${pkgdir}"/usr/lib/systemd/system/thttpd.service
+
+	install -d "${pkgdir}"/usr/share/licenses/"${pkgname}"
+	head -n 26 thttpd.c > "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
+
+	# conflicts with apache
+	mv "${pkgdir}"/usr/bin/htpasswd{,-thttpd}
+	mv "${pkgdir}"/usr/share/man/man1/htpasswd{,-thttpd}.1
+}

Deleted: community-x86_64/config
===================================================================
--- community-x86_64/config	2015-06-13 19:44:48 UTC (rev 135280)
+++ community-x86_64/config	2015-06-13 19:45:48 UTC (rev 135281)
@@ -1,4 +0,0 @@
-dir=/srv/http
-vhost
-user=http
-cgipat=**.cgi

Copied: thttpd/repos/community-x86_64/config (from rev 135280, thttpd/trunk/config)
===================================================================
--- community-x86_64/config	                        (rev 0)
+++ community-x86_64/config	2015-06-13 19:45:48 UTC (rev 135281)
@@ -0,0 +1,4 @@
+dir=/srv/http
+vhost
+user=http
+cgipat=**.cgi

Deleted: community-x86_64/crypt.patch
===================================================================
--- community-x86_64/crypt.patch	2015-06-13 19:44:48 UTC (rev 135280)
+++ community-x86_64/crypt.patch	2015-06-13 19:45:48 UTC (rev 135281)
@@ -1,24 +0,0 @@
-diff -Naur old/extras/htpasswd.c new/extras/htpasswd.c
---- old/extras/htpasswd.c	2014-10-19 10:28:39.782856897 -1000
-+++ new/extras/htpasswd.c	2014-10-19 10:29:12.842911168 -1000
-@@ -8,6 +8,8 @@
- ** if stdin is a pipe or file.  This is necessary for use from CGI.
- */
- 
-+#define _XOPEN_SOURCE
-+
- #include <sys/types.h>
- #include <stdio.h>
- #include <string.h>
-diff -Naur old/libhttpd.c new/libhttpd.c
---- old/libhttpd.c	2014-10-19 10:28:39.782856897 -1000
-+++ new/libhttpd.c	2014-10-19 10:29:01.679559501 -1000
-@@ -39,6 +39,8 @@
- #include <sys/param.h>
- #include <sys/stat.h>
- 
-+#define __USE_XOPEN
-+
- #include <ctype.h>
- #include <errno.h>
- #include <fcntl.h>

Copied: thttpd/repos/community-x86_64/crypt.patch (from rev 135280, thttpd/trunk/crypt.patch)
===================================================================
--- community-x86_64/crypt.patch	                        (rev 0)
+++ community-x86_64/crypt.patch	2015-06-13 19:45:48 UTC (rev 135281)
@@ -0,0 +1,24 @@
+diff -Naur old/extras/htpasswd.c new/extras/htpasswd.c
+--- old/extras/htpasswd.c	2014-10-19 10:28:39.782856897 -1000
++++ new/extras/htpasswd.c	2014-10-19 10:29:12.842911168 -1000
+@@ -8,6 +8,8 @@
+ ** if stdin is a pipe or file.  This is necessary for use from CGI.
+ */
+ 
++#define _XOPEN_SOURCE
++
+ #include <sys/types.h>
+ #include <stdio.h>
+ #include <string.h>
+diff -Naur old/libhttpd.c new/libhttpd.c
+--- old/libhttpd.c	2014-10-19 10:28:39.782856897 -1000
++++ new/libhttpd.c	2014-10-19 10:29:01.679559501 -1000
+@@ -39,6 +39,8 @@
+ #include <sys/param.h>
+ #include <sys/stat.h>
+ 
++#define __USE_XOPEN
++
+ #include <ctype.h>
+ #include <errno.h>
+ #include <fcntl.h>

Deleted: community-x86_64/discreet.patch
===================================================================
--- community-x86_64/discreet.patch	2015-06-13 19:44:48 UTC (rev 135280)
+++ community-x86_64/discreet.patch	2015-06-13 19:45:48 UTC (rev 135281)
@@ -1,37 +0,0 @@
-diff -Naur old/libhttpd.c new/libhttpd.c
---- old/libhttpd.c	2014-08-15 11:32:31.040595413 +0900
-+++ new/libhttpd.c	2014-08-15 11:34:57.690595931 +0900
-@@ -754,7 +754,7 @@
-     <title>%d %s</title>\n\
-   </head>\n\
- \n\
--  <body bgcolor=\"#cc9999\" text=\"#000000\" link=\"#2020ff\" vlink=\"#4040cc\">\n\
-+  <body>\n\
- \n\
-     <h2>%d %s</h2>\n",
- 	status, title, status, title );
-@@ -780,14 +780,9 @@
-     char buf[1000];
- 
-     (void) my_snprintf( buf, sizeof(buf), "\
--    <hr>\n\
--\n\
--    <address><a href=\"%s\">%s</a></address>\n\
--\n\
-   </body>\n\
- \n\
--</html>\n",
--	SERVER_ADDRESS, EXPOSED_SERVER_SOFTWARE );
-+</html>\n" );
-     add_response( hc, buf );
-     }
- 
-@@ -2798,7 +2793,7 @@
-     <title>Index of %.80s</title>\n\
-   </head>\n\
- \n\
--  <body bgcolor=\"#99cc99\" text=\"#000000\" link=\"#2020ff\" vlink=\"#4040cc\">\n\
-+  <body>\n\
- \n\
-     <h2>Index of %.80s</h2>\n\
- \n\

Copied: thttpd/repos/community-x86_64/discreet.patch (from rev 135280, thttpd/trunk/discreet.patch)
===================================================================
--- community-x86_64/discreet.patch	                        (rev 0)
+++ community-x86_64/discreet.patch	2015-06-13 19:45:48 UTC (rev 135281)
@@ -0,0 +1,37 @@
+diff -Naur old/libhttpd.c new/libhttpd.c
+--- old/libhttpd.c	2014-08-15 11:32:31.040595413 +0900
++++ new/libhttpd.c	2014-08-15 11:34:57.690595931 +0900
+@@ -754,7 +754,7 @@
+     <title>%d %s</title>\n\
+   </head>\n\
+ \n\
+-  <body bgcolor=\"#cc9999\" text=\"#000000\" link=\"#2020ff\" vlink=\"#4040cc\">\n\
++  <body>\n\
+ \n\
+     <h2>%d %s</h2>\n",
+ 	status, title, status, title );
+@@ -780,14 +780,9 @@
+     char buf[1000];
+ 
+     (void) my_snprintf( buf, sizeof(buf), "\
+-    <hr>\n\
+-\n\
+-    <address><a href=\"%s\">%s</a></address>\n\
+-\n\
+   </body>\n\
+ \n\
+-</html>\n",
+-	SERVER_ADDRESS, EXPOSED_SERVER_SOFTWARE );
++</html>\n" );
+     add_response( hc, buf );
+     }
+ 
+@@ -2798,7 +2793,7 @@
+     <title>Index of %.80s</title>\n\
+   </head>\n\
+ \n\
+-  <body bgcolor=\"#99cc99\" text=\"#000000\" link=\"#2020ff\" vlink=\"#4040cc\">\n\
++  <body>\n\
+ \n\
+     <h2>Index of %.80s</h2>\n\
+ \n\

Deleted: community-x86_64/forwarded-for.patch
===================================================================
--- community-x86_64/forwarded-for.patch	2015-06-13 19:44:48 UTC (rev 135280)
+++ community-x86_64/forwarded-for.patch	2015-06-13 19:45:48 UTC (rev 135281)
@@ -1,16 +0,0 @@
-diff -Naur old/libhttpd.c new/libhttpd.c
---- old/libhttpd.c	2005-06-30 03:50:39.000000000 +1000
-+++ new/libhttpd.c	2012-10-24 12:12:17.144560917 +1100
-@@ -2207,6 +2207,12 @@
- 		if ( strcasecmp( cp, "keep-alive" ) == 0 )
- 		    hc->keep_alive = 1;
- 		}
-+	    else if ( strncasecmp( buf, "X-Forwarded-For:", 16 ) == 0 )
-+		{
-+		cp = &buf[16];
-+		cp += strspn( cp, " \t" );
-+		inet_aton( cp, &(hc->client_addr.sa_in.sin_addr) );
-+		}
- #ifdef LOG_UNKNOWN_HEADERS
- 	    else if ( strncasecmp( buf, "Accept-Charset:", 15 ) == 0 ||
- 		      strncasecmp( buf, "Accept-Language:", 16 ) == 0 ||

Copied: thttpd/repos/community-x86_64/forwarded-for.patch (from rev 135280, thttpd/trunk/forwarded-for.patch)
===================================================================
--- community-x86_64/forwarded-for.patch	                        (rev 0)
+++ community-x86_64/forwarded-for.patch	2015-06-13 19:45:48 UTC (rev 135281)
@@ -0,0 +1,16 @@
+diff -Naur old/libhttpd.c new/libhttpd.c
+--- old/libhttpd.c	2005-06-30 03:50:39.000000000 +1000
++++ new/libhttpd.c	2012-10-24 12:12:17.144560917 +1100
+@@ -2207,6 +2207,12 @@
+ 		if ( strcasecmp( cp, "keep-alive" ) == 0 )
+ 		    hc->keep_alive = 1;
+ 		}
++	    else if ( strncasecmp( buf, "X-Forwarded-For:", 16 ) == 0 )
++		{
++		cp = &buf[16];
++		cp += strspn( cp, " \t" );
++		inet_aton( cp, &(hc->client_addr.sa_in.sin_addr) );
++		}
+ #ifdef LOG_UNKNOWN_HEADERS
+ 	    else if ( strncasecmp( buf, "Accept-Charset:", 15 ) == 0 ||
+ 		      strncasecmp( buf, "Accept-Language:", 16 ) == 0 ||

Deleted: community-x86_64/service
===================================================================
--- community-x86_64/service	2015-06-13 19:44:48 UTC (rev 135280)
+++ community-x86_64/service	2015-06-13 19:45:48 UTC (rev 135281)
@@ -1,10 +0,0 @@
-[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

Copied: thttpd/repos/community-x86_64/service (from rev 135280, thttpd/trunk/service)
===================================================================
--- community-x86_64/service	                        (rev 0)
+++ community-x86_64/service	2015-06-13 19:45:48 UTC (rev 135281)
@@ -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



More information about the arch-commits mailing list