mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-26 22:06:35 +01:00
65 lines
1.6 KiB
Bash
65 lines
1.6 KiB
Bash
#!/bin/sh
|
|
|
|
# Slackware build script for madbomber
|
|
|
|
# Written by B. Watson (yalhcru@gmail.com)
|
|
#
|
|
# Modified by the SlackBuilds.org project.
|
|
|
|
PRGNAM=madbomber
|
|
VERSION=${VERSION:-0.2.5}
|
|
ARCH=${ARCH:-i486}
|
|
BUILD=${BUILD:-1}
|
|
TAG=${TAG:-_SBo}
|
|
|
|
CWD=$(pwd)
|
|
TMP=${TMP:-/tmp/SBo}
|
|
PKG=$TMP/package-$PRGNAM
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
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.gz
|
|
cd $PRGNAM-$VERSION
|
|
chown -R root:root .
|
|
chmod -R a-s,u+w,go+r-w .
|
|
|
|
sed -i -e "s/-Wall/-Wall $SLKCFLAGS/" Makefile
|
|
|
|
make BIN_PREFIX=/usr/games/ DATA_PREFIX=/usr/share/$PRGNAM/
|
|
strip $PRGNAM
|
|
mkdir -p $PKG/usr/games/ $PKG/usr/share/$PRGNAM/
|
|
make install BIN_PREFIX=$PKG/usr/games DATA_PREFIX=$PKG/usr/share/$PRGNAM/
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
cp *.txt $PKG/usr/doc/$PRGNAM-$VERSION
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
mkdir -p $PKG/usr/share/applications
|
|
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
|
|
|
|
mkdir -p $PKG/usr/man/man6
|
|
gzip -9c $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
|
|
|
|
# Don't need these:
|
|
rm -f $PKG/usr/doc/$PRGNAM-$VERSION/INSTALL.txt
|
|
rm -rf $PKG/usr/share/$PRGNAM/embedded
|
|
|
|
mkdir -p $PKG/install
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
|
|
|
cd $PKG
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
|