public
Created

  • Download Gist
PKGBUILD
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
# Maintainer: birdflesh <antkoul at gmail dot com>
# Contributor: Army <uli.armbruster@gmail.com>
# Contributor: Thayer Williams <thayer@archlinux.org>
# Contributor: dale <dale@archlinux.org>
# Contributor: Kim "BKC" Carlb├Ącker <kim.carlbacker@gmail.com>
 
pkgname=ttf-ms-fonts
pkgver=2.0
pkgrel=10
pkgdesc="Core TTF Fonts from Microsoft"
arch=('any')
url="http://corefonts.sourceforge.net/"
license=('custom:microsoft')
depends=('fontconfig' 'xorg-fonts-encodings' 'xorg-font-utils')
makedepends=('libarchive>=3.0.2')
provides=('ttf-font')
install=$pkgname.install
_sfpath="http://downloads.sourceforge.net/corefonts"
 
source=($_sfpath/andale32.exe $_sfpath/arial32.exe $_sfpath/arialb32.exe
$_sfpath/comic32.exe $_sfpath/courie32.exe $_sfpath/georgi32.exe
$_sfpath/impact32.exe $_sfpath/times32.exe $_sfpath/trebuc32.exe
$_sfpath/verdan32.exe $_sfpath/webdin32.exe)
noextract=('andale32.exe' 'arial32.exe' 'arialb32.exe'
'comic32.exe' 'courie32.exe' 'georgi32.exe'
'impact32.exe' 'times32.exe' 'trebuc32.exe'
'verdan32.exe')
md5sums=('cbdc2fdd7d2ed0832795e86a8b9ee19a'
'9637df0e91703179f0723ec095a36cb5'
'c9089ae0c3b3d0d8c4b0a95979bb9ff0'
'2b30de40bb5e803a0452c7715fc835d1'
'4e412c772294403ab62fb2d247d85c60'
'4d90016026e2da447593b41a8d8fa8bd'
'7907c7dd6684e9bade91cff82683d9d7'
'ed39c8ef91b9fb80f76f702568291bd5'
'0d7ea16cac6261f8513a061fbfcdb2b5'
'12d2a75f8156e10607be1eaa8e8ef120'
'230a1d13a365b22815f502eb24d9149b')
 
package() {
install -dm755 "$pkgdir/usr/share/fonts/TTF"
install -dm755 "$pkgdir/usr/share/ttf-ms-fonts/"
 
for font in *.exe; do
install -m644 $font "$pkgdir/usr/share/ttf-ms-fonts/$(echo $font|tr A-Z a-z)"
done
 
install -dm755 "$pkgdir/usr/share/licenses/$pkgname/"
install -m644 Licen.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
## ttf-ms-fonts.install
 
_font_path="/usr/share/ttf-ms-fonts"
post_install() {
cd $_font_path
 
# extract fonts
echo -n "Extracting fonts... "
for exe in *.exe; do
cabextract -qLF "*.ttf" $exe
done
# install fonts
echo -n "Installing fonts... "
for font in *.ttf; do
install -m644 $font "/usr/share/fonts/TTF/$font"
done
echo -n "Updating font cache... "
fc-cache -f > /dev/null
mkfontscale /usr/share/fonts/TTF
mkfontdir /usr/share/fonts/TTF
echo "done."
}
 
post_upgrade() {
post_install $1
}
 
post_remove() {
cd _font_path
echo -n "Removing fonts... "
for font in *.ttf; do
rm "/usr/share/fonts/TTF/$font"
done
echo -n "Updating font cache... "
fc-cache -f > /dev/null
mkfontscale /usr/share/fonts/TTF
mkfontdir /usr/share/fonts/TTF
echo "done."
}
ttf-ms-fonts.install
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
## ttf-ms-fonts.install
 
_font_path="/usr/share/ttf-ms-fonts"
post_install() {
cd $_font_path
 
# extract fonts
echo -n "Extracting fonts... "
for exe in *.exe; do
cabextract -qLF "*.ttf" $exe
done
# install fonts
echo -n "Installing fonts... "
for font in *.ttf; do
install -m644 $font "/usr/share/fonts/TTF/$font"
done
echo -n "Updating font cache... "
fc-cache -f > /dev/null
mkfontscale /usr/share/fonts/TTF
mkfontdir /usr/share/fonts/TTF
echo "done."
}
 
post_upgrade() {
post_install $1
}
 
post_remove() {
cd _font_path
echo -n "Removing fonts... "
for font in *.ttf; do
rm "/usr/share/fonts/TTF/$font"
done
echo -n "Updating font cache... "
fc-cache -f > /dev/null
mkfontscale /usr/share/fonts/TTF
mkfontdir /usr/share/fonts/TTF
echo "done."
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.