TMP=/tmp PKG=$TMP/package-xscreensaver CWD=`pwd` VERSION=5.02 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi rm -rf $PKG cd $TMP rm -rf xscreensaver-$VERSION tar xjvf $CWD/xscreensaver-$VERSION.tar.bz2 cd xscreensaver-$VERSION # Allow xscreensaver to work setgid shadow. I'd rather avoid requiring # setuid root on this if at all possible... zcat $CWD/xscreensaver.setuid.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1 chown -R root:root . xml_config=/usr/bin/xml-config xml2_config=/usr/bin/xml2-config \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --mandir=/usr/man \ --with-x-app-defaults=/etc/X11/app-defaults \ --with-shadow \ --with-jpeg \ --with-gl \ --build=$ARCH-slackware-linux # We use '-i' because xscreensaver's NLS support has always been horribly broken make -i -j3 make -i install_prefix=$PKG install-strip gzip -9 $PKG/usr/man/man?/* chown root:shadow $PKG/usr/bin/xscreensaver chmod 2751 $PKG/usr/bin/xscreensaver # This is needed for the menus: mkdir -p $PKG/usr/share/pixmaps mkdir -p $PKG/etc mkdir -p $PKG/usr/doc/xscreensaver-$VERSION cp -a \ README* \ $PKG/usr/doc/xscreensaver-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/xscreensaver-$VERSION-$ARCH-$BUILD.tgz