diff options
Diffstat (limited to 'source/n/httpd')
-rw-r--r-- | source/n/httpd/doinst.sh | 12 | ||||
-rwxr-xr-x | source/n/httpd/httpd.SlackBuild | 43 | ||||
-rw-r--r-- | source/n/httpd/httpd.url | 4 | ||||
-rw-r--r-- | source/n/httpd/rc.httpd | 4 | ||||
-rw-r--r-- | source/n/httpd/slack-desc | 8 |
5 files changed, 48 insertions, 23 deletions
diff --git a/source/n/httpd/doinst.sh b/source/n/httpd/doinst.sh index da256515..e233c362 100644 --- a/source/n/httpd/doinst.sh +++ b/source/n/httpd/doinst.sh @@ -29,12 +29,14 @@ if [ ! -e var/log/httpd ]; then chmod 755 var/log/httpd fi -# Don't wipe out an existing document root: -if [ ! -L srv/www -a -d srv/www ]; then - mv srv/www srv/www.bak.$$ +# Don't wipe out an existing document root with symlinks. If someone has +# replaced the symlinks that are created on a fresh installation, assume +# that they know what they are doing and leave things as-is. +if [ ! -e srv/www ]; then + ( cd srv ; ln -sf /var/www www ) fi -if [ ! -L srv/httpd -a -d srv/httpd ]; then - mv srv/httpd srv/httpd.bak.$$ +if [ ! -e srv/httpd ]; then + ( cd srv ; ln -sf /var/www httpd ) fi # Once again, our intent is not to wipe out anyone's diff --git a/source/n/httpd/httpd.SlackBuild b/source/n/httpd/httpd.SlackBuild index cbabd7a9..a78468e3 100755 --- a/source/n/httpd/httpd.SlackBuild +++ b/source/n/httpd/httpd.SlackBuild @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,10 +23,11 @@ # This script was written using the one from slackbuilds.org as a reference, # so thanks to Adis Nezirovic ( adis _at_ linux.org.ba ) for the original work. +cd $(dirname $0) ; CWD=$(pwd) PKGNAM=httpd VERSION=${VERSION:-$(echo $PKGNAM-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-4} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -38,9 +39,16 @@ if [ -z "$ARCH" ]; then esac fi +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + NUMJOBS=${NUMJOBS:-" -j7 "} -CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-${PKGNAM} rm -rf $PKG @@ -63,7 +71,7 @@ fi cd $TMP rm -rf ${PKGNAM}-${VERSION} tar xvf $CWD/${PKGNAM}-$VERSION.tar.bz2 || exit 1 -cd ${PKGNAM}-$VERSION +cd ${PKGNAM}-$VERSION || exit 1 # Make sure ownerships and permissions are sane: chown -R root:root . @@ -120,10 +128,12 @@ CXXFLAGS="$SLKCFLAGS" \ --enable-cgi \ --with-pcre \ --enable-ssl \ + --enable-http2 \ --enable-rewrite \ --enable-vhost-alias \ --enable-proxy \ --enable-proxy-http \ + --enable-proxy-http2 \ --enable-proxy-ftp \ --enable-cache \ --enable-mem-cache \ @@ -187,9 +197,17 @@ zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/ cp -a \ - ABOUT_APACHE Apache.dsw BuildBin.dsp CHANGES INSTALL InstallBin.dsp LAYOUT LICENSE NOTICE NWGNUmakefile README* ROADMAP VERSIONING \ + ABOUT_APACHE CHANGES INSTALL LICENSE NOTICE README* ROADMAP VERSIONING \ $PKG/usr/doc/$PKGNAM-$VERSION +# If there's a CHANGES file, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r CHANGES ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) + cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES + touch -r CHANGES $DOCSDIR/CHANGES +fi + # Other distributions also strip the manual down to just English. # If this isn't your language of choice, mea culpa. ( cd $PKG/srv/httpd/htdocs/manual @@ -207,10 +225,15 @@ cp -a \ # symlinks allowing access through the FHS-approved pathnames. KDE, for example, # will look for htdig's htsearch here: /var/www/cgi-bin/htsearch mv $PKG/srv/httpd $PKG/var/www -( cd $PKG/srv - ln -sf /var/www . - ln -sf /var/www httpd -) + +## DISABLED. Don't make these symlinks prior to packaging any more, as it is +## possibly dangerous to an existing document root created in the place where +## these symlinks are normally found. Instead, we make them in the install +## script (only if nothing exists there already) +#( cd $PKG/srv +# ln -sf /var/www . +# ln -sf /var/www httpd +#) # OK, it's just not generally good form to put your web site in /var/www/htdocs, # but people do it every day. Like all new .new files, this won't save them this diff --git a/source/n/httpd/httpd.url b/source/n/httpd/httpd.url index fe13f34e..ae810414 100644 --- a/source/n/httpd/httpd.url +++ b/source/n/httpd/httpd.url @@ -1,2 +1,2 @@ -http://www.apache.org/dist/httpd/httpd-2.4.17.tar.bz2 -http://www.apache.org/dist/httpd/httpd-2.4.17.tar.bz2.asc +http://www.apache.org/dist/httpd/httpd-2.4.33.tar.bz2 +http://www.apache.org/dist/httpd/httpd-2.4.33.tar.bz2.asc diff --git a/source/n/httpd/rc.httpd b/source/n/httpd/rc.httpd index 81189098..6b251d90 100644 --- a/source/n/httpd/rc.httpd +++ b/source/n/httpd/rc.httpd @@ -16,14 +16,14 @@ case "$1" in ;; 'stop') /usr/sbin/apachectl -k stop - killall httpd + pkill -f /usr/sbin/httpd # Remove both old and new .pid locations: rm -f /var/run/httpd.pid /var/run/httpd/httpd.pid ;; 'force-restart') # Because sometimes restarting through apachectl just doesn't do the trick... /usr/sbin/apachectl -k stop - killall httpd + pkill -f /usr/sbin/httpd # Remove both old and new .pid locations: rm -f /var/run/httpd.pid /var/run/httpd/httpd.pid /usr/sbin/apachectl -k start diff --git a/source/n/httpd/slack-desc b/source/n/httpd/slack-desc index 38d240b6..3450b418 100644 --- a/source/n/httpd/slack-desc +++ b/source/n/httpd/slack-desc @@ -1,15 +1,15 @@ # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must -# make exactly 11 lines for the formatting to be correct. It's also +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. |-----handy-ruler------------------------------------------------------| httpd: httpd (The Apache HTTP Server) httpd: httpd: Apache is an HTTP server designed as a plug-in replacement for the -httpd: NCSA HTTP server. It fixes numerous bugs in the NCSA server and +httpd: NCSA HTTP server. It fixes numerous bugs in the NCSA server and httpd: includes many frequently requested new features, and has an API which httpd: allows it to be extended to meet users' needs more easily. httpd: |