Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=8daec3f1e0008ca05e86245379acd282e93ff8c0

commit 8daec3f1e0008ca05e86245379acd282e93ff8c0
Author: James Buren <[email protected]>
Date:   Thu Jun 7 01:05:52 2012 -0500

thttpd-2.25b-3-x86_64
* convert to systemd schema

diff --git a/source/network-extra/thttpd/FrugalBuild 
b/source/network-extra/thttpd/FrugalBuild
index 24817c2..47bd3b1 100644
--- a/source/network-extra/thttpd/FrugalBuild
+++ b/source/network-extra/thttpd/FrugalBuild
@@ -3,7 +3,7 @@

pkgname=thttpd
pkgver=2.25b
-pkgrel=2
+pkgrel=3
pkgdesc="tiny/turbo/throttling HTTP server"
url="http://www.acme.com/software/thttpd/";
depends=('glibc')
@@ -11,13 +11,21 @@ conflicts=('apache')
groups=('network-extra')
archs=('i686' 'x86_64')
up2date="lynx -dump $url |grep tar.gz$ |sed -n 's/.*-\(.*\)\.t.*/\1/;1 p'"
-source=($url/$pkgname-$pkgver.tar.gz rc.thttpd thttpd_config)
+source=($url/$pkgname-$pkgver.tar.gz rc.$pkgname $pkgname.service 
${pkgname}_config getline.patch)
sha1sums=('cd0e823233ad73e34ee1c9b871b01050feb9db52' \
'c5325a019e410cc41998b81377058caeb586186a' \
-          'b182a4d857083a0495b975b97a9c12f52a4752c2')
+          '85826fb92deb875ce51f70ebb21bc0671c62ee4e' \
+          'b182a4d857083a0495b975b97a9c12f52a4752c2' \
+          '5ac14035a10b9155d813b363520e9aa74c5d91fc')
+
+_F_sysvinit_units=($pkgname)
+_F_systemd_units=($pkgname=)
+Finclude systemd
+
build()
{
Fmkdir /usr/man/man1/ /var/www/data/log
+       Fpatchall
Fconf
for i in Makefile cgi-src/Makefile extras/Makefile
do
@@ -29,5 +37,9 @@ build()
Fexe /var/www/thttpd_config
Fmv /usr/www/cgi-bin /var/www
Frm /usr/www
+       Ffile /lib/systemd/system/$pkgname.service
+       Fgenscriptlet
}

+
+# optimization OK
diff --git a/source/network-extra/thttpd/getline.patch 
b/source/network-extra/thttpd/getline.patch
new file mode 100644
index 0000000..1ec3946
--- /dev/null
+++ b/source/network-extra/thttpd/getline.patch
@@ -0,0 +1,21 @@
+diff -Nur thttpd-2.25b.orig/extras/htpasswd.c thttpd-2.25b/extras/htpasswd.c
+--- thttpd-2.25b.orig/extras/htpasswd.c        2001-12-19 02:08:08.000000000 
+0200
++++ thttpd-2.25b/extras/htpasswd.c     2010-04-11 14:43:31.037809054 +0300
+@@ -49,7 +49,7 @@
+     while((line[y++] = line[x++]));
+ }
+
+-static int getline(char *s, int n, FILE *f) {
++static int get_line(char *s, int n, FILE *f) {
+     register int i=0;
+
+     while(1) {
+@@ -189,7 +189,7 @@
+     strcpy(user,argv[2]);
+
+     found = 0;
+-    while(!(getline(line,MAX_STRING_LEN,f))) {
++    while(!(get_line(line,MAX_STRING_LEN,f))) {
+         if(found || (line[0] == '#') || (!line[0])) {
+             putline(tfp,line);
+             continue;
diff --git a/source/network-extra/thttpd/thttpd.service 
b/source/network-extra/thttpd/thttpd.service
new file mode 100644
index 0000000..b79cc28
--- /dev/null
+++ b/source/network-extra/thttpd/thttpd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Tiny HTTP Server
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/thttpd -C /var/www/thttpd_config
+PIDFile=/var/run/thttpd.pid
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to