Created
September 17, 2013 09:17
-
-
Save bkcsoft/6591991 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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." | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment