Add option to enable/disable httpd, lighttpd, webkit and gnash packages
authorHugo Villeneuve <hugo@hugovil.com>
Fri, 28 Jun 2013 03:28:45 +0000 (23:28 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Fri, 28 Jun 2013 03:35:31 +0000 (23:35 -0400)
config/sysinfos.default
stage5/hv-install-1
stage5/pkg/apache
stage5/pkg/lighttpd
stage5/pkg/php
stage5/post-install

index 8cfb220..e2e29d0 100644 (file)
@@ -82,9 +82,24 @@ MAILBOX_FORMAT="unix"
 # Alternate port for Sendmail
 SENDMAIL_PORT="25"
 
+# Apache httpd web server support
+USE_HTTPD="yes"
+
 # Alternate port for Apache
 HTTPD_PORT="80"
-APACHE_USER="www"
+HTTPD_USER="www"
+
+# Lighttpd web server support
+USE_LIGHTTPD="yes"
+
+# Define to httpd (Apache) or lighttpd
+DEFAULT_WEB_SERVER="lighttpd"
+
+# Webkit support
+USE_WEBKIT="no"
+
+# Gnash support
+USE_GNASH="no"
 
 # Samba support (default yes)
 USE_SAMBA="yes"
index 293dae4..90062f9 100755 (executable)
@@ -155,15 +155,17 @@ if [ "x${INST_TYPE}" = "xworkstation" -o "x${INST_TYPE}" = "xltsp-server" ]; the
     ipkg ${LIBNOTIFY}
     ipkg ${LIBVPX} "--enable-shared"
 
-    ipkg -m acnb -t -j ${WEBKIT} "\
-        --libexecdir=/usr/lib/WebKitGTK \
-        --with-gstreamer=0.10 \
-        --enable-introspection \
-        --with-gtk=2.0 \
-        --disable-geolocation \
-        --disable-gtk-doc"
-    ipkg ${VALA}
-    NOCOLOR=1 ipkg ${MIDORI}
+    if [ "x${USE_WEBKIT}" = "xyes" ]; then
+        ipkg -m acnb -t -j ${WEBKIT} "\
+            --libexecdir=/usr/lib/WebKitGTK \
+            --with-gstreamer=0.10 \
+            --enable-introspection \
+            --with-gtk=2.0 \
+            --disable-geolocation \
+            --disable-gtk-doc"
+        ipkg ${VALA}
+        NOCOLOR=1 ipkg ${MIDORI}
+    fi
 
     ipkg -m noac -l "${FIREFOX}-xulrunner" ${FIREFOX}
     ipkg -m noac -l "${FIREFOX}-browser" ${FIREFOX}
@@ -174,7 +176,9 @@ if [ "x${INST_TYPE}" = "xworkstation" -o "x${INST_TYPE}" = "xltsp-server" ]; the
     ipkg -m acnb ${VLC}  "--enable-mozilla --enable-qt4 --enable-ncurses"
     ipkg ${SDL}
     ipkg -m noac ${AGG}
-    ipkg ${GNASH}
+    if [ "x${USE_GNASH}" = "xyes" ]; then
+        ipkg ${GNASH}
+    fi
 fi
 
 ipkg ${LIBGAMIN} "--libexecdir=/usr/sbin"
@@ -184,8 +188,12 @@ ipkg ${XARCHIVER}
 ipkg -m acnb ${LIBFM}
 ipkg ${PCMANFM}
 
-ipkg -s apache ${HTTPD} # Apache
-ipkg ${LIGHTTPD}
+if [ "x${USE_HTTPD}" = "xyes" ]; then
+    ipkg -s apache ${HTTPD}
+fi
+if [ "x${USE_LIGHTTPD}" = "xyes" ]; then
+    ipkg ${LIGHTTPD}
+fi
 ipkg ${PHP}
 
 if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then
index ab8b2f7..8b6e66a 100644 (file)
@@ -140,5 +140,7 @@ EOF
     install -v -m740 ${SCRDIR}/bootscripts/apache /etc/rc.d/init.d
 
     # script-name start stop
-    bootscript_add_rc3 apache 70 20
+    if [ "x${DEFAULT_WEB_SERVER}" == "xhttpd" ]; then
+        bootscript_add_rc3 apache 70 20
+    fi
 }
