#!/bin/sh CWD=$(pwd) TAG=cyco OUTPUT=/tmp TMP=${TMP:-/tmp} PRGNAM=$(basename $CWD) PKG=$TMP/pkg-$PRGNAM VERSION=git$(date +%Y.%m.%d_%H.%M) ARCH=${ARCH:-$(uname -m)} BUILD=${BUILD:-1cyco} REPOSITORIES=/home/installs/SlackBuilds/repositories NUMJOBS=${NUMJOBS:-" -j2 "} rm -rf $PKG mkdir -p $TMP $PKG if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" fi if [ ! -e $REPOSITORIES/$PRGNAM ]; then git clone git://git.sv.gnu.org/gnash.git $REPOSITORIES/$PRGNAM else ( cd $REPOSITORIES/$PRGNAM git pull ) fi cd $TMP [ -e $PRGNAM-$VERSION ] && rm -rf $PRGNAM-$VERSION rsync -HPa --exclude .git\* $REPOSITORIES/$PRGNAM . mv $PRGNAM $PRGNAM-$VERSION cd $PRGNAM-$VERSION || exit 1 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 {} \; ./autogen.sh CFLAGS="$SLKCFLAGS" \ ./configure \ --enable-gui=gtk \ --enable-write \ --enable-ssh \ --enable-ssl \ --enable-doublebuf \ --enable-offscreen \ --enable-hwaccel=vaapi \ --with-plugins-install=system \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var/lib \ --mandir=/usr/man \ --infodir=/usr/info \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --build=$ARCH-slackware-linux make $NUMJOBS || make || exit 1 make install install-plugins DESTDIR=$PKG || exit 1 mv $PKG/usr/share/man $PKG/usr/ find $PKG/usr/man -type f -exec gzip -9 {} \; mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ ABOUT-NLS AUTHORS COPYING ChangeLog ChangeLog-0.8.0 ChangeLog-0.8.1 ChangeLog-0.8.2 \ ChangeLog-0.8.3 ChangeLog-0.8.4 ChangeLog-0.8.5 ChangeLog-0.8.6 ChangeLog-0.8.7 \ ChangeLog-0.8.8 ChangeLog.gameswf INSTALL NEWS README README.dump-gnash README.git \ README_bzr TODO doc/ \ $PKG/usr/doc/$PRGNAM-$VERSION find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null mkdir -p $PKG/install cat < $PKG/install/slack-desc $PRGNAM: $PRGNAM (GNU SWF movie player) $PRGNAM: $PRGNAM: Gnash is the GNU SWF movie player, which can be run standalone on the desktop $PRGNAM: or an embedded device, as well as as a plugin for several browsers. $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: $PRGNAM: http://www.gnashdev.org/ $PRGNAM: [needs agg from SBo] EOF cd $PKG rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD.txz