#!/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. SHIM="# " # Add enough spaces between quotes to match name on next line NAME="lletters" VERSION=0.1.95 ARCH=i586 BUILD=1vl59 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.tar.gz cd $NAME-$VERSION tar xzvf $CWD/lletters-media-0.1.9a.tar.gz patch -Np1 -i $CWD/lletters_0.1.95+gtk2-3.diff 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 {} \; ./configure make || exit 1 make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/$NAME-$VERSION cp ABOUT-NLS AUTHORS COPYING CREDITS INSTALL NEWS README* TODO ChangeLog $PKG/usr/doc/$NAME-$VERSION/ cp $CWD/$NAME.SlackBuild $PKG/usr/doc/$NAME-$VERSION/ mkdir -p $PKG/usr/share/applications cat > $PKG/usr/share/applications/$NAME.desktop << EOF [Desktop Entry] Version=1.0 Encoding=UTF-8 Type=Application Name=Linux Letters and Numbers Name[es]=Linux Letras y Números Name[fr]=Linux Lettres et Nombres Name[nl]=Linux Letters en Nummers GenericName=lletters Comment=GTK letters-learning game for small children Comment[es]=Juego de aprendizaje de letras para niños Icon=lletters.xpm FilePattern=lletters Exec=lletters Terminal=false StartupNotify=false Categories=Application;Game;Education;KidsGame;2DGraphics; EOF mkdir -p $PKG/usr/share/pixmaps cp lln-icon.xpm $PKG/usr/share/pixmaps/lletters.xpm mkdir -p $PKG/install 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: lletters (Linux Letters and Numbers childrens educational game) $NAME: Based on authors daughters favorite Windows game Larry's Learning $NAME: Letters and Numbers. This is a Linux replacement, written from $NAME: scratch, with many improvements. It was built using GTK for X. This $NAME: package has been patched to work with GTK2. $NAME: $NAME: en, nl, fr, es Language support. $NAME: $NAME: License: GPL $NAME: Author: Kirk Ismay, $NAME: Website: http://lln.sourceforge.net/ #---------------------------------------- BUILDDATE: `date` PACKAGER: $VL_PACKAGER HOST: `uname -srm` DISTRO: `cat /etc/vector-version` CFLAGS: $CFLAGS CONFIGURE: ./configure EOF cat $RELEASEDIR/slack-desc > $PKG/install/slack-desc 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 echo "Creating package $NAME-$VERSION-$ARCH-$BUILD.tlz" requiredbuilder -v -y -s $RELEASEDIR $PKG makepkg -l y -c n $RELEASEDIR/$NAME-$VERSION-$ARCH-$BUILD.tlz cd $CWD rm -rf $TMP echo "Done"