add Zed Shaw's mongrel2
This commit is contained in:
parent
7ad9a92152
commit
c1423a0594
1 changed files with 77 additions and 0 deletions
77
n/mongrel2/mongrel2.SlackBuild
Executable file
77
n/mongrel2/mongrel2.SlackBuild
Executable file
|
@ -0,0 +1,77 @@
|
|||
#!/bin/sh -x
|
||||
|
||||
CWD=$(pwd)
|
||||
PRGNAM=$(basename $CWD)
|
||||
TMP=${TMP:-/tmp/cyco}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
VERSION=${VERSION:-$(echo $PRGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
||||
ARCH=${ARCH:-$(uname -m)}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-cyco}
|
||||
|
||||
PREFIX=/usr
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || exit 1
|
||||
mv ${PRGNAM}_* $PRGNAM-$VERSION
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
# for some reason Slackware needs -ldl to explicitely be added
|
||||
sed -i 's|LIBS=-lzmq -lsqlite3|LIBS=-lzmq -lsqlite3 -ldl|' Makefile
|
||||
# hmmm, no.
|
||||
sed -i 's|sudo ||g' Makefile
|
||||
|
||||
# launching tests hangs, so we don't run them -.-
|
||||
make bin/mongrel2 PREFIX=$PREFIX
|
||||
|
||||
mkdir -p $PKG$PREFIX/bin
|
||||
make install-bin PREFIX=$PKG$PREFIX
|
||||
|
||||
sed -i 's|python setup.py install|python setup.py install --root=$(DESTDIR)|' Makefile
|
||||
make install-py DESTDIR=$PKG
|
||||
|
||||
( cd $PKG
|
||||
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
)
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a LICENSE docs/ examples/ $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat <<EOF > $PKG/install/slack-desc
|
||||
$PRGNAM: $PRGNAM (Web server)
|
||||
$PRGNAM:
|
||||
$PRGNAM: Mongrel2 is an application, language, and network architecture agnostic
|
||||
$PRGNAM: web server that focuses on web applications over serving files using
|
||||
$PRGNAM: modern browser technologies.
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM: http://mongrel2.org
|
||||
$PRGNAM:
|
||||
EOF
|
||||
|
||||
cd $PKG
|
||||
makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
Loading…
Add table
Reference in a new issue