index 6a0ea5a..d5ded9f 100644 (file)
@@ -63,5 +63,7 @@ EOF
     install -v -m740 ${SCRDIR}/bootscripts/lighttpd /etc/rc.d/init.d
 
     # script-name start stop
-    bootscript_add_rc3 lighttpd 70 20
+    if [ "x${DEFAULT_WEB_SERVER}" == "xlighttpd" ]; then
+        bootscript_add_rc3 lighttpd 70 20
+    fi
 }
index 5b34926..60ed440 100644 (file)
@@ -43,17 +43,19 @@ hvbuild_post()
     fi
     cp ${LFS_TMP}/${PACKAGE}/php.ini-production /etc/php.ini
 
-    # To enable PHP support in the Apache web server, a new AddType directive
-    # must be added to the httpd.conf file.
-    if ! grep -q "application/x-httpd-php" /etc/httpd/httpd.conf; then
-        echo "AddType application/x-httpd-php .php" >> /etc/httpd/httpd.conf
-    fi
+    if [ "x${USE_HTTPD}" = "xyes" ]; then
+        # To enable PHP support in the Apache web server, a new AddType
+        # directive must be added to the httpd.conf file.
+        if ! grep -q "application/x-httpd-php" /etc/httpd/httpd.conf; then
+            echo "AddType application/x-httpd-php .php" >> /etc/httpd/httpd.conf
+        fi
 
-    # Est-ce nĂ©cessaire?
-    #cgi.discard_path = 1
+        # Est-ce nĂ©cessaire?
+        #cgi.discard_path = 1
 
-    if ! grep -q "DirectoryIndex" /etc/httpd/httpd.conf | grep "index.php"; then
-        sed -i -e "s!\(^\s*DirectoryIndex index.html.*\)!\1 index.php!g" \
-            /etc/httpd/httpd.conf
+        if ! grep -q "DirectoryIndex" /etc/httpd/httpd.conf | grep "index.php"; then
+            sed -i -e "s!\(^\s*DirectoryIndex index.html.*\)!\1 index.php!g" \
+                /etc/httpd/httpd.conf
+        fi
     fi
 }
index aca3db4..e3f50c8 100755 (executable)
@@ -16,22 +16,24 @@ if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then
     #########################################
     # Apache
     #########################################
-    READ_VALID="no"
-
-    while [ "${READ_VALID}" = "no" ]; do
-       echo "Do you want to generate SSL self-signed"
-       echo -n "certificate for Apache? (y/n): "
-       read USE_SSL
-
-       if [ "${USE_SSL}" = "y" -o "${USE_SSL}" = "n" ]; then
-           READ_VALID="yes"
-       else
-           echo "Error, answer y or n"
-       fi
-    done
-
-    if [ "${USE_SSL}" = "y" ]; then
-       /etc/httpd/generate-ssl-certs
+    if [ "x${USE_HTTPD}" = "xyes" ]; then
+        READ_VALID="no"
+
+        while [ "${READ_VALID}" = "no" ]; do
+           echo "Do you want to generate SSL self-signed"
+           echo -n "certificate for Apache? (y/n): "
+           read USE_SSL
+
+           if [ "${USE_SSL}" = "y" -o "${USE_SSL}" = "n" ]; then
+               READ_VALID="yes"
+           else
+               echo "Error, answer y or n"
+           fi
+        done
+
+        if [ "${USE_SSL}" = "y" ]; then
+           /etc/httpd/generate-ssl-certs
+        fi
     fi
 
     #########################################