makedeb


ttf-weather-icons-bin 2.0.12-1


Icon font with 222 weather themed icons

Click here to go back to the commit logs for ttf-weather-icons-bin.

Commit:


Hash: 578db852f44ba8888450714b611ab9afbfd99eb2

Message: new install script

Diff


diff --git a/.SRCINFO b/.SRCINFO
index 0116feb..3782aee 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,6 +5,7 @@ pkgbase = ttf-weather-icons-bin
 	pkgver = 2.0.12
 	pkgrel = 1
 	url = https://erikflowers.github.io/weather-icons/
+	install = ttf-weather-icons-bin.install
 	arch = any
 	license = custom:"OFL"
 	license = MIT
diff --git a/PKGBUILD b/PKGBUILD
index 194675c..6894a0a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,6 +9,7 @@ license=('custom:"OFL"' 'MIT')
 arch=('any')
 conflicts=("weather-icons")
 provides=("weather-icons")
+install="${pkgname}.install"
 # replaces=("weather-icons")
 source=("ttf-weather-icons-$pkgver.tar.gz::https://github.com/erikflowers/weather-icons/archive/refs/tags/$pkgver.tar.gz")
 sha512sums=('6b5f155233077d281f3837f59b82d37e5f6cc08eff47be1b8313a84235c1e64c12aa0bebc68569e525334cc8e1cca0b2860a9de2fee7583c38f2b284f6fd7782')
diff --git a/ttf-weather-icons-bin.install b/ttf-weather-icons-bin.install
new file mode 100644
index 0000000..4f5212e
--- /dev/null
+++ b/ttf-weather-icons-bin.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 $*