#!/bin/sh # I am using old cups-dev to build this # test we are root if [ "$USER" != "root" ] ; then echo "Run as root please, exiting." exit 1 fi # cups-browsed is split away from this package # build depends export CFLAGS="-march=i486 -mtune=i686 -Os -pipe " export CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe " export LDFLAGS="-Wl,-O1" su -c 'tce-load -w compiletc submitqc4 cups-dev glib2-dev avahi-dev perl5' tc su -c 'tce-load -i compiletc submitqc4 cups-dev glib2-dev avahi-dev perl5' tc su -c 'tce-load -w lcms2-dev ijs-dev poppler-dev net-snmp libgs-dev' tc su -c 'tce-load -i lcms2-dev ijs-dev poppler-dev net-snmp libgs-dev' tc su -c 'tce-load -w pcre-dev qpdf-dev ghostscript qpdf ijs dejavu-fonts-ttf gsfonts ' tc su -c 'tce-load -i pcre-dev qpdf-dev ghostscript qpdf ijs dejavu-fonts-ttf gsfonts ' tc /usr/local/etc/init.d/avahi start /bin/sleep 2 L=libcups-filters SRC=cups-filters-1.0.34 T=cups-filters V=cups-filters-dev # start cd /tmp su -c 'wget -nc http://www.openprinting.org/download/cups-filters/cups-filters-1.0.34.tar.gz \ -O /tmp/cups-filters-1.0.34.tar.gz' tc su -c 'wget -nc http://ompldr.org/vaThnNA/FONTS-copyright.txt -O /tmp/FONTS-copyright.txt' tc tar -xvf cups-filters*.gz cd $SRC ./configure --with-gs-path=/usr/local/bin/gs --with-pdftops-path=/usr/local/bin/gs \ --disable-silent-rules --enable-shared --with-rcdir=/tmp --enable-imagefilters \ --with-test-font-path=/usr/local/share/fonts/dejavu/DejaVuSans.ttf \ --with-jpeg --with-png --with-tiff make check make DESTDIR=/tmp/cups-filters install # dev ############ cd /tmp mkdir -p $V/usr/local/lib mkdir -p $V/usr/local/share/doc/$V mv $T/usr/local/include $V/usr/local/ mv $T/usr/local/lib/pkgconfig $V/usr/local/lib/ mv $T/usr/local/lib/*a $V/usr/local/lib/ cp $SRC/AUTHORS $V/usr/local/share/doc/$V/ cp $SRC/COPYING $V/usr/local/share/doc/$V/ chmod 644 $V/usr/local/lib/*a mksquashfs $V $V.tcz md5sum $V.tcz > $V.tcz.md5.txt cd $V find usr -not -type d > $V.tcz.list mv -f $V.tcz.list /tmp # libcups-filters ################## cd /tmp mkdir -p $L/usr/local/lib mkdir -p $L/usr/local/share/doc/$L mv $T/usr/local/lib/*so* $L/usr/local/lib cp $SRC/AUTHORS $L/usr/local/share/doc/$L/ cp $SRC/COPYING $L/usr/local/share/doc/$L/ mksquashfs $L $L.tcz md5sum $L.tcz > $L.tcz.md5.txt cd $L find usr -not -type d > $L.tcz.list mv -f $L.tcz.list /tmp ########### # main ############ # cups-browsed ---will have separate build script # remove stuff from main ################ cd /tmp rm -rf $T/usr/local/etc/cups/cups-browsed.conf rm -rf $T/usr/local/sbin # strip tmp which includes wrong init.d scripts rm -rf $T/tmp # INSTALL says delete some files and modify mime file # see section= PACKAGING THE SOFTWARE FOR OPERATING SYSTEM DISTRIBUTIONS # /usr/lib/cups/filter/bannertops not built so not removed rm -rf $T/usr/local/share/cups/banners rm -rf $T/usr/local/share/cups/data/testprint # strip some docs # README must stay has important info rm -rf $T/usr/local/share/doc/$T/NEWS # INSTALL is left in due to info on bug report ################ # fix up fontdir ################# mkdir -p $T/etc/fonts/conf.d mv $T/usr/local/etc/fonts/conf.d/* $T/etc/fonts/conf.d # fonts in make check say need copyright but # are referring to fonts supplied by other TCZs and we have only # the config file so can ignore???? Otherwise uncomment next line # cp /tmp/FONTS-copyright.txt $T/usr/local/share/doc/$T # now etc is empty so can be removed as well # cups-browsed.tcz will add it back later rm -rf $T/usr/local/etc ######## build mksquashfs $T $T.tcz md5sum $T.tcz > $T.tcz.md5.txt cd $T find etc -not -type d > $T.tcz.list find usr -not -type d >> $T.tcz.list mv -f $T.tcz.list /tmp # finish off ############ cd /tmp submitqc4