summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2f8713b520c50a18fe599eab6841a619830eca42 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Jiachen YANG <farseerfc@gmail.com>
_pkgname=zograscope
pkgname=$_pkgname-git
pkgver=r1089.aae6264
pkgrel=1
pkgdesc="syntax-aware diff that also provides a number of additional tools (zs-diff, zs-find, zs-gdiff, zs-hi, zs-stats)"
arch=(x86_64)
url="https://github.com/xaizek/zograscope"
license=('AGPL')
depends=('qt5-base' 'libgit2' 'boost-libs' 'ncurses')
makedepends=('git' 'boost' 'srcml' 'bison')
optdepends=('srcml: srcML related diff features')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("zograscope::git+$url.git"
"cursed::git+https://code.reversed.top/user/xaizek/libcursed"
"vle::git+https://code.reversed.top/user/xaizek/libvle")
md5sums=('SKIP'
         'SKIP'
         'SKIP')

# Please refer to the 'USING VCS SOURCES' section of the PKGBUILD man page for
# a description of each element in the source array.

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

prepare() {
	cd "$srcdir/${_pkgname}"
        git submodule init
        git config submodule.tools.tui.libs.vle "${srcdir}/vle"
        git config submodule.tools.tui.libs.cursed "${srcdir}/cursed"
        git submodule update
	echo 'QT5_PROG := qmake-qt5' >> config.mk
	echo 'HAVE_LIBGIT2 := yes'   >> config.mk
        echo 'HAVE_CURSESW := yes'   >> config.mk
}

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

check() {
	cd "$srcdir/${_pkgname}"
	make check
}

package() {
	cd "$srcdir/${_pkgname}"
	make DESTDIR="$pkgdir/" install
}