#!/bin/sh CWD=`pwd` PKG=/tmp/package-pilot-link rm -rf $PKG mkdir -p $PKG VERSION=0.12.2 ARCH=${ARCH:-i486} BUILD=${BUILD:-4} 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 cd /tmp rm -rf pilot-link-$VERSION tar xjvf $CWD/pilot-link-$VERSION.tar.bz2 || exit 1 cd pilot-link-$VERSION zcat $CWD/pilot-link.serial.group.is.uucp.diff.gz | patch -p1 --verbose || exit 1 zcat $CWD/pilot-link.no-it_prog_intltool.diff.gz | patch -p1 --verbose || exit 1 chown -R root:root . find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -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 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --localstatedir=/var/lib \ --mandir=/usr/man \ --enable-static=no \ --enable-conduits \ --enable-threads \ --enable-libusb \ --with-libpng \ --with-perl=/usr/lib/perl5/site_perl/$(perl -v | head -2 | tail -1 | cut -f 2 -d v | cut -f 1 -d ' ')/i486-linux-thread-multi \ --with-python \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux make -j4 || exit 1 make install DESTDIR=$PKG # Right. mkdir -p $PKG/etc/udev/rules.d mv $PKG/usr/share/pilot-link/udev/60-libpisock.rules $PKG/etc/udev/rules.d/80-libpisock.rules rmdir $PKG/usr/share/pilot-link/udev ( 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 ) mkdir -p $PKG/usr/doc/pilot-link-$VERSION cp -a \ AUTHORS COPYING COPYING.LIB INSTALL NEWS README \ $PKG/usr/doc/pilot-link-$VERSION gzip -9 $PKG/usr/man/man?/*.? mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n /tmp/pilot-link-$VERSION-$ARCH-$BUILD.tgz