]> granicus.if.org Git - apache/commitdiff
AIX: Update the build to support AIX packages.
authorGraham Leggett <minfrin@apache.org>
Mon, 27 Feb 2012 22:24:18 +0000 (22:24 +0000)
committerGraham Leggett <minfrin@apache.org>
Mon, 27 Feb 2012 22:24:18 +0000 (22:24 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1294367 13f79535-47bb-0310-9956-ffa450edef68

build/aix/buildaix.ksh
config.layout

index a7caa6ba21d89a746c70f359294998e4224868d7..83521d4154a253d361b610f74fb6eecec6b70ee3 100755 (executable)
 #
 #
 
-# buildaix.ksh: This script builds an AIX fileset
+# buildaix.ksh: This script builds an AIX fileset of Apache httpd
 
+# if arguments - try to run fast
+cmd=$0
+
+export CFLAGS='-O2 -qlanglvl=extc99'
+
+lslpp -L bos.adt.insttools >/dev/null
+ [[ $? -ne 0 ]] && echo "must have bos.adt.insttools installed" && exit -1
+
+apr_config=`which apr-1-config`
+apu_config=`which apu-1-config`
+
+if [[ -z ${apr_config} && -z ${apu_config} ]]
+then
+       export PATH=/opt/bin:${PATH}
+       apr_config=`which apr-1-config`
+       apu_config=`which apu-1-config`
+fi
+
+while test $# -gt 0
+do
+  # Normalize
+  case "$1" in
+  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  case "$1" in
+  --with-apr=*)
+  apr_config=$optarg
+  ;;
+  esac
+
+  case "$1" in
+  --with-apr-util=*)
+  apu_config=$optarg
+  ;;
+  esac
+
+  shift
+  argc--
+done
+
+if [ ! -f "$apr_config" -a ! -f "$apr_config/configure.in" ]; then
+  echo "The apr source directory / apr-1-config could not be found"
+  echo "If available, install the ASF.apu.rte and ASF.apr.rte filesets"
+  echo "Usage: $cmd [--with-apr=[dir|file]] [--with-apr-util=[dir|file]]"
+  exit 1
+fi
+
+if [ ! -f "$apu_config" -a ! -f "$apu_config/configure.in" ]; then
+  echo "The apu source directory / apu-1-config could not be found"
+  echo "If available, install the ASF.apu.rte and ASF.apr.rte filesets"
+  echo "Usage: $cmd [--with-apr=[dir|file]] [--with-apr-util=[dir|file]]"
+  exit 1
+fi
+
+. build/aix/aixinfo
 LAYOUT=AIX
-TEMPDIR=/var/tmp/$USER/httpd-root
+TEMPDIR=/var/tmp/$USER/${NAME}.${VERSION}
 rm -rf $TEMPDIR
 
-## strange interaction between install and libtool requires a regular install
-## for all the links to succeed in the TEMPDIR
-## httpd-2.0 does not include ssl by default
-## will make a seperate build for that later
-
-> nohup.out
-./configure \
-       --enable-layout=$LAYOUT \
-       --enable-module=so \
-       --enable-proxy \
-       --enable-cache \
-       --enable-disk-cache \
-       --with-mpm=worker \
-       --enable-mods-shared=all | tee nohup.out
+if [[ ! -e ./Makefile ]] # if Makefile exists go faster
+then
+#              --with-mpm=worker \n\
+       echo "+ ./configure \n\
+               --enable-layout=$LAYOUT \n\
+               --with-apr=$apr_config \n\
+               --with-apr-util=$apu_config \n\
+               --enable-mpms-shared=all \n\
+               --enable-mods-shared=all \n\
+               --disable-lua > build/aix/configure.out"
 
-make | tee -a nohup.out
+#              --with-mpm=worker \
+       ./configure \
+               --enable-layout=$LAYOUT \
+               --with-apr=$apr_config \
+               --with-apr-util=$apu_config \
+               --enable-mpms-shared=all \
+               --enable-mods-shared=all \
+               --disable-lua > build/aix/configure.out
+                [[ $? -ne 0 ]] && echo './configure' returned an error && exit -1
+else
+       echo $0: using existing Makefile
+       echo $0: run make distclean to get a standard AIX configure
+       echo
+       ls -l ./Makefile config.*
+       echo
+fi
 
-make install > install.log
-make install DESTDIR=$TEMPDIR
+echo "+ make > build/aix/make.out"
+make > build/aix/make.out
+ [[ $? -ne 0 ]] && echo 'make' returned an error && exit -1
 
-# will make use of the pkginfo data as input for mkinstallp template
-cp build/aix/pkginfo $TEMPDIR
+echo "+ make install DESTDIR=$TEMPDIR > build/aix/install.out"
+make install DESTDIR=$TEMPDIR > build/aix/install.out
+ [[ $? -ne 0 ]] && echo 'make install' returned an error && exit -1
 
-## no seperate filesets for man pages, documents, etc.
+echo "+ build/aix/mkinstallp.ksh $TEMPDIR > build/aix/mkinstallp.out"
+build/aix/mkinstallp.ksh $TEMPDIR > build/aix/mkinstallp.out
+ [[ $? -ne 0 ]] && echo mkinstallp.ksh returned an error && exit -1
 
-build/aix/aixproto.ksh $TEMPDIR
+rm -rf $TEMPDIR
 
-# rm -rf $TEMPDIR
-ls -ltr build/aix | grep -i aix
+# list installable fileset(s)
+echo ========================
+installp -d build/aix -L
+echo ========================
index b582e042f94af6669b89d7b8421395339859300d..59fd053456837489f8a6cc049f9bde624ccae61d 100644 (file)
     datadir:       /var/httpd
     installbuilddir: ${datadir}/build
     errordir:      ${datadir}/error
-    iconsdir:      ${datadir}/icons
     htdocsdir:     ${datadir}/htdocs
-    manualdir:     ${datadir}/manual
     cgidir:        ${datadir}/cgi-bin
+    iconsdir:      ${prefix}/icons
+    manualdir:     ${prefix}/manual
     includedir:    ${prefix}/include
-    localstatedir: /var+
+    localstatedir: /var/httpd
     runtimedir:    ${localstatedir}/run
     logfiledir:    ${localstatedir}/logs
     proxycachedir: ${localstatedir}/proxy