#!/bin/sh # This SlackBuild like script is designed for Vector Linux packages by exeterdad. # This script assumes it will be launched within "/NAME/VERSION/src" dir. With all sources in "src" # Your Vector Linux .tlz package, slack-desc, and slack-required will be found in "VERSION" dir. # The extraction and build will be in a temp dir created in "NAME" dir, and then removed on exit. # Comment out last line to keep this dir intact. # Nothing compiled here. The INSTALL.sh in the sources is useless to a packager so we're going # to round up all the files and package them. Also the INSTALL.sh creates a directory tree that # makes absolutely no sense. We're gonna fix that. SHIM="# " # Add enough spaces between quotes to match quotes around name on next line NAME="childsplay_plugins" VERSION=0.85.2 ARCH=i586 BUILD=1vl58 VL_PACKAGER=exeterdad CWD=`pwd` cd ../ RELEASEDIR=`pwd` cd $CWD mkdir $RELEASEDIR/tmp TMP=$RELEASEDIR/tmp PKG=$TMP/package-$NAME if [ $UID != 0 ]; then echo "You need to be root to run this script." exit fi if [ ! -x /usr/bin/requiredbuilder ]; then echo "Requiredbuilder not installed, or not executable." exit fi export CFLAGS="-O2 -march=i586 -mtune=i686" export CXXFLAGS="-O2 -march=i586 -mtune=i686" rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf $NAME-$VERSION tar xzvf $CWD/$NAME-$VERSION.tgz cd $TMP/$NAME-$VERSION chown -R root:root . find . -perm 664 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 2777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 2755 -exec chmod 755 {} \; find . -perm 774 -exec chmod 644 {} \; find . -perm 666 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; # the translation is merged into the assetml file, so don't ship it seperatly rm -r assetml/childsplay/sounds-misc/po mkdir -p $PKG/usr/share/childsplay/plugins mkdir -p $PKG/usr/share/childsplay/Data/icons cp -R Data/AlphabetSounds $PKG/usr/share/childsplay/Data/ cp -a Data/*.icon.png $PKG/usr/share/childsplay/Data/icons cp -a lib/* $PKG/usr/share/childsplay/plugins cp -a assetml/childsplay/* $PKG/usr/share/childsplay mkdir -p $PKG/usr/share/doc/$NAME-$VERSION mkdir -p $PKG/install cp README* GPL* $PKG/usr/share/doc/$NAME-$VERSION cp $CWD/$NAME.SlackBuild $PKG/usr/share/doc/$NAME-$VERSION/ cat > $RELEASEDIR/slack-desc << EOF # 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 ':'. $SHIM|-----handy-ruler------------------------------------------------------| $NAME: childsplay_plugins (Additional games for Childsplay) $NAME: $NAME: Plugins for Childsplay a suite of educational games for young $NAME: children. $NAME: $NAME: $NAME: $NAME: $NAME: License: GPL-2 $NAME: Author: See Docs $NAME: Website: http://childsplay.sourceforge.net/ #---------------------------------------- BUILDDATE: `date` PACKAGER: $VL_PACKAGER HOST: `uname -srm` DISTRO: `cat /etc/vector-version` CFLAGS: $CFLAGS CONFIGURE: N/A EOF cat $RELEASEDIR/slack-desc > $PKG/install/slack-desc cd $PKG echo "Creating package $NAME-$VERSION-$ARCH-$BUILD.tlz" # No need to run requiredbuilder here as it won't be able to pick up the deps. # So we create the slack-required files manually cat > $PKG/install/slack-required << EOF python >= 2.4.3-i486-4 SDL >= 1.2.11-i586-4vl58 SDL_image >= 1.2.5-i586-4vl58 SDL_mixer >= 1.2.7-i586-4vl58 SDL_ttf >= 2.0.8-i586-4vl58 pygame >= 1.7.1release-i586-1vl58 libogg >= 1.1.3-486-1 childsplay >= 0.85.1-i586-1vl58 EOF cat > $RELEASEDIR/slack-required << EOF python >= 2.4.3-i486-4 SDL >= 1.2.11-i586-4vl58 SDL_image >= 1.2.5-i586-4vl58 SDL_mixer >= 1.2.7-i586-4vl58 SDL_ttf >= 2.0.8-i586-4vl58 pygame >= 1.7.1release-i586-1vl58 libogg >= 1.1.3-486-1 childsplay >= 0.85.1-i586-1vl58 EOF makepkg -l y -c n $RELEASEDIR/$NAME-$VERSION-$ARCH-$BUILD.tlz cd $CWD rm -rf $TMP echo "Done"