summarylogtreecommitdiffstats
path: root/x3270.install
diff options
context:
space:
mode:
authortuftedocelot2015-07-04 15:09:25 -0500
committertuftedocelot2015-07-04 15:09:25 -0500
commit13498972d4d445eaf1900c998c09082133f4a0ce (patch)
treed53256b343f44c375c2d232ef1df9e5f8591b9e5 /x3270.install
downloadaur-13498972d4d445eaf1900c998c09082133f4a0ce.tar.gz
import x3270
Diffstat (limited to 'x3270.install')
-rw-r--r--x3270.install47
1 files changed, 47 insertions, 0 deletions
diff --git a/x3270.install b/x3270.install
new file mode 100644
index 000000000000..9063c5379220
--- /dev/null
+++ b/x3270.install
@@ -0,0 +1,47 @@
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ echo -n "updating font cache... "
+ cd /usr/share/fonts/3270
+ /usr/bin/fc-cache -f > /dev/null
+ /usr/bin/mkfontdir
+ /usr/bin/mkfontscale
+ xset fp+ /usr/share/fonts/3270/
+ xset fp rehash
+ echo -e "\n--> You can put the hosts you want to connect to"
+ echo "--> in /etc/x3270/ibm_hosts"
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_upgrade() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+pre_remove() {
+ [ -d /usr/share/fonts/3270 ] || return
+ rm -rf /usr/share/fonts/3270
+}
+
+# arg 1: the old package version
+post_remove() {
+ echo -n "rebuilding font cache"
+ fc-cache -f > /dev/null
+ xset fp- /usr/share/fonts/3270/
+ xset fp rehash
+}
+
+op=$1
+shift
+$op $*