aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/apache/mod_macro/Manifest23
-rw-r--r--www/apache/mod_macro/mod_macro.SlackBuild218
2 files changed, 241 insertions, 0 deletions
diff --git a/www/apache/mod_macro/Manifest b/www/apache/mod_macro/Manifest
new file mode 100644
index 00000000..dc5d8c90
--- /dev/null
+++ b/www/apache/mod_macro/Manifest
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+DIST mod_macro-1.1.10.tar.bz2 13517 MD5 ebc44eea3e197a38c93d9deb0afcb8ff RMD160 f7da506621f0074d452793d906d3402e47748766 SHA1 64190e39ef1a19105082ddf0e5397ac369843255 SHA256 9ce558d0b182a721a04e5b499ba2684d07c5ba2c7a552d8a844489beb9e339d0 SHA512 65cc668de21afcb365d8e71369e8c50548270557f66d3905b9757625f0a24cad461c103fe929dcdcabc92438a8e74dcf77e9b807c00045b0c97396e8ce55d04e
+MKBUILD mod_macro.mkbuild 5225 MD5 cac7b4bc41e2df1785336cca171babf2 RMD160 1d5889bbc61b04f88d8d9ab2ee433d242e389daa SHA1 4d532dd97249fe452a079e039fdfd0104a7597d5 SHA256 d6c642c1c9f48c3b848cc46c2b4196b44fb73c6ef462f1ccb105bff8d1e8952a SHA512 5f2c157d503caa7e183f3fd98b4a1536ba503596539f84f56f47bf4b11189c85ea832c001d1005bf2812e8fd4cc7a01863d8c8c28045e2aee91762acc822f2db
+SLACKBUILD mod_macro.SlackBuild 6921 MD5 3de520d339cf8e2ee4c83b9b24f1b92f RMD160 6a16a7ac2ef77512109a8f8cd876be3c69bb0b55 SHA1 e3738d61d098c895723431e4969f1866c5fc8793 SHA256 0a972e1d07aab1a56e8741802142af379aededb85edf3632e2443895954a1209 SHA512 7102b9775efe63b680a9db38e6b4eca8176bc1e8dabed87788efc7da0ebe7966c19cc8f88ea6d05d70cabc25408de1ca21212ead6e19a10be36e9305fa6a25c5
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBAgAGBQJJ1N6yAAoJEEHL93ESzgeiZHoP/10XLQNSFWaKskY3V3BZdFhC
+6zJ2a8boI1zVT74WgAXrbwU4i4hJmJKah1Ui3NtxdeyHnqL2hdstgEVrlsPOPWZ8
+XXMnqu79Dg92Hq2Ct0nKgl4HgIONfkXxH4S6ndqqoYuvSF5SqPySV/5e86bAv0MQ
+3IrMaDe3W9rBHm8hthd1GGmJ1mRl/nMWqRP+OQ8yJT4PZYDMK+DIKCPSp6IkXaTB
+lfDhILw5UjySzCgsCoe9D8fki2QotM8XAWSGpghi9zeg33K6+904eey6gQzyre2B
+zCzZ7SJwWEe+LQT0bg5cnxXOeAPGKWK0R5Z8GsV2VhrhtvkZmk8SY6K/KIJteBiP
+sIiIkkCVCf9muJA2kWKL/3oOJTp/dfA23OcO6xzRScpCBs05k9OP0GYFFj7L5Z3i
+mmxnHnbvJNQaCw7DD3c4i3Wmgy6H41TLmoXDXNJELXQkL706XPQZaMjEydbgdzPj
+A8aA5m6qXN69slmm4PQL2Xq+dvy6E57A4WJDqqVz02rBE7z1n9d0duC3fNjehLsQ
+iVckP6i9QhMERF9JzF3JztbUzWYHptzXATEVjCl197ixEOdiF8z/c5OK/1xkI7bu
+zff7H7FOHdH6xvu+X+TtUsHf1srIhDI9AEjByBM0MYeyzQzeDaXnC4XHdZhpjbFT
+bAIXDhaZzU4m++MljQl7
+=JklA
+-----END PGP SIGNATURE-----
diff --git a/www/apache/mod_macro/mod_macro.SlackBuild b/www/apache/mod_macro/mod_macro.SlackBuild
new file mode 100644
index 00000000..2ddb7273
--- /dev/null
+++ b/www/apache/mod_macro/mod_macro.SlackBuild
@@ -0,0 +1,218 @@
+#!/bin/bash
+#
+# mod_macro.SlackBuild is free software; you can redistribute
+# it and/or modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the License,
+# or any later version.
+#
+# mod_macro.SlackBuild is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# slackbuild for mod_macro, by Silvio Rhatto
+# requires:
+# tested: mod_macro-1.1.10
+# model: generic.mkSlackBuild $Rev: 805 $
+#
+
+# Look for slackbuildrc
+if [ -f ~/.slackbuildrc ]; then
+ source ~/.slackbuildrc
+elif [ -f /etc/slackbuildrc ]; then
+ source /etc/slackbuildrc
+fi
+
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="mod_macro"
+PKG_NAME="mod_macro"
+ARCH=${ARCH:=i486}
+SRC_VERSION=${VERSION:=1.1.10}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
+BUILD=${BUILD:=1rha}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
+TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
+REPOS=${REPOS:=$TMP}
+SLACKBUILD_PATH=${SLACKBUILD_PATH:="www/apache/mod_macro"}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
+fi
+
+# Set error codes (used by createpkg)
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
+ERROR_MANIFEST=43;
+
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
+
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
+
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.bz2"
+URL="http://www.coelho.net/mod_macro/$SRC"
+
+if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
+fi
+
+# Check Manifest file
+if [ -e "$CWD/Manifest" ]; then
+
+ # Manifest signature checking
+ if grep -q -- "-----BEGIN PGP SIGNED MESSAGE-----" $CWD/Manifest; then
+ echo "Checking Manifest signature..."
+ gpg --verify $CWD/Manifest
+ if [ "$?" != "0" ]; then
+ exit $ERROR_MANIFEST
+ fi
+ fi
+
+ MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`"
+
+ for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do
+
+ MANIFEST_LINE="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | head -n $MANIFEST_COUNT | tail -n 1`"
+ MANIFEST_FILE="`echo $MANIFEST_LINE | awk '{ print $2 }'`"
+ MANIFEST_FILE_TYPE="`echo $MANIFEST_LINE | awk '{ print $1 }'`"
+
+ if [ -e "$SRC_DIR/$MANIFEST_FILE" ]; then
+ MANIFEST_FILE="$SRC_DIR/$MANIFEST_FILE"
+ else
+ MANIFEST_FILE="`find $CWD -name $MANIFEST_FILE`"
+ fi
+
+ if [ ! -e "$MANIFEST_FILE" ] || [ -d "$MANIFEST_FILE" ]; then
+ continue
+ fi
+
+ echo "Checking Manifest for $MANIFEST_FILE_TYPE $MANIFEST_FILE integrity..."
+
+ SIZE_SRC="`wc -c $MANIFEST_FILE | awk '{ print $1 }'`"
+ SIZE_MANIFEST="`echo $MANIFEST_LINE | awk '{ print $3 }'`"
+
+ # Check source code size
+ if [ "$SIZE_SRC" != "$SIZE_MANIFEST" ]; then
+ echo "SIZE Manifest: $SIZE_MANIFEST; SIZE $SRC: $SIZE_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "Size match."
+ fi
+
+ # Check source code integrity
+ for ALGO in md5 rmd160 sha1 sha256 sha512; do
+ if [ $ALGO = "rmd160" ]; then
+ ALGO_SRC="`openssl rmd160 $MANIFEST_FILE | awk '{ print $2 }'`"
+ else
+ ALGO_SRC="`"$ALGO"sum $MANIFEST_FILE | awk '{ print $1 }'`"
+ fi
+ ALGO="`echo $ALGO | tr '[:lower:]' '[:upper:]'`"
+ ALGO_MANIFEST=$(echo $MANIFEST_LINE | sed "s/.* $ALGO //" | awk '{ print $1 }')
+ if [ "$ALGO_SRC" != "$ALGO_MANIFEST" ]; then
+ echo "$ALGO Manifest: $ALGO_MANIFEST; $ALGO $SRC: $ALGO_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "$ALGO match."
+ fi
+ done
+
+ done
+
+else
+ exit $ERROR_MANIFEST
+fi
+
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Make
+apxs -c mod_macro.c
+
+# Install
+mkdir -p $PKG/$LIBDIR/httpd/modules
+cp .libs/mod_macro.so $PKG/$LIBDIR/httpd/modules
+
+# Strip binaries
+( 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
+)
+
+# Install documentation
+DOCS="CHANGES INSTALL LICENSE README"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
+ fi
+done
+
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
+# HOW TO EDIT THIS FILE:
+# 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
+# customary to leave one space after the ':'.
+
+ _ |-----handy-ruler----------------------------------------------------|
+mod_macro: mod_macro
+mod_macro:
+mod_macro: mod_macro is a third-party module to the Apache Http Server,
+mod_macro: distributed with a BSD-style license like Apache.
+mod_macro:
+mod_macro: It allows the definition and use of macros within apache
+mod_macro: runtime configuration files.
+mod_macro:
+mod_macro: The syntax is a natural extension to apache html-like
+mod_macro: configuration style.
+mod_macro:
+EODESC
+
+# Build the package
+cd "$PKG"
+mkdir -p $REPOS/$SLACKBUILD_PATH
+makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
+
+# Delete source and build directories if requested
+if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then
+ rm -rf "$PKG_WORK" "$PKG"
+fi