summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a370875b45e19dc486e6001c5dc9722683b6c469 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maintainer: Subash Aryal <blacpythoz@gmail.com>

pkgname=ttf-nepali-fonts
pkgver=r3.c3f5ee5
pkgrel=1
pkgdesc='A collection of popular Nepali Fonts. Preeti,Himalaya,Kantipur,Sagarmatha etc .'
arch=('any')
url='http://www.nepali.info/nepali/fonts/'
makedepends=('git')
depends=('fontconfig' 'xorg-font-utils')
provides=('ttf-nepali-fonts')
source=("git+https://github.com/blacpythoz/nepali-fonts")
md5sums=('SKIP')

pkgver() {
  cd "nepali-fonts"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package() {
  install -d "${pkgdir}/usr/share/fonts/TTF"
  install -m644 nepali-fonts/fonts/*.ttf "${pkgdir}/usr/share/fonts/TTF/"
  install -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 nepali-fonts/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/"
}

post_install() {
    echo -n "Updating font cache... "
    fc-cache >/dev/null -f
    mkfontscale /usr/share/fonts/TTF
    mkfontdir /usr/share/fonts/TTF
    echo done
}

post_upgrade() {
    post_install
}