diff options
author | James Meyer <jams@linhes.org> | 2010-12-04 23:48:49 (GMT) |
---|---|---|
committer | James Meyer <jams@linhes.org> | 2010-12-04 23:48:49 (GMT) |
commit | 037ab1a6a2fee07c83b47dc4d4ffd629b9052e85 (patch) | |
tree | a4256da38a768da362aad34ad9a8bcc7da611c30 /abs/core/ttf-dejavu/ttf-dejavu.install | |
parent | 0b251e4b5f6d56e5aba84aaf780fbf4e6a289245 (diff) | |
parent | 2ddfcdc1360af607e5925afe0e0f3562ad538738 (diff) | |
download | linhes_pkgbuild-037ab1a6a2fee07c83b47dc4d4ffd629b9052e85.zip linhes_pkgbuild-037ab1a6a2fee07c83b47dc4d4ffd629b9052e85.tar.gz linhes_pkgbuild-037ab1a6a2fee07c83b47dc4d4ffd629b9052e85.tar.bz2 |
Merge branch 'testing' of ssh://linhes.org/mount/repository/linhes_pkgbuild into testing
Diffstat (limited to 'abs/core/ttf-dejavu/ttf-dejavu.install')
-rw-r--r-- | abs/core/ttf-dejavu/ttf-dejavu.install | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/abs/core/ttf-dejavu/ttf-dejavu.install b/abs/core/ttf-dejavu/ttf-dejavu.install index 18666d2..f831cb1 100644 --- a/abs/core/ttf-dejavu/ttf-dejavu.install +++ b/abs/core/ttf-dejavu/ttf-dejavu.install @@ -1,13 +1,56 @@ +configs=(20-unhint-small-dejavu-sans-mono.conf + 20-unhint-small-dejavu-sans.conf + 20-unhint-small-dejavu-serif.conf + 57-dejavu-sans-mono.conf + 57-dejavu-sans.conf + 57-dejavu-serif.conf) post_install() { + pushd /etc/fonts/conf.d > /dev/null + for config in "${configs[@]}"; do + ln -sf ../conf.avail/${config} . + done + popd > /dev/null fc-cache -fs mkfontscale usr/share/fonts/TTF mkfontdir usr/share/fonts/TTF } post_upgrade() { - post_install + if [ `vercmp 2.30-2 $2` -gt 0 ]; then + pushd /etc/fonts/conf.d > /dev/null + for config in "${configs[@]}"; do + ln -sf ../conf.avail/${config} . + done + popd > /dev/null + fi + for config in /etc/fonts/conf.d/*; do + if [ ! -f ${config} ]; then + rm -f ${config} + fi + done + fc-cache -fs + mkfontscale usr/share/fonts/TTF + mkfontdir usr/share/fonts/TTF +} + +pre_upgrade() { + # Link new config files not present on system yet + pushd /etc/fonts/conf.d > /dev/null + for config in "${configs[@]}"; do + if [ ! -f ../conf.avail/${config} ]; then + ln -sf ../conf.avail/${config} . + fi + done + popd > /dev/null } post_remove() { - post_install + pushd /etc/fonts/conf.d > /dev/null + for config in "${configs[@]}"; do + rm -f ${config} + done + popd > /dev/null + fc-cache -fs + mkfontscale usr/share/fonts/TTF + mkfontdir usr/share/fonts/TTF } |