#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-ttf-indic-fonts VERSION=0.4.7.1 ARCH=noarch BUILD=1 rm -rf $PKG mkdir -p $PKG ( cd $TMP rm -rf ttf-indic-fonts-$VERSION tar xjf $CWD/ttf-indic-fonts-$VERSION.tar.bz2 cd ttf-indic-fonts-$VERSION # Patch copyright notices so that they do not give inaccurate # information about where to find the GPL: zcat $CWD/ttf-indic-fonts.copyright.diff.gz | patch -p1 --verbose || exit 1 # I'm very interested in making this a better package, but have a # long way to go in understanding how all of this works. I know # that at least some of the Wikipedia articles I read are filled # in better now, but... # # For example, the hints files in the debian directory (where most # of these fonts were found) -- what do they do? And where do they # go? Also, some of the nicer looking fonts do not seem to be the # defaults (perhaps also due to the lack of "hints"). # # Hopefully this will at least provide a useful start for now. # # Have fun :-) # # -- Pat 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 {} \; mkdir -p $PKG/usr/X11R6/lib/X11/fonts/TTF/ cp -a */*.ttf $PKG/usr/X11R6/lib/X11/fonts/TTF # This is a better Malayalam font: cp -a $CWD/Samyak_Malayalam.ttf.bz2 $PKG/usr/X11R6/lib/X11/fonts/TTF ( cd $PKG/usr/X11R6/lib/X11/fonts/TTF bzip2 -d Samyak_Malayalam.ttf.bz2 chmod 644 Samyak_Malayalam.ttf chown root:root Samyak_Malayalam.ttf ) # Remove the old Malayalam font: rm -f $PKG/usr/X11R6/lib/X11/fonts/TTF/malayalam.ttf # Put copyright notices in the docs directory for X: mkdir -p $PKG/usr/X11R6/lib/X11/doc/ttf-indic-fonts/ find . -name "*.copyright" -exec cp -a {} $PKG/usr/X11R6/lib/X11/doc/ttf-indic-fonts \; cp -a $CWD/COPYING.bz2 $PKG/usr/X11R6/lib/X11/doc/ttf-indic-fonts cp -a $CWD/Samyak_Malayalam.url $PKG/usr/X11R6/lib/X11/doc/ttf-indic-fonts ( cd $PKG/usr/X11R6/lib/X11/doc/ttf-indic-fonts ; bzip2 -d COPYING.bz2 ) mkdir -p $PKG/usr/doc ( cd $PKG/usr/doc ; ln -sf /usr/X11R6/lib/X11/doc/ttf-indic-fonts ttf-indic-fonts-$VERSION ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cd $PKG makepkg -l y -c n $TMP/ttf-indic-fonts-$VERSION-$ARCH-$BUILD.tgz ) 2>&1 | tee $TMP/ttf-indic-fonts.build.log