makedeb


ttf-migu 20200307-1


Good looking Japanese TrueType font by mixing M+ and IPA.

Click here to go back to the commit logs for ttf-migu.

Commit:


Hash: 6ecaae3f5fd893d1015e7e6588730f4681abbac6

Message: new install script

Diff


diff --git a/.SRCINFO b/.SRCINFO
index 9df8335..f872c74 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,6 +5,7 @@ pkgbase = ttf-migu
 	pkgver = 20200307
 	pkgrel = 1
 	url = http://mix-mplus-ipa.osdn.jp/migu/
+	install = ttf-migu.install
 	arch = any
 	license = custom
 	depends = fontconfig
diff --git a/PKGBUILD b/PKGBUILD
index 4faeeb7..75ed62a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,6 +10,7 @@ license=('custom')
 depends=('fontconfig')
 provides=('ttf-migu')
 conflicts=('ttf-migu')
+install="ttf-migu.install"
 # replaces=('ttf-migu')
 _mirror="osdn"
 source=("https://${_mirror}.net/projects/mix-mplus-ipa/downloads/${_release}/migu-1c-${pkgver}.zip"
diff --git a/ttf-migu.install b/ttf-migu.install
new file mode 100644
index 0000000..4f5212e
--- /dev/null
+++ b/ttf-migu.install
@@ -0,0 +1,20 @@
+post_install() {
+  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() {
+  post_install $1
+}
+
+op=$1
+shift
+
+$op $*