summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 11aed03dbbd74d29ab27ad4727d5b643fab8b603 (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
38
39
# Maintainer: bbaovanc <bbaovanc@bbaovanc.com>

_pkgname=st
pkgname=$_pkgname-bbaovanc-git
pkgver=r1155.b2b31a8
pkgrel=1
pkgdesc="bbaovanc's fork of st (simple/suckless terminal)"
arch=(any)
url="https://github.com/BBaoVanC/$_pkgname"
license=('MIT')
depends=('libxft-bgra-git')
makedepends=('git' 'libxext')
provides=("$_pkgname")
conflicts=("$_pkgname")

source=("git+https://github.com/BBaoVanC/$_pkgname.git")
sha256sums=('SKIP')

_makeopts="--directory=$_pkgname"

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

build() {
    make $_makeopts
}

package() {
    local installopts='--mode 0644 -D --target-directory'
    local shrdir="$pkgdir/usr/share"
    local licdir="$shrdir/licenses/$pkgname"
    local docdir="$shrdir/doc/$pkgname"
    make $_makeopts PREFIX=/usr DESTDIR="$pkgdir" install
    install $installopts "$licdir" "$_pkgname/LICENSE"
    install $installopts "$docdir" "$_pkgname/README.md"
    install $installopts "$shrdir/$pkgname" "$_pkgname/st.info"
}