diff options
author | Graham Leggett <minfrin@apache.org> | 2012-02-05 20:23:45 +0100 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2012-02-05 20:23:45 +0100 |
commit | 4e5fbbb105879d3a0d0a9b12ed54a173df42e413 (patch) | |
tree | d5f60fe30d95ed45968fda0a1dc719a6a019dc6d /build | |
parent | Replace ap_create_core_ctx()/ap_core_ctx_get_bb() with a hook (diff) | |
download | apache2-4e5fbbb105879d3a0d0a9b12ed54a173df42e413.tar.xz apache2-4e5fbbb105879d3a0d0a9b12ed54a173df42e413.zip |
aix: Add a set of build scripts that make packages suitable for installp
on the AIX platform.
Submitted by: Michael Felt <mamfelt gmail com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1240778 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build')
-rw-r--r-- | build/aix/README | 32 | ||||
-rwxr-xr-x | build/aix/aixproto.ksh | 78 | ||||
-rwxr-xr-x | build/aix/buildaix.ksh | 53 |
3 files changed, 163 insertions, 0 deletions
diff --git a/build/aix/README b/build/aix/README new file mode 100644 index 0000000000..8cc75a5903 --- /dev/null +++ b/build/aix/README @@ -0,0 +1,32 @@ +The script buildaix.ksh will attempt to build a AIX installp fileset +out of a source tree for httpd. + +REQUIREMENTS: +fileset bos.adt.insttools + +RECOMMENDED: +Toolbox filesets zlib and zlib-devel +Toolbox fileset coreutils + +To build a package, make sure you are in the root of the source tree, +and run: + +build/aix/buildaix.ksh + +## coming - argument to leave the DESTDIR results for manual +## modifications to the template (to create seperate filesets) + +An AIX fileset named <PKG>.<NAME>.<version>.<architecture>.I will be +created in the build/aix directory. Also included is the .template file. + +KNOWN issues: +on AIX libtool is known to have issues with the install command. +many of these issues can be resolved by inserting the GNU install command +earlier in the PATH variable. Testing has shown that this may still +have issues when installing to DESTDIR. To compensate for this +the buildaix.ksh also does a "regular" make install before executing +the make DESTDIR=$TEMPDIR install command + +TODO +Add Apache LICENSE to fileset and require acceptance +Add test for bos.adt.insttools at start of build script diff --git a/build/aix/aixproto.ksh b/build/aix/aixproto.ksh new file mode 100755 index 0000000000..5c5c471a72 --- /dev/null +++ b/build/aix/aixproto.ksh @@ -0,0 +1,78 @@ +#!/usr/bin/ksh +TEMPDIR=$1 +BUILD=`pwd` +. build/aix/pkginfo + +package=$PKG +name=$NAME +vrmf=$VERSION +descr="$VENDOR $NAME for $ARCH" +umask 022 +INFO=$BUILD/build/aix/.info +mkdir -p $INFO + +template=${INFO}/${PKG}.${NAME}.${vrmf}.template +>$template + +cd ${TEMPDIR} +rm -rf .info lpp_name tmp +# get the directory sizes in blocks +for d in etc opt var +do + set `du -s $d/${NAME}` + let sz$d=$1+1 +done +set `du -s usr/share/man` +szman=$1+1 + +files=./httpd-root +cd ${TEMPDIR}/.. +find ${files} -type d -exec chmod og+rx {} \; +chmod -R go+r ${files} +chown -R 0:0 ${files} + +cat - <<EOF >>$template +Package Name: ${package}.${NAME} +Package VRMF: ${vrmf}.0 +Update: N +Fileset + Fileset Name: ${package}.${NAME}.rte + Fileset VRMF: ${vrmf}.0 + Fileset Description: ${descr} + USRLIBLPPFiles + EOUSRLIBLPPFiles + Bosboot required: N + License agreement acceptance required: N + Include license files in this package: N + Requisites: + Upsize: /usr/share/man ${szman}; + Upsize: /etc/${NAME} $szetc; + Upsize: /opt/${NAME} $szopt; + Upsize: /var/${NAME} $szvar; + USRFiles +EOF + +find ${files} | sed -e s#^${files}## | sed -e "/^$/d" >>$template + +cat - <<EOF >>$template + EOUSRFiles + ROOT Part: N + ROOTFiles + EOROOTFiles + Relocatable: N +EOFileset +EOF + +cp ${template} ${BUILD}/build/aix + +# use mkinstallp to create the fileset. result is in ${TEMPDIR}/tmp +mkinstallp -d ${TEMPDIR} -T ${template} + +cp ${TEMPDIR}/tmp/$PKG.$NAME.$VERSION.0.bff ${BUILD}/build/aix +cd $BUILD/build/aix +rm -f $PKG.$NAME.$VERSION.$ARCH.I +mv $PKG.$NAME.$VERSION.0.bff $PKG.$NAME.$VERSION.$ARCH.I +rm .toc +inutoc . +installp -d . -ap ${PKG}.${NAME} +installp -d . -L diff --git a/build/aix/buildaix.ksh b/build/aix/buildaix.ksh new file mode 100755 index 0000000000..a7caa6ba21 --- /dev/null +++ b/build/aix/buildaix.ksh @@ -0,0 +1,53 @@ +#!/usr/bin/ksh +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +# buildaix.ksh: This script builds an AIX fileset + +LAYOUT=AIX +TEMPDIR=/var/tmp/$USER/httpd-root +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 + +make | tee -a nohup.out + +make install > install.log +make install DESTDIR=$TEMPDIR + +# will make use of the pkginfo data as input for mkinstallp template +cp build/aix/pkginfo $TEMPDIR + +## no seperate filesets for man pages, documents, etc. + +build/aix/aixproto.ksh $TEMPDIR + +# rm -rf $TEMPDIR +ls -ltr build/aix | grep -i aix |