summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 764819c0e5f32f62fcd4f3c0c3be72bbda896ce6 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
# Maintainer: tristero <crf8472@web.de>

pkgname=libarcstk-git
pkgver=r169.fb1513e
pkgrel=1
pkgdesc='Library to calculate and verify AccurateRip checksums and ids'
arch=('x86_64')
url="https://codeberg.org/tristero/${pkgname%-git}"
license=('MIT')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
depends=('gcc-libs')
makedepends=('git>=2.0' 'cmake>=3.9.6')
optdepends=('doxygen>=1.8.14: build documentation'
            'texlive-bin: build documentation manual'
            'python-virtualenv: build HTML documentation with m.css')
source=("${pkgname%-git}::git+ssh://git@codeberg.org/tristero/${pkgname%-git}.git#branch=master")
md5sums=('SKIP')


pkgver()
{
	cd "${srcdir}/${pkgname%-git}"

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


## No prepare() function


build()
{
    msg "Configure"

	cmake -DCMAKE_BUILD_TYPE=Release    \
		  -DWITH_TESTS=ON               \
		  -DCMAKE_INSTALL_PREFIX="/usr" \
		  "${srcdir}/${pkgname%-git}/"

    msg "Build"

    cmake --build .
}


check()
{
    msg "Perform tests"

	ctest
}


package()
{
	msg "Install library and files"

    make DESTDIR="${pkgdir}/" install


	msg "Install license"

	install -D -m644 "${srcdir}/${pkgname%-git}/LICENSE" \
		"${pkgdir}/usr/share/licenses/${pkgname%-git}/LICENSE"
}