#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-fontconfig VERSION=2.2.3 ARCH=alpha BUILD=1 TARGET=$ARCH-alphaslack-linux rm -rf $PKG mkdir -p $PKG ( cd $TMP rm -rf fontconfig-$VERSION tar xjf $CWD/fontconfig-$VERSION.tar.bz2 cd fontconfig-$VERSION # Prefer DejaVu to Vera: zcat $CWD/fontconfig.dejavu.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 {} \; # This should remain in /usr/X11R6/ until the X.Org --prefix # is changed to /usr. Fair warning. ;-) ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --build=$TARGET || exit 1 make || exit 1 make install DESTDIR=$PKG || exit 1 mkdir -p $PKG/usr/doc/fontconfig-$VERSION cp -a AUTHORS COPYING INSTALL NEWS README $PKG/usr/doc/fontconfig-$VERSION # You can shop for this kind of stuff in the source tarball. rm -rf $PKG/usr/share rm -rf $PKG/etc/fonts/local.conf mkdir -p $PKG/var/log/setup cat $CWD/setup.05.fontconfig > $PKG/var/log/setup/setup.05.fontconfig chmod 755 $PKG/var/log/setup/setup.05.fontconfig ( 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 ) # Fix manpages: if [ -d $PKG/usr/man ]; then ( cd $PKG/usr/man for manpagedir in $(find . -type d -name "man*") ; do ( cd $manpagedir for eachpage in $( find . -type l -maxdepth 1) ; do ln -s $( readlink $eachpage ).gz $eachpage.gz rm $eachpage done gzip -9 *.? ) done ) fi mkdir $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat << EOF >> $PKG/install/doinst.sh #!/bin/sh # Update the X font indexes: if [ -x /usr/bin/fc-cache ]; then /usr/bin/fc-cache -f fi # else we'll catch it later with setup.fontconfig :-) # make links: EOF cd $PKG makepkg -l y -c n $TMP/fontconfig-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/fontconfig.build.log