summaryrefslogtreecommitdiffstats
path: root/meta-webserver
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-04-18 06:39:38 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2013-04-19 02:45:28 +0200
commitf593c454bc60d1837bf1f1c97521850efb438f68 (patch)
treec5aeb13dc844fd6b967767212b750a7dfe7f167a /meta-webserver
parent9955ac116e1f57de4c1fb01a0fa47e9591db1d4a (diff)
downloadmeta-openembedded-f593c454bc60d1837bf1f1c97521850efb438f68.tar.gz
nostromo: move to meta-webserver and tweak
* Add SUMMARY * Move SRC_URI checksums next to SRC_URI Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-webserver')
-rw-r--r--meta-webserver/recipes-httpd/nostromo/files/0001-GNUmakefile-add-possibility-to-override-variables.patch141
-rw-r--r--meta-webserver/recipes-httpd/nostromo/files/nhttpd.conf55
-rw-r--r--meta-webserver/recipes-httpd/nostromo/files/nostromo34
-rw-r--r--meta-webserver/recipes-httpd/nostromo/files/volatiles2
-rw-r--r--meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb52
5 files changed, 284 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/nostromo/files/0001-GNUmakefile-add-possibility-to-override-variables.patch b/meta-webserver/recipes-httpd/nostromo/files/0001-GNUmakefile-add-possibility-to-override-variables.patch
new file mode 100644
index 000000000..7cf011b1c
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nostromo/files/0001-GNUmakefile-add-possibility-to-override-variables.patch
@@ -0,0 +1,141 @@
1From 7fa0d31ec5c0be9dca84a03851b2d44f61527ec8 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>
3Date: Sun, 4 Dec 2011 16:01:04 +0100
4Subject: [PATCH] GNUmakefile: add possibility to override variables
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9this is useful for cross compilation
10
11Signed-off-by: Eric BĂ©nard <eric@eukrea.com>
12---
13Upstream-Status: Inappropriate [embedded specific]
14 src/libbsd/GNUmakefile | 10 +++++-----
15 src/libmy/GNUmakefile | 26 +++++++++++++-------------
16 src/nhttpd/GNUmakefile | 12 ++++++------
17 src/tools/GNUmakefile | 8 ++++----
18 4 files changed, 28 insertions(+), 28 deletions(-)
19
20diff --git a/src/libbsd/GNUmakefile b/src/libbsd/GNUmakefile
21index e2d01a3..b034bc6 100644
22--- a/src/libbsd/GNUmakefile
23+++ b/src/libbsd/GNUmakefile
24@@ -1,12 +1,12 @@
25-CCFLAGS = -O2 -pipe -Wall -Werror -Wstrict-prototypes -c
26+CFLAGS := -O2 -pipe -Wall -Werror -Wstrict-prototypes -c
27
28 libbsd.a: strlcpy.o strlcat.o
29- ar -r libbsd.a strlcpy.o strlcat.o
30- ranlib libbsd.a
31+ $(AR) -r libbsd.a strlcpy.o strlcat.o
32+ $(RANLIB) libbsd.a
33
34 strlcpy.o: strlcpy.c
35- cc ${CCFLAGS} strlcpy.c
36+ $(CC) $(CFLAGS) strlcpy.c
37 strlcat.o: strlcat.c
38- cc ${CCFLAGS} strlcat.c
39+ $(CC) $(CFLAGS) strlcat.c
40 clean:
41 rm -f libbsd.a *.o
42diff --git a/src/libmy/GNUmakefile b/src/libmy/GNUmakefile
43index ce90dd9..891ffea 100644
44--- a/src/libmy/GNUmakefile
45+++ b/src/libmy/GNUmakefile
46@@ -1,30 +1,30 @@
47-CCFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -c
48+CFLAGS := -O2 -Wall -Werror -Wstrict-prototypes -c
49
50 libmy.a: strcutl.o strcutw.o strcuts.o strcuti.o strcutf.o flog.o flogd.o fparse.o strlower.o strb64d.o
51- ar -r libmy.a strcutl.o strcutw.o strcuts.o strcuti.o strcutf.o flog.o flogd.o fparse.o strlower.o strb64d.o
52- ranlib libmy.a
53+ $(AR) -r libmy.a strcutl.o strcutw.o strcuts.o strcuti.o strcutf.o flog.o flogd.o fparse.o strlower.o strb64d.o
54+ $(RANLIB) libmy.a
55
56 strcutl.o: strcutl.c
57- cc ${CCFLAGS} strcutl.c
58+ $(CC) $(CFLAGS) strcutl.c
59 strcutw.o: strcutw.c
60- cc ${CCFLAGS} strcutw.c
61+ $(CC) $(CFLAGS) strcutw.c
62 strcuts.o: strcuts.c
63- cc ${CCFLAGS} strcuts.c
64+ $(CC) $(CFLAGS) strcuts.c
65 strcuti.o: strcuti.c
66- cc ${CCFLAGS} strcuti.c
67+ $(CC) $(CFLAGS) strcuti.c
68 strcutf.o: strcutf.c
69- cc ${CCFLAGS} strcutf.c
70+ $(CC) $(CFLAGS) strcutf.c
71 strlower.o: strlower.c
72- cc ${CCFLAGS} strlower.c
73+ $(CC) $(CFLAGS) strlower.c
74 strb64d.o: strb64d.c
75- cc ${CCFLAGS} strb64d.c
76+ $(CC) $(CFLAGS) strb64d.c
77
78 flog.o: flog.c
79- cc ${CCFLAGS} flog.c
80+ $(CC) $(CFLAGS) flog.c
81 flogd.o: flogd.c
82- cc ${CCFLAGS} flogd.c
83+ $(CC) $(CFLAGS) flogd.c
84 fparse.o: fparse.c
85- cc ${CCFLAGS} fparse.c
86+ $(CC) $(CFLAGS) fparse.c
87
88 clean:
89 rm -f libmy.a *.o
90diff --git a/src/nhttpd/GNUmakefile b/src/nhttpd/GNUmakefile
91index f6d12de..9524911 100644
92--- a/src/nhttpd/GNUmakefile
93+++ b/src/nhttpd/GNUmakefile
94@@ -1,18 +1,18 @@
95-CCFLAGS = -O2 -pipe -Wall -Wstrict-prototypes -c
96+CFLAGS := -O2 -pipe -Wall -Wstrict-prototypes -c
97
98 nhttpd: main.o http.o sys.o
99- cc -L../libmy -L../libbsd -o nhttpd main.o http.o sys.o -lmy -lbsd -lssl -lcrypt
100- strip nhttpd
101+ $(CC) -L../libmy -L../libbsd -o nhttpd main.o http.o sys.o -lmy -lbsd -lssl -lcrypt
102+# $(STRIP) nhttpd
103 nroff -Tascii -c -mandoc nhttpd.8 > nhttpd.cat8
104
105 main.o: main.c
106- cc ${CCFLAGS} main.c
107+ $(CC) $(CFLAGS) main.c
108
109 http.o: http.c
110- cc ${CCFLAGS} http.c
111+ $(CC) $(CFLAGS) http.c
112
113 sys.o: sys.c
114- cc ${CCFLAGS} sys.c
115+ $(CC) $(CFLAGS) sys.c
116
117 clean:
118 rm -f nhttpd nhttpd.cat8 *.o
119diff --git a/src/tools/GNUmakefile b/src/tools/GNUmakefile
120index 15bea61..663ddb5 100644
121--- a/src/tools/GNUmakefile
122+++ b/src/tools/GNUmakefile
123@@ -1,11 +1,11 @@
124-CCFLAGS = -O2 -pipe -Wall -Werror -Wstrict-prototypes -c
125+CCFLAGS := -O2 -pipe -Wall -Werror -Wstrict-prototypes
126
127 crypt: crypt.o
128- cc -o crypt crypt.o -lcrypt
129- strip crypt
130+ $(CC) $(CFLAGS) -o crypt crypt.o -lcrypt
131+# $(STRIP) crypt
132
133 crypt.o: crypt.c
134- cc ${CCFLAGS} crypt.c
135+ $(CC) $(CFLAGS) -c crypt.c
136
137 clean:
138 rm -f crypt *.o
139--
1401.7.6.4
141
diff --git a/meta-webserver/recipes-httpd/nostromo/files/nhttpd.conf b/meta-webserver/recipes-httpd/nostromo/files/nhttpd.conf
new file mode 100644
index 000000000..6674bb696
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nostromo/files/nhttpd.conf
@@ -0,0 +1,55 @@
1# MAIN [MANDATORY]
2
3servername localhost
4#servername www.nazgul.ch:8080
5serverlisten *
6#serverlisten 81.221.21.250 127.0.0.1 ::1
7serveradmin webmaster@localhost
8serverroot /var/nostromo
9servermimes /var/nostromo/conf/mimes
10docroot /var/nostromo/htdocs
11docindex index.html
12
13# LOGS [OPTIONAL]
14
15logpid /var/run/nostromo/nhttpd.pid
16#logaccess /var/log/nostromo/access_log
17
18# SETUID [RECOMMENDED]
19
20user www-data
21
22# BASIC AUTHENTICATION [OPTIONAL]
23
24#htaccess .htaccess
25#htpasswd /var/nostromo/conf/.htpasswd
26#htpasswd +bsdauth
27#htpasswd +bsdauthnossl
28
29# SSL [OPTIONAL]
30
31#sslport 443
32#sslcert /etc/ssl/server.crt
33#sslcertkey /etc/ssl/server.key
34
35# CUSTOM RESPONSES [OPTIONAL]
36#
37# The custom responses are searched in the corresponding document root.
38
39#custom_401 custom_401.html
40#custom_403 custom_403.html
41#custom_404 custom_404.html
42
43# ALIASES [OPTIONAL]
44
45/icons /var/nostromo/icons
46
47# VIRTUAL HOSTS [OPTIONAL]
48
49#www.rahel.ch /var/nostromo/htdocs/www.rahel.ch
50#www.rahel.ch:8080 /var/nostromo/htdocs/www.rahel.ch
51
52# HOMEDIRS [OPTIONAL]
53
54#homedirs /home
55#homedirs_public public_www
diff --git a/meta-webserver/recipes-httpd/nostromo/files/nostromo b/meta-webserver/recipes-httpd/nostromo/files/nostromo
new file mode 100644
index 000000000..8a2886882
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nostromo/files/nostromo
@@ -0,0 +1,34 @@
1#!/bin/sh
2
3PATH=/sbin:/bin:/usr/sbin:/usr/bin
4DAEMON=nhttpd
5NAME=nhttpd
6DESC="Nostromo Web Server"
7OPTS="-c /etc/nhttpd.conf"
8
9case "$1" in
10 start)
11 echo -n "Starting $DESC: "
12 start-stop-daemon --start -x "$DAEMON" -- $OPTS
13 echo "$NAME."
14 ;;
15 stop)
16 echo -n "Stopping $DESC: "
17 start-stop-daemon --stop -x "$DAEMON"
18 echo "$NAME."
19 ;;
20 restart|force-reload)
21 echo -n "Restarting $DESC: "
22 start-stop-daemon --stop -x "$DAEMON"
23 sleep 1
24 start-stop-daemon --start -x "$DAEMON" -- $OPTS
25 echo "$NAME."
26 ;;
27 *)
28 N=/etc/init.d/$NAME
29 echo "Usage: $N {start|stop|restart|force-reload}" >&2
30 exit 1
31 ;;
32esac
33
34exit 0
diff --git a/meta-webserver/recipes-httpd/nostromo/files/volatiles b/meta-webserver/recipes-httpd/nostromo/files/volatiles
new file mode 100644
index 000000000..40924960c
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nostromo/files/volatiles
@@ -0,0 +1,2 @@
1d www-data www-data 0775 /var/run/nostromo none
2d www-data www-data 0775 /var/log/nostromo none
diff --git a/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb b/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb
new file mode 100644
index 000000000..e66676e96
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb
@@ -0,0 +1,52 @@
1SUMMARY = "A simple, fast and secure HTTP server"
2HOMEPAGE = "http://www.nazgul.ch/dev_nostromo.html"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://src/nhttpd/main.c;beginline=2;endline=14;md5=e5ec3fa723b29b7d59d205afd8d36938"
5
6SRC_URI = "http://www.nazgul.ch/dev/${PN}-${PV}.tar.gz \
7 file://0001-GNUmakefile-add-possibility-to-override-variables.patch \
8 file://nhttpd.conf \
9 file://volatiles \
10 file://nostromo \
11"
12
13SRC_URI[md5sum] = "dc6cfd6b5aae04c370c7f818fa7bde55"
14SRC_URI[sha256sum] = "5f62578285e02449406b46cf06a7888fe3dc4a90bedf58cc18523bad62f6b914"
15
16TARGET_CC_ARCH += "${LDFLAGS}"
17
18DEPENDS = "openssl"
19
20inherit update-rc.d
21
22INITSCRIPT_NAME = "nostromo"
23INITSCRIPT_PARAMS = "defaults 70"
24
25do_compile() {
26 oe_runmake
27}
28
29do_install() {
30 install -d ${D}/${sbindir}
31 install -m 0755 src/nhttpd/nhttpd ${D}/${sbindir}/nhttpd
32 install -m 0755 src/tools/crypt ${D}/${sbindir}/crypt
33 install -d ${D}/${mandir}/man8
34 install -m 0444 src/nhttpd/nhttpd.8 ${D}/${mandir}/man8/nhttpd.8
35 install -d ${D}${localstatedir}/nostromo/conf
36 install -d ${D}${localstatedir}/nostromo/htdocs/cgi-bin
37 install -d ${D}${localstatedir}/nostromo/icons
38 install -d ${D}${localstatedir}/log/nostromo
39 install -d ${D}${localstatedir}/run/nostromo
40 install -d ${D}${sysconfdir}/init.d
41 install -m 0644 conf/mimes ${D}${localstatedir}/nostromo/conf/mimes
42 install -m 0644 ${WORKDIR}/nhttpd.conf ${D}${sysconfdir}
43 install -m 0755 ${WORKDIR}/nostromo ${D}${sysconfdir}/init.d
44 install -c -D -m 644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/nostromo
45 install -m 0644 htdocs/index.html ${D}${localstatedir}/nostromo/htdocs/index.html
46 install -m 0644 htdocs/nostromo.gif ${D}${localstatedir}/nostromo/htdocs/nostromo.gif
47 install -m 0644 icons/dir.gif ${D}${localstatedir}/nostromo/icons/dir.gif
48 install -m 0644 icons/file.gif ${D}${localstatedir}/nostromo/icons/file.gif
49 chown -R www-data:www-data ${D}/${localstatedir}/nostromo ${D}/${localstatedir}/log/nostromo ${D}/${localstatedir}/run/nostromo
50}
51
52CONFFILES_${PN} += "/var/nostromo/conf/mimes ${sysconfdir}/nhttpd.conf"