#!/bin/sh CWD=`pwd` TMP=${TMP:-/tmp} PKG=$TMP/package-xastir VERSION=1.8.2 ARCH=${ARCH:-i486} BUILD=2 if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mcpu=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi if [ ! -d $TMP ]; then mkdir -p $TMP fi rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf xastir-$VERSION tar xjvf $CWD/xastir-$VERSION.tar.bz2 zcat $CWD/xastir-$VERSION.diff.gz | patch -p0 --verbose cd xastir-$VERSION chown -R root.root . find . -perm 777 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS" \ PATH=$PATH:/usr/X11R6/bin ; ./configure --prefix=/usr make make install DESTDIR=$PKG # Install KDE and Gnome start menu items. /usr/bin/install -g root -o root -m 0755 -d $PKG/opt/kde/share/applnk/HamRadio /usr/bin/install -g root -o root -m 0644 $CWD/Xastir.desktop $PKG/opt/kde/share/applnk/HamRadio/Xastir.desktop /usr/bin/install -g root -o root -m 0755 -d $PKG/usr/share/gnome/apps/HamRadio /usr/bin/install -g root -o root -m 0644 $CWD/Xastir.desktop $PKG/usr/share/gnome/apps/HamRadio/Xastir.desktop /usr/bin/install -g root -o root -m 0644 $CWD/xastir.xpm $PKG/usr/share/xastir/xastir.xpm # add one low detail map of the world cp $CWD/000_world.pdb.gz $PKG/usr/share/xastir/maps ; gunzip $PKG/usr/share/xastir/maps/000_world.pdb.gz # add sound files cd $PKG/usr/share tar zxvf $CWD/xastir-sounds.tgz rm -f $PKG/usr/lib/*.a chown -R root.bin $PKG/usr/bin ( 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 ) cd $TMP/xastir-$VERSION mkdir -p $PKG/usr/doc/xastir-$VERSION cp -a \ AUTHORS ChangeLog COPYING DEBUG_LEVELS FAQ INSTALL LICENSE NEWS \ README README.MAPS UPGRADE \ $PKG/usr/doc/xastir-$VERSION gzip -9 $PKG/usr/man/man?/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc chmod 4555 $PKG/usr/bin/xastir cd $PKG makepkg -l y -c n $CWD/xastir-$VERSION-$ARCH-$BUILD.tgz