[aur-general] PKGBUILD for ttf-tahoma is up for grabs
Thayer Williams
thayerw at gmail.com
Sat Jul 11 15:47:46 EDT 2009
To anyone interested, attached is a partially completed PKGBUILD and
.install file for making a ttf-tahoma package. As some of you know,
Tahoma was removed from the ttf-ms-fonts package back in February. I had
intended to dump a PKGBUILD for the Tahoma font to the AUR, but haven't
had the time to revise and test.
With other package maintenance taking priority, I'm passing this on to
whomever would like to see a Tahoma package in AUR.
Cheers
Thayer
-------------- next part --------------
# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
# Contributor: dale <dale at archlinux.org>
pkgname=ttf-ms-tahoma
pkgver=1.0
pkgrel=1
pkgdesc="Tahoma TTF Font from Microsoft"
arch=('i686' 'x86_64')
url="http://corefonts.sourceforge.net/"
sfpath="http://heanet.dl.sourceforge.net/sourceforge/corefonts/"
depends=(cabextract xorg-fonts-encodings xorg-font-utils fontconfig)
install=ttf-ms-fonts.install
source=($sfpath/wd97vwr32.exe)
md5sums=('efa72d3ed0120a07326ce02f051e9b42')
build() {
mkdir -p $pkgdir/tmp/$pkgname
chmod 1777 $pkgdir/tmp
install -m644 $srcdir/*.exe $pkgdir/tmp/$pkgname
}
-------------- next part --------------
# arg 1: the new package version
post_install() {
echo -n "extracting fonts... "
for font in tmp/ttf-ms-fonts/*.exe
do
cabextract --lowercase --directory=tmp/ttf-ms-fonts/ $font -F '*.ttf' >/dev/null 2>&1
done
cabextract --lowercase --directory=tmp/ttf-ms-fonts/ tmp/ttf-ms-fonts/wd97vwr32.exe -F '*.cab' >/dev/null 2>&1
cabextract --lowercase --directory=tmp/ttf-ms-fonts/ tmp/ttf-ms-fonts/viewer1.cab -F '*.ttf' >/dev/null 2>&1
mkdir -p usr/share/fonts/TTF
: >usr/share/fonts/TTF/msfonts.txt
for i in `/bin/ls tmp/ttf-ms-fonts/*.ttf`; do
echo `basename $i` >>usr/share/fonts/TTF/msfonts.txt
cp $i usr/share/fonts/TTF
done
echo "done."
echo -n "rebuilding font cache... "
fc-cache -f > /dev/null
mkfontscale /usr/share/fonts/TTF
mkfontdir /usr/share/fonts/TTF
echo "done."
rm -rf tmp/ttf-ms-fonts
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
# remove fonts from their old location
rm -rf usr/X11R6/lib/X11/fonts/ttf-ms-fonts
post_install $1
}
# arg 1: the old package version
pre_remove() {
#rm -f usr/X11R6/lib/X11/fonts/TTF/
[ -f usr/share/fonts/TTF/msfonts.txt ] || return
for i in `cat usr/share/fonts/TTF/msfonts.txt`; do
rm -f usr/share/fonts/TTF/$i
done
rm -f usr/share/fonts/TTF/msfonts.txt
}
# arg 1: the old package version
post_remove() {
echo -n "rebuilding font cache... "
fc-cache -f > /dev/null
mkfontscale /usr/share/fonts/TTF
mkfontdir /usr/share/fonts/TTF
echo "done."
}
More information about the aur-general
mailing list