IGNOREPATH=/tmp:/dev:/etc:/root:/var:/home:/usr/src:/mnt STRIPLIB=y STRIPBIN=y VERSION=1.3.31 MM_VER=1.3.0 MODSSL_VER=2.8.18-1.3.31 PROGNAME="Apache WWW server $VERSION" DESC="\ apache (The Apache HTTP Server) \n\ \n\ Apache is an HTTP server designed as a plug-in replacement for the \n\ NCSA HTTP server. It fixes numerous bugs in the NCSA server and \n\ includes many frequently requested new features, and has an API which \n\ allows it to be extended to meet users' needs more easily. \n\ \n\ Apache is the most popular web server in the known universe; over \n\ half of the servers on the Internet are running Apache or one of \n\ its variants." BUILD=1 MAINTAINER="Mark Post " SOURCE=ftp://ftp.apache.org PKGNAME=apache-$VERSION-s390-$BUILD TAG=REC compile() { # extract all of the source cd $TMP tar -zxvf $CWD/mm-$MM_VER.tar.gz tar -zxvf $CWD/apache_$VERSION.tar.gz tar -zxvf $CWD/mod_ssl-$MODSSL_VER.tar.gz # build mm cd $TMP/mm-$MM_VER/ chown -R root.root . ./configure \ --prefix=/usr \ --enable-static \ --enable-shared make # EAPI is not part of Apache by default, it comes from mod_ssl. It # allows us to build and package mod_ssl seperately. We pull out the # EAPI patch and apply it to Apache so that our build will have that # support enabled. We also apply a few other patches from mod_ssl. ( cd $TMP/apache_$VERSION cat $TMP/mod_ssl-$MODSSL_VER/pkg.eapi/eapi.patch | patch -p0 cat $TMP/mod_ssl-$MODSSL_VER/pkg.addon/addon.patch | patch -p0 ) ( cd $TMP/mod_ssl-$MODSSL_VER/pkg.eapi cp -a *.h $TMP/apache_$VERSION/src/include cp -a *.c $TMP/apache_$VERSION/src/ap ) ( cd $TMP/mod_ssl-$MODSSL_VER/pkg.addon cp -a *.c $TMP/apache_$VERSION/src/modules/extra cp -a *.html $TMP/apache_$VERSION/htdocs/manual/mod ) # build apache cd $TMP/apache_$VERSION # Stop using old obsolete DB1. zcat $CWD/apache.dbm.diff.gz | patch -p1 --verbose chown -R root.root . cat $CWD/config.layout.slack >> config.layout EAPI=SYSTEM \ ./configure \ --with-layout=Slackware \ --enable-module=most \ --enable-shared=max \ --manualdir=/var/www/htdocs/manual \ --enable-rule=eapi make } install() { # install mm cd $TMP/mm-$MM_VER/ make install prefix=/package-apache/usr mkdir -p /package-apache/usr/doc/mm-$MM_VER cp -a ChangeLog INSTALL LICENSE PORTING README THANKS \ /package-apache/usr/doc/mm-$MM_VER # install apache cd $TMP/apache_$VERSION make install root=/package-apache # install documentation mkdir -p /package-apache/usr/doc/apache-$VERSION cp -a ABOUT_APACHE Announcement INSTALL LICENSE README README.configure \ /package-apache/usr/doc/apache-$VERSION cp -a $TMP/mod_ssl-$MODSSL_VER/pkg.eapi/README.EAPI \ /package-apache/usr/doc/apache-$VERSION # add the apacheconfig script and the rc.httpd.new file ( cd /package-apache tar -zxvf $CWD/_apache.tar.gz etc/rc.d/ usr/sbin/ ) gzip -9 /package-apache/usr/man/*/* # we do not want these in the package, if they don't exist on the system # then we copy the default one in place as the real file ( cd /package-apache/etc/apache rm -rf access.conf httpd.conf magic mime.types srm.conf ) # This is a point of overlap with the mod_ssl package, so we'll make it # a symlink so that it's less of a trap for the unsuspecting admin: ( cd /package-apache/usr/sbin mv apachectl apachectl-standard ln -sf apachectl-standard apachectl ) # This shows up in Pat's build, but not mine. mkdir -p /package-apache/var/www/htdocs/manual/search/ } attributes() { chown -R root.bin $PKG/package-apache/usr/bin chown -R root.bin $PKG/package-apache/usr/sbin chown nobody.nobody $PKG/package-apache/var/cache/proxy chmod 755 $PKG/package-apache/usr/lib/libmm.so* chmod 664 $PKG/package-apache/usr/doc/mm-$MM_VER/* chmod 700 $PKG/package-apache/var/log/setup/apache } special() { cd $PKG mv package-apache/* ./ rmdir package-apache # we add a block to the end of httpd.conf and touch zero length files # for the SSL and PHP module packages cd $PKG/etc/apache cat << EOF >> httpd.conf.default # By default, all external Apache modules are disabled. To enable a particular # module for Apache, make sure the necessary packages are installed. Then # uncomment the appropriate Include line below, save the file, and restart # Apache. Note that some modules may need additional configuration steps. For # example, mod_ssl requires a site certificate which you may need to generate. # # Lastly, if you remove a module package, be sure to edit this file and comment # out the appropriate Include line. # ==> mod_php configuration settings <== # # PACKAGES REQUIRED: openssl-solibs (A series) and/or openssl (N series), # mysql (AP series), gmp (L series), and apache (N series) # #Include /etc/apache/mod_php.conf # ==> mod_ssl configuration settings <== # # PACKAGES REQUIRED: apache (N series) and openssl (N series) # #Include /etc/apache/mod_ssl.conf EOF cd $CTL cat $CWD/slack-desc > slack-desc sed -e 's%package-apache/%%g' doinst.sh > doinst.sh.new cat doinst.sh.new > doinst.sh rm doinst.sh.new cat $CWD/config.sh >> doinst.sh cat << "EOF" >> doinst.sh config etc/rc.d/rc.httpd.new # This won't be needed. The point here is to preserve the permissions of the existing # file, if there is one. I don't see major new development happening in rc.httpd... ;-) rm -f etc/rc.d/rc.httpd.new # Now copy the Apache config files into place if there are not existing copies: for cfgfile in access.conf httpd.conf magic mime.types srm.conf ; do if [ ! -f etc/apache/${cfgfile} ]; then cp -a etc/apache/${cfgfile}.default etc/apache/${cfgfile} fi done EOF }