Index: config/userspace/packages.lkc
===================================================================
RCS file: /sources/ltib/ltib/config/userspace/packages.lkc,v
retrieving revision 1.51
diff -u -r1.51 packages.lkc
--- config/userspace/packages.lkc	11 Mar 2012 16:38:37 -0000	1.51
+++ config/userspace/packages.lkc	13 Jun 2012 10:41:25 -0000
@@ -1452,6 +1452,17 @@
       kinit, klist, kdestroy, kpasswd as well as kerberized versions of
       telnet and ftp.
 
+config PKG_LAMP
+    depends CAP_HAS_MMU
+    select PKG_LIBXML2
+    select PKG_HTTPD
+    select PKG_MYSQL
+    select PKG_ZLIB
+    bool "lamp"
+    help
+      This sets the required packages to build a LAMP server: 
+      libxml2, httpd, mysql, zlib
+
 config PKG_LESS
     depends CAP_HAS_MMU
     select PKG_LIBTERMCAP
@@ -2178,8 +2189,6 @@
 config PKG_PHP
     depends CAP_HAS_MMU
     select PKG_LIBXML2
-    select PKG_HTTPD
-    select PKG_MYSQL
     select PKG_ZLIB
     bool "php"
     help
Index: dist/lfs-5.1/php/php.spec
===================================================================
RCS file: /sources/ltib/ltib/dist/lfs-5.1/php/php.spec,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 php.spec
--- dist/lfs-5.1/php/php.spec	5 Dec 2008 14:25:47 -0000	1.1.1.5
+++ dist/lfs-5.1/php/php.spec	13 Jun 2012 10:41:25 -0000
@@ -53,15 +53,21 @@
 then
     EXTRA_CONFIG_OPTS="--without-iconv"
 fi
+if [ "$PKG_HTTPD" = "y" ]
+then
+    EXTRA_CONFIG_OPTS="$EXTRA_CONFIG_OPTS --with-apxs2=$DEV_IMAGE/usr/bin/apxs"
+fi
+if [ "$PKG_MYSQL" = "y" ]
+then
+    EXTRA_CONFIG_OPTS="$EXTRA_CONFIG_OPTS --with-mysql=$DEV_IMAGE/usr   \
+   --with-mysqli=$DEV_IMAGE/usr/bin/mysql_config"
+fi
 if [ -z "$LTIB_NATIVE_BUILD" ]
 then
     config_opts='ac_cv_prog_cc_cross=yes'
 fi
 eval $config_opts sh ./configure-cross \
 	--prefix=${_prefix} --host=$CFGHOST --build=%{_build}  \
-	--with-apxs2=$DEV_IMAGE/usr/bin/apxs \
-	--with-mysql=$DEV_IMAGE/usr	\
-	--with-mysqli=$DEV_IMAGE/usr/bin/mysql_config \
 	--enable-soap --enable-sockets	\
 	--with-zlib	\
 	--with-zlib-dir=$DEV_IMAGE/usr   \
@@ -84,7 +90,10 @@
 mkdir -p $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/conf
 mkdir -p $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/htdocs
 
-cp $DEV_IMAGE/usr/conf/httpd.conf $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/conf
+if [ "$PKG_HTTPD" = "y" ]
+then
+  cp $DEV_IMAGE/usr/conf/httpd.conf $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/conf
+fi
 if [ ! -f ./sapi/cli/php.orig ]
 then
  cp sapi/cli/php ./sapi/cli/php.orig
@@ -96,9 +105,11 @@
 cd $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/conf
 rpmbuildroot_0=$(echo $RPM_BUILD_ROOT | sed -e 's/\//\\\//g')
 pfx_1=$(echo %{pfx} | sed -e 's/\//\\\//g')
-sed -e "s/$rpmbuildroot_0\/$pfx_1\///" ./httpd.conf > ./httpd.conf-new
-
-awk 'BEGIN {add=0} {if ( /^DirectoryIndex/ ) print $0" index.php" ;else if (!add && /^AddType/) {print;print "AddType application/x-httpd-php .php";add=1;}else print}' httpd.conf-new > ~httpd.conf
+if [ "$PKG_HTTPD" = "y" ]
+then
+  sed -e "s/$rpmbuildroot_0\/$pfx_1\///" ./httpd.conf > ./httpd.conf-new
+  awk 'BEGIN {add=0} {if ( /^DirectoryIndex/ ) print $0" index.php" ;else if (!add && /^AddType/) {print;print "AddType application/x-httpd-php .php";add=1;}else print}' httpd.conf-new > ~httpd.conf
+fi
 
 if test -f ./~httpd.conf ; then  
  mv ~httpd.conf httpd.conf
