lighttpd: lot of bugfixes
authorMarcin Juszkiewicz <hrw@openembedded.org>
Thu, 15 Feb 2007 12:32:49 +0000 (12:32 +0000)
committerMarcin Juszkiewicz <hrw@openembedded.org>
Thu, 15 Feb 2007 12:32:49 +0000 (12:32 +0000)
- forced PCRE detection so it is linked in
- cleaned directory structure
- added /www/ dirs needed
- added empty homepage
- fixed initscript

packages/lighttpd/1.4.13/configure.in.patch [deleted file]
packages/lighttpd/conf/.mtn2git_empty [deleted file]
packages/lighttpd/conf/etc/.mtn2git_empty [deleted file]
packages/lighttpd/conf/etc/init.d/.mtn2git_empty [deleted file]
packages/lighttpd/lighttpd/.mtn2git_empty [moved from packages/lighttpd/1.4.13/.mtn2git_empty with 100% similarity]
packages/lighttpd/lighttpd/configure.in.patch [new file with mode: 0644]
packages/lighttpd/lighttpd/index.html [new file with mode: 0644]
packages/lighttpd/lighttpd/lighttpd [moved from packages/lighttpd/conf/etc/init.d/lighttpd with 69% similarity]
packages/lighttpd/lighttpd/lighttpd.conf [moved from packages/lighttpd/conf/etc/lighttpd.conf with 100% similarity]
packages/lighttpd/lighttpd/src-server.c.patch [moved from packages/lighttpd/1.4.13/src-server.c.patch with 100% similarity]
packages/lighttpd/lighttpd_1.4.13.bb

diff --git a/packages/lighttpd/1.4.13/configure.in.patch b/packages/lighttpd/1.4.13/configure.in.patch
deleted file mode 100644 (file)
index f4db64d..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-Index: lighttpd-1.4.13-r0/lighttpd-1.4.13/configure.in
-===================================================================
---- lighttpd-1.4.13-r0.orig/lighttpd-1.4.13/configure.in       2006-10-09 18:19:34.000000000 +0200
-+++ lighttpd-1.4.13-r0/lighttpd-1.4.13/configure.in    2006-12-07 22:31:52.000000000 +0100
-@@ -250,23 +250,9 @@
-     [WITH_PCRE=$withval],[WITH_PCRE=yes])
- AC_MSG_RESULT([$WITH_PCRE])
--if test "x$cross_compiling" = xno -a "$WITH_PCRE" != "no"; then
--  AC_PATH_PROG(PCRECONFIG, pcre-config)
--  if test x"$PCRECONFIG" != x; then
--    PCRE_LIB=`$PCRECONFIG --libs`
--    CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`"
--    OLDLIBS="$LIBS"
--    LIBS="$LIBS $PCRE_LIB"
--    AC_CHECK_LIB(pcre, pcre_compile, [
--      AC_CHECK_HEADERS([pcre.h], [
-         AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
-         AC_DEFINE([HAVE_PCRE_H], [1])
--      ])
--    ])
--    LIBS="$OLDLIBS"
--  fi
--fi
- AC_SUBST(PCRE_LIB)
diff --git a/packages/lighttpd/conf/.mtn2git_empty b/packages/lighttpd/conf/.mtn2git_empty
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/packages/lighttpd/conf/etc/.mtn2git_empty b/packages/lighttpd/conf/etc/.mtn2git_empty
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/packages/lighttpd/conf/etc/init.d/.mtn2git_empty b/packages/lighttpd/conf/etc/init.d/.mtn2git_empty
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/packages/lighttpd/lighttpd/configure.in.patch b/packages/lighttpd/lighttpd/configure.in.patch
new file mode 100644 (file)
index 0000000..3387fe5
--- /dev/null
@@ -0,0 +1,34 @@
+Index: lighttpd-1.4.13/configure.in
+===================================================================
+--- lighttpd-1.4.13.orig/configure.in  2006-10-09 18:19:34.000000000 +0200
++++ lighttpd-1.4.13/configure.in       2007-02-13 18:42:34.000000000 +0100
+@@ -250,23 +250,23 @@
+     [WITH_PCRE=$withval],[WITH_PCRE=yes])
+ AC_MSG_RESULT([$WITH_PCRE])
+-if test "x$cross_compiling" = xno -a "$WITH_PCRE" != "no"; then
++#if test "x$cross_compiling" = xno -a "$WITH_PCRE" != "no"; then
+   AC_PATH_PROG(PCRECONFIG, pcre-config)
+-  if test x"$PCRECONFIG" != x; then
++#  if test x"$PCRECONFIG" != x; then
+     PCRE_LIB=`$PCRECONFIG --libs`
+     CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`"
+     OLDLIBS="$LIBS"
+     LIBS="$LIBS $PCRE_LIB"
+-    AC_CHECK_LIB(pcre, pcre_compile, [
++#    AC_CHECK_LIB(pcre, pcre_compile, [
+       AC_CHECK_HEADERS([pcre.h], [
+         AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
+         AC_DEFINE([HAVE_PCRE_H], [1])
+       ])
+-    ])
++#    ])
+     LIBS="$OLDLIBS"
+-  fi
+-fi
++#  fi
++#fi
+ AC_SUBST(PCRE_LIB)
diff --git a/packages/lighttpd/lighttpd/index.html b/packages/lighttpd/lighttpd/index.html
new file mode 100644 (file)
index 0000000..cd25bf1
--- /dev/null
@@ -0,0 +1 @@
+<html><body><h1>It works!</h1></body></html>
\ No newline at end of file
similarity index 69%
rename from packages/lighttpd/conf/etc/init.d/lighttpd
rename to packages/lighttpd/lighttpd/lighttpd
index 4661210..5723814 100644 (file)
@@ -22,12 +22,7 @@ case "$1" in
        echo -n "Restarting $DESC: "
        start-stop-daemon -K -x "$DAEMON"
        sleep 1
