summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9eb126c0a870a5f5e8a0564cb76f664a2af9719d (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: Sam Stuewe <halosghost at archlinux dot info>

_pkgname=diagon
pkgname="${_pkgname}-git"
pkgver=0
pkgrel=2

pkgdesc='cli text diagram generator'
url='https://github.com/ArthurSonzogni/diagon'
arch=('i686' 'x86_64')
license=('custom:MIT')
depends=('util-linux-libs')
makedepends=('git' 'cmake' 'boost')

source=("git+${url}.git")
sha256sums=('SKIP')

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

prepare () {
    cd "$_pkgname"
    mkdir -p build
    cd build
    cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
}

build () {
    cd "$_pkgname"/build
    make
}

package () {
    cd "$_pkgname"/build
    make DESTDIR="$pkgdir" PREFIX='/usr' install
    install -Dm644 ../LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}