aboutsummaryrefslogtreecommitdiff
path: root/patches/mod_ssl
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-10-19 19:31:21 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-10-19 19:31:21 +0000
commit3b42ea2913d5aa8077aba9fe1761b824398f9804 (patch)
tree64bcbbc6876e27f863df0ef9e9346e22b8291294 /patches/mod_ssl
parent8faf3506c7ee2a4a2f210d11d41ba91d9bd27eea (diff)
downloadslackbuilds-3b42ea2913d5aa8077aba9fe1761b824398f9804.tar.gz
slackbuilds-3b42ea2913d5aa8077aba9fe1761b824398f9804.tar.bz2
fixing permissions, part 1
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@455 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'patches/mod_ssl')
-rwxr-xr-xpatches/mod_ssl/mod_ssl.SlackBuild193
1 files changed, 193 insertions, 0 deletions
diff --git a/patches/mod_ssl/mod_ssl.SlackBuild b/patches/mod_ssl/mod_ssl.SlackBuild
new file mode 100755
index 00000000..ec74e091
--- /dev/null
+++ b/patches/mod_ssl/mod_ssl.SlackBuild
@@ -0,0 +1,193 @@
+#!/bin/bash
+#
+# Build and package mod_ssl on Slackware.
+# by: David Cantrell <david@slackware.com>
+# Currently maintained by: PJV <volkerdi@slackware.com>
+#
+# Small changes by rhatto
+#
+
+CWD="`pwd`"
+
+if [ -f "/etc/slackbuildrc" ]; then
+ source /etc/slackbuildrc
+fi
+
+if [ -f "~/.slackbuildrc" ]; then
+ source ~/.slackbuildrc
+fi
+
+PACKAGE="mod_ssl"
+MODSSL_VER=${MODSSL_VER:=2.8.28}
+APACHE_VER=${APACHE_VER:=1.3.37}
+ARCH=${ARCH:=i486}
+BUILD=${BUILD:=1rha}
+REPOS=${REPOS:=$TMP}
+
+SRC_DIR=${SRC:=$CWD}
+TMP=${TMP:=/tmp}
+
+cat << EOCAT
+
+Pleasy check if the apache version installed system-wide is $APACHE_VER,
+otherwise upgrade your apache.
+
+Press ENTER to continue.
+EOCAT
+
+read garbage
+
+RTOOL="wget"
+MODSSL="mod_ssl-$MODSSL_VER-$APACHE_VER.tar.gz"
+MODSSL_URL="http://www.modssl.org/source/$MODSSL"
+APACHE="apache_$APACHE_VER.tar.gz"
+APACHE_URL="http://ftp.unicamp.br/pub/apache/httpd/$APACHE"
+
+SRC_DIR="$SRC_DIR/$PACKAGE"
+mkdir -p $SRC_DIR
+
+if [ "$RTOOL" == "wget" ]; then
+
+ if [ ! -f "$SRC_DIR/$MODSSL" ]; then
+ wget "$MODSSL_URL" -O "$SRC_DIR/$MODSSL"
+ fi
+
+ if [ ! -f "$SRC_DIR/$APACHE" ]; then
+ wget "$APACHE_URL" -O "$SRC_DIR/$APACHE"
+ fi
+
+fi
+
+TMP="$TMP/$PACKAGE"
+rm -rf $TMP
+mkdir -p $TMP
+cd $TMP
+
+PKG=$TMP/package-$PACKAGE
+mkdir -p $PKG
+( cd $PKG ; explodepkg $CWD/_mod_ssl.tar.gz )
+# Install sample config file:
+cat $CWD/mod_ssl.conf.example > $PKG/etc/apache/mod_ssl.conf.new
+
+cd $TMP
+rm -rf mod_ssl-$MODSSL_VER-$APACHE_VER
+rm -rf apache_$APACHE_VER
+tar xvzf $SRC_DIR/apache_$APACHE_VER.tar.gz
+tar xvzf $SRC_DIR/mod_ssl-$MODSSL_VER-$APACHE_VER.tar.gz
+
+# build mod_ssl
+cd $TMP/mod_ssl-$MODSSL_VER-$APACHE_VER
+chown -R root.root .
+
+if [ "$ARCH" == "x86_64" ]; then
+ ( cd pkg.sslmod ; zcat $CWD/libssl.module.diff.gz | patch -p0 --verbose )
+fi
+
+./configure --with-apxs=/usr/sbin/apxs \
+ --with-crt=/etc/apache/mod_ssl/server.crt \
+ --with-key=/etc/apache/mod_ssl/server.key \
+ --with-patch=/usr/bin/patch
+
+# Enjoy this kludge! :-)
+if [ "$ARCH" == "x86_64" ]; then
+ echo "SSL_CFLAGS= -DSSL_ENGINE -DSSL_USE_SDBM -L/usr/lib64" >> pkg.sslmod/Makefile
+else
+ echo "SSL_CFLAGS= -DSSL_ENGINE -DSSL_USE_SDBM" >> pkg.sslmod/Makefile
+fi
+
+make -j3
+
+# go back to the Apache tree and generate the additional package components
+cd $TMP/apache_$APACHE_VER
+cat $TMP/mod_ssl-$MODSSL_VER-$APACHE_VER/pkg.sslcfg/sslcfg.patch | patch -p0
+cat $TMP/mod_ssl-$MODSSL_VER-$APACHE_VER/pkg.ssldoc/ssldoc.patch | patch -p0
+cat $TMP/mod_ssl-$MODSSL_VER-$APACHE_VER/pkg.sslsup/sslsup.patch | patch -p0
+zcat $CWD/../apache/apache.dbm.diff.gz | patch -p1
+( cd $TMP/apache_$APACHE_VER/src/support
+ cat apachectl | sed -e "s|PIDFILE=/usr/local/apache/logs/httpd.pid|PIDFILE=/var/run/httpd.pid|g" | sed -e "s|HTTPD='/usr/local/apache/src/httpd'|HTTPD=/usr/sbin/httpd|g" > apachectl.new
+ mv apachectl.new apachectl )
+
+# install mod_ssl
+cd $TMP/mod_ssl-$MODSSL_VER-$APACHE_VER
+make -j3
+make install
+mkdir -p $PKG/usr/doc/mod_ssl-$MODSSL_VER-$APACHE_VER
+cp -a ANNOUNCE CREDITS INSTALL LICENSE NEWS README* \
+ $PKG/usr/doc/mod_ssl-$MODSSL_VER-$APACHE_VER
+
+# install the other components for this package
+cd $TMP/mod_ssl-$MODSSL_VER-$APACHE_VER
+( cd pkg.sslcfg
+ cp -a README.CRT Makefile.crt ca-bundle.crt snakeoil-ca-rsa.crt \
+ snakeoil-ca-dsa.crt snakeoil-rsa.crt snakeoil-dsa.crt \
+ server.crt $PKG/etc/apache/ssl.crt )
+( cd pkg.sslcfg
+ cp -a README.CSR server.csr $PKG/etc/apache/ssl.csr )
+( cd pkg.sslcfg
+ cp -a README.PRM snakeoil-ca-dsa.prm snakeoil-dsa.prm \
+ $PKG/etc/apache/ssl.prm )
+( cd pkg.sslcfg
+ cp -a Makefile.crl README.CRL $PKG/etc/apache/ssl.crl )
+( cd pkg.sslcfg
+ cp -a README.KEY snakeoil-ca-rsa.key snakeoil-ca-dsa.key snakeoil-rsa.key \
+ snakeoil-dsa.key server.key $PKG/etc/apache/ssl.key )
+
+( cd pkg.ssldoc
+ cp -a index.html ssl_* $PKG/var/www/htdocs/manual/mod/mod_ssl )
+( cd pkg.ssldoc
+ cp -a apache_pb.gif feather.jpg mod_ssl_sb.gif openssl_ics.gif \
+ $PKG/var/www/htdocs/manual/images )
+
+cd $TMP/apache_$APACHE_VER
+( cd htdocs
+ cp -a index.html.en $PKG/var/www/htdocs )
+( cd htdocs/manual/mod
+ cp -a index.html.en index-bytype.html.en directives.html.en \
+ $PKG/var/www/htdocs/manual/mod )
+( cd src/support
+ cp -a apachectl $PKG/usr/sbin )
+# This is a point of overlap with the apache package, so we'll make it
+# a symlink so that it's less of a trap for the unsuspecting admin:
+( cd $PKG/usr/sbin
+ mv apachectl apachectl-mod_ssl
+ ln -sf apachectl-mod_ssl apachectl
+)
+
+# Make key files that we wouldn't want overwritten use .new:
+for file in \
+$PKG/etc/apache/ssl.crt/server.crt \
+$PKG/etc/apache/ssl.csr/server.csr \
+$PKG/etc/apache/ssl.key/server.key ; do
+ mv $file ${file}.new
+done
+
+# get the module in the package
+mkdir -p $PKG/usr/libexec/apache
+cp -a /usr/libexec/apache/libssl.so $PKG/usr/libexec/apache
+
+# attributes
+chmod 700 $PKG/etc/apache/ssl.key
+
+# strip:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# some housekeeping
+chown -R root.bin $PKG/usr/sbin
+chmod 755 $PKG/usr/sbin/*
+
+# Install slack-desc:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# make the package
+cd $PKG
+makepkg -l y -c n $REPOS/mod_ssl-${MODSSL_VER}_${APACHE_VER}-$ARCH-$BUILD.tgz
+
+# clean up
+if [ "$CLEANUP" == "yes" ]; then
+ rm -rf $TMP
+fi
+