summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4f10a5a97e2fc5e074a2f026d4816f3f9a25cf12 (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
# Maintainer: only_vip <onlyme_vip@protonmail.com>
pkgname=siji-git
_pkgname=siji
pkgver=23c691f202019.02.18
pkgrel=1
pkgdesc='Iconic bitmap font based on stlarch with additional glyphs'
arch=('any')
url='https://github.com/stark/siji'
license=('GPLv2')
depends=('fontconfig')
makedepends=('git')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("${_pkgname}::git+https://github.com/stark/siji")
postinst="${pkgname}.postinst"
postrm="${pkgname}.postrm"
md5sums=('SKIP')

pkgver() {
    cd "${srcdir}/${_pkgname}"
    _tag=$(git rev-parse --short HEAD)
    _commits=$(git rev-list --count HEAD | sed 's:-:.:g') # total commits is the most sane way of getting incremental pkgver
    _date=$(git log -1 --date=short --pretty=format:%cd)
    printf "%s%s%s\n" "${_commits}" "${_tag}" "${_date}" | sed -e 's:-:.:g'  -e 's:_:.:g'
}

package() {
  cd "${srcdir}/${_pkgname}"
  install -Dm644 "bdf/siji.bdf" "${pkgdir}/usr/share/fonts/misc/siji.bdf"
  install -Dm755 "view.sh" "${pkgdir}/usr/share/${_pkgname}/view.sh"
  install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}