#!/bin/sh # Set initial variables: CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-xfm rm -rf $PKG mkdir -p $PKG VERSION=1.4.3 ARCH=i386 BUILD=1 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi if [ ! -d $PKG ]; then mkdir -p $PKG # place for the package to be built fi echo "+===========+" echo "| xfm-$VERSION |" echo "+===========+" cd $TMP tar xzvf $CWD/xfm-$VERSION.tar.gz cd xfm-$VERSION xmkmf make Makefiles make # OK, this sucks, but otherwise there's stuff that isn't build, and I'm not putting # a load of cpp/sed junk in here... so your system will be spammed here. rm -rf /usr/X11R6/lib/X11/xfm make install # OK, now build the package: ( cd src mkdir -p $PKG/usr/X11R6/bin strip xfm xfmtype cat xfm > $PKG/usr/X11R6/bin/xfm cat xfmtype > $PKG/usr/X11R6/bin/xfmtype ) cat /usr/X11R6/bin/xfm.install > $PKG/usr/X11R6/bin/xfm.install chmod 755 $PKG/usr/X11R6/bin/* chown -R root.bin $PKG/usr/X11R6/bin mkdir -p $PKG/etc/X11/app-defaults cat /etc/X11/app-defaults/Xfm > $PKG/etc/X11/app-defaults/Xfm mkdir -p $PKG/usr/X11R6/lib/X11/xfm # Also processed during "make install"... sigh... ( cd $PKG/usr/X11R6/lib/X11/xfm cp -a /usr/X11R6/lib/X11/xfm/dot.xfm . ) # Fake these directories and use the system ones. The system directories are # already in the app-defaults file, but this makes it clear for the user where # the icons are. ( cd $PKG/usr/X11R6/lib/X11/xfm rm -rf icons pixmaps bitmaps ln -sf /usr/X11R6/include/X11/bitmaps . ln -sf /usr/X11R6/include/X11/pixmaps . ln -sf /usr/X11R6/include/X11/pixmaps icons ) # Put the icons in the standard system locations. Some of these are # locations where fvwm95 already puts icons, but that shouldn't matter much. mkdir -p $PKG/usr/X11R6/include/X11/bitmaps $PKG/usr/X11R6/include/X11/pixmaps ( cd lib find . -name "*.xpm" -exec cp -a {} $PKG/usr/X11R6/include/X11/pixmaps \; find . -name "*.xbm" -exec cp -a {} $PKG/usr/X11R6/include/X11/bitmaps \; ) ( cd contrib/misc find . -name "*.xpm" -exec cp -a {} $PKG/usr/X11R6/include/X11/pixmaps \; find . -name "*.xbm" -exec cp -a {} $PKG/usr/X11R6/include/X11/bitmaps \; ) ( cd contrib/fileicons find . -name "*.xpm" -exec cp -a {} $PKG/usr/X11R6/include/X11/pixmaps \; find . -name "*.xbm" -exec cp -a {} $PKG/usr/X11R6/include/X11/bitmaps \; ) ( cd contrib/3dicons find . -name "*.xpm" -exec cp -a {} $PKG/usr/X11R6/include/X11/pixmaps \; find . -name "*.xbm" -exec cp -a {} $PKG/usr/X11R6/include/X11/bitmaps \; ) chmod 644 $PKG/usr/X11R6/include/X11/bitmaps/* chown -R root.root $PKG/usr/X11R6/include/X11/bitmaps chmod 644 $PKG/usr/X11R6/include/X11/pixmaps/* chown -R root.root $PKG/usr/X11R6/include/X11/pixmaps # Man pages: mkdir -p $PKG/usr/X11R6/man/man1 ( cd src cat xfm.man | gzip -9c > $PKG/usr/X11R6/man/man1/xfm.1.gz cat xfmtype.man | gzip -9c > $PKG/usr/X11R6/man/man1/xfmtype.1.gz ) mkdir -p $PKG/usr/doc/xfm-$VERSION cp -a \ COPYING ChangeLog INSTALL README README-1.2 README-1.4 TODO \ $PKG/usr/doc/xfm-$VERSION chmod 644 $PKG/usr/doc/xfm-$VERSION/* chown -R root.root $PKG/usr/doc/xfm-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG makepkg -l y -c n $TMP/xfm-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/xfm-$VERSION rm -rf $PKG fi