#!/bin/sh # Set initial variables: CWD=`pwd` TMP=/tmp PKG=$TMP/package-xpdf VERSION=3.00 ARCH=alpha BUILD=2 rm -rf $PKG mkdir -p $PKG ( cd $TMP rm -rf xpdf-$VERSION tar xzf $CWD/xpdf-$VERSION.tar.gz cd xpdf-$VERSION chown -R root.root . zcat $CWD/xpdfrc.diff.gz | patch -p1 --verbose zcat $CWD/xpdf-3.00-truetype.diff.gz | patch -p0 --verbose zcat $CWD/xpdf-3.00-overflow.patch.gz | patch -p1 --verbose zcat $CWD/xpdf-3.00-core.patch.gz | patch -p1 --verbose zcat $CWD/xpdf-3.00-nodrm.diff.gz | patch -p1 --verbose zcat $CWD/xpdf-3.00-empty-bookmark.patch.gz | patch -p0 --verbose zcat $CWD/xpdf-3.00-freetype-2.1.7.patch.gz | patch -p1 --verbose zcat $CWD/xpdf-3.00-PathScanner.patch.gz | patch -p1 --verbose ./configure \ --prefix=/usr/X11R6 \ --with-gzip \ --with-freetype2-includes=/usr/include/freetype2 make make install DESTDIR=$PKG ( 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 ) chmod 755 $PKG/usr/X11R6/bin/* chown -R root.bin $PKG/usr/X11R6/bin gzip -9 $PKG/usr/X11R6/man/man?/* cat doc/sample-xpdfrc > $PKG/usr/X11R6/etc/xpdfrc mkdir -p $PKG/usr/doc/xpdf-$VERSION cp -a ANNOUNCE CHANGES COPYING INSTALL README $PKG/usr/doc/xpdf-$VERSION chmod 644 $PKG/usr/doc/xpdf-$VERSION/* # Add cyrillic support. Can't leave that out. tar xzf $CWD/xpdf-cyrillic-2003-jun-28.tar.gz cd xpdf-cyrillic zcat $CWD/xpdf-cyrillic.diff.gz | patch -p1 --verbose mkdir -p $PKG/usr/X11R6/share/xpdf/cyrillic cat KOI8-R.unicodeMap > $PKG/usr/X11R6/share/xpdf/cyrillic/KOI8-R.unicodeMap cat add-to-xpdfrc >> $PKG/usr/X11R6/etc/xpdfrc # Add latin2 support: tar xzf $CWD/xpdf-latin2-2002-oct-22.tar.gz cd xpdf-latin2 zcat $CWD/xpdf-latin2.diff.gz | patch -p1 --verbose mkdir -p $PKG/usr/X11R6/share/xpdf/latin2 cat Latin2.unicodeMap > $PKG/usr/X11R6/share/xpdf/latin2/Latin2.unicodeMap cat add-to-xpdfrc >> $PKG/usr/X11R6/etc/xpdfrc # Add greek support: tar xzf $CWD/xpdf-greek-2003-jun-28.tar.gz cd xpdf-greek zcat $CWD/xpdf-greek.diff.gz | patch -p1 --verbose mkdir -p $PKG/usr/X11R6/share/xpdf/greek cat ISO-8859-7.unicodeMap > $PKG/usr/X11R6/share/xpdf/greek/ISO-8859-7.unicodeMap cat Greek.nameToUnicode > $PKG/usr/X11R6/share/xpdf/greek/Greek.nameToUnicode cat add-to-xpdfrc >> $PKG/usr/X11R6/etc/xpdfrc # Package description: mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # Build the package: cd $PKG makepkg -l y -c n $TMP/xpdf-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/xpdf.build.log