summaryrefslogtreecommitdiff
path: root/pcr/culmus/culmus.install
diff options
context:
space:
mode:
authorAlon Ivtsan <alonivtsan@lavabit.com>2013-07-16 03:06:45 +0300
committerAlon Ivtsan <alonivtsan@lavabit.com>2013-07-16 03:06:45 +0300
commit54dcfb85d14c150b312cd932aed940c19bb05251 (patch)
tree49f5e8e603ca7feae4dd8dbe71b73d2c78923595 /pcr/culmus/culmus.install
parentde25031b9839f64f7e41de83596015dec806aeb7 (diff)
downloadabslibre-54dcfb85d14c150b312cd932aed940c19bb05251.tar.gz
abslibre-54dcfb85d14c150b312cd932aed940c19bb05251.tar.bz2
abslibre-54dcfb85d14c150b312cd932aed940c19bb05251.zip
Adding culmus, patch and install file
Diffstat (limited to 'pcr/culmus/culmus.install')
-rw-r--r--pcr/culmus/culmus.install41
1 files changed, 41 insertions, 0 deletions
diff --git a/pcr/culmus/culmus.install b/pcr/culmus/culmus.install
new file mode 100644
index 000000000..1376ca5ce
--- /dev/null
+++ b/pcr/culmus/culmus.install
@@ -0,0 +1,41 @@
+configs=('61-culmus.conf')
+
+update_fontcache() {
+ fc-cache -fs
+ mkfontscale /usr/share/fonts/Type1
+ mkfontdir /usr/share/fonts/Type1
+ mkfontscale /usr/share/fonts/TTF
+ mkfontdir /usr/share/fonts/TTF
+}
+
+post_install() {
+ pushd /etc/fonts/conf.d > /dev/null
+ for config in "${configs[@]}"; do
+ ln -sf ../conf.avail/${config} .
+ done
+ popd > /dev/null
+
+ update_fontcache
+}
+
+post_upgrade() {
+ if [ "`vercmp 0.102-1 $2`" != "-1" ] || [ ! -L /etc/fonts/conf.d/61-culmus.conf ]; then
+ pushd /etc/fonts/conf.d > /dev/null
+ for config in "${configs[@]}"; do
+ ln -sf ../conf.avail/${config} .
+ done
+ popd > /dev/null
+ fi
+
+ update_fontcache
+}
+
+post_remove() {
+ pushd /etc/fonts/conf.d > /dev/null
+ for config in "${configs[@]}"; do
+ rm -f ${config}
+ done
+ popd > /dev/null
+
+ update_fontcache
+}