cleansing

This commit is contained in:
Gwenhael Le Moine 2011-02-17 14:51:13 +07:00
parent 75a4d77c7b
commit 50a4ccd151

View file

@ -1,37 +1,22 @@
#!/bin/sh #!/bin/sh
# --- INIT --- CWD=$(pwd)
# Set initial variables: TAG=${TAG:-cyco}
CWD=`pwd` OUTPUT=${OUTPUT:-/tmp}
if [ "$TMP" = "" ]; then
TAG=cyco
OUTPUT=/tmp
TMP=/tmp/$TAG TMP=/tmp/$TAG
fi
PRGNAM=FlashBack PRGNAM=$(basename $(CWD))
VERSION=1.0 VERSION=${VERSION:-1.0}
ARCH=${ARCH:-dosbox} ARCH=${ARCH:-${ARCH:-dosbox}}
BUILD=1 BUILD=${BUILD:-1}
PKG=$TMP/pkg-$PRGNAM PKG=$TMP/pkg-$PRGNAM
# --- PACKAGE BUILDING ---
echo "++"
echo "|| $PRGNAM-$VERSION"
echo "++"
rm -rf $PKG $TMP/${PRGNAM}-${VERSION} rm -rf $PKG $TMP/${PRGNAM}-${VERSION}
cd $TMP cd $TMP
# --- TARBALL EXTRACTION,PATCH,MODIFY ---
#
# Install all the needed stuff to the package dir
#
mkdir -p $PKG/usr/bin $PKG/usr/share/games mkdir -p $PKG/usr/bin $PKG/usr/share/games
cd $PKG/usr/share/games cd $PKG/usr/share/games
tar xf $CWD/FlashBack.tar.bz2 tar xf $CWD/FlashBack.tar.bz2
@ -160,15 +145,11 @@ dosbox -conf /usr/share/games/FlashBack/dosbox.config
EOF EOF
chmod +x flashback.sh chmod +x flashback.sh
# --- OWNERSHIP, RIGHTS ---
chown -R root:root $PKG/* chown -R root:root $PKG/*
chmod -R go-w $PKG/usr/share/games/FlashBack/ chmod -R go-w $PKG/usr/share/games/FlashBack/
chmod 666 $PKG/usr/share/games/FlashBack/DATA/* chmod 666 $PKG/usr/share/games/FlashBack/DATA/*
chmod a+w $PKG/usr/share/games/FlashBack/DATA/{GLOBAL.FIB,DATA/FB_TXT.FNT,DATA/LOGOS.POL} chmod a+w $PKG/usr/share/games/FlashBack/DATA/{GLOBAL.FIB,DATA/FB_TXT.FNT,DATA/LOGOS.POL}
# --- PACKAGE DESCRIPTION ---
mkdir -p $PKG/install mkdir -p $PKG/install
cat <<EOF > $PKG/install/slack-desc cat <<EOF > $PKG/install/slack-desc
@ -193,8 +174,5 @@ ${PRGNAM}: see /usr/doc/${PRGNAM}-${VERSION} for more.
${PRGNAM}: ${PRGNAM}:
EOF EOF
# --- BUILDING ---
# Build the package:
cd $PKG cd $PKG
makepkg -l y -c n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}$TAG.txz makepkg -l y -c n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}$TAG.txz