-       KEY_ARGS=""
-       test -f $DROPBEAR_DSSKEY && KEY_ARGS="$KEY_ARGS -d $DROPBEAR_DSSKEY"
-       test -f $DROPBEAR_RSAKEY && KEY_ARGS="$KEY_ARGS -r $DROPBEAR_RSAKEY"
-       start-stop-daemon -S \
-         -x "$DAEMON" -- $KEY_ARGS \
-           -p "$DROPBEAR_PORT" $DROPBEAR_EXTRA_ARGS
+       start-stop-daemon -S -x "$DAEMON"
        echo "$NAME."
        ;;
   *)
index 9cb3d26..504a129 100644 (file)
@@ -2,12 +2,14 @@ DESCRIPTION = "Web server"
 SECTION = "net"
 DEPENDS = "sqlite3 libpcre libxml2"
 LICENSE = "BSD"
-PR = "r4"
+PR = "r5"
 
 SRC_URI = "http://www.lighttpd.net/download/lighttpd-1.4.13.tar.gz \
-          file://${PV}/configure.in.patch;patch=1;pnum=2 \
-          file://${PV}/src-server.c.patch;patch=1;pnum=1 \
-          file://conf/etc "
+          file://configure.in.patch;patch=1 \
+          file://src-server.c.patch;patch=1 \
+          file://index.html \
+          file://lighttpd.conf \
+          file://lighttpd"
 
 EXTRA_OECONF="--without-bzip2 \
                --without-ldap \
@@ -20,18 +22,20 @@ EXTRA_OECONF="--without-bzip2 \
                --disable-nls \
                --disable-static"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig update-rc.d
 
-do_install_append() {
-       cp -R ${WORKDIR}/conf/etc ${D}/etc
-       rm -fR ${D}/etc/.svn
-       rm -fR ${D}/etc/init.d/.svn
+INITSCRIPT_NAME = "lighttpd"
+INITSCRIPT_PARAMS = "defaults 70"
 
-       chmod -R 755 ${D}/etc
+do_install_append() {
+       install -d ${D}${sysconfdir}/init.d ${D}/www/logs ${D}/www/pages/dav ${D}/www/var
+       install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
+       install -m 0755 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
+       install -m 0644 ${WORKDIR}/index.html ${D}/www/pages/
 }
 
 do_stage() {
        autotools_stage_all
 }
 
-FILES_${PN} += "${libdir}/mod_*.so /etc"
+FILES_${PN} += "${libdir}/mod_*.so ${sysconfdir} /www"