summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a6c4e86bf8389e19b349ad104c59a6bb26f1aa65 (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
# Maintainer: Krzysiu <KrzysiuN@proton.me>
pkgname=hfsutils-git
pkgver=r30.7c696d3
pkgrel=1
pkgdesc=""
arch=(x86_64)
url="https://github.com/GramNaTosterze/hfs"
license=(APPLE)
#groups=()
depends=(git libdispatch libbsd)
makedepends=(cmake clang)
provides=("${pkgname}")
conflicts=("${pkgname}")
#replaces=()
#backup=()
#options=()
#install=
source=("$pkgname::git+https://github.com/GramNaTosterze/hfs")
noextract=()
sha256sums=('SKIP')

pkgver() {
	cd "$pkgname"
  	( set -o pipefail
    		git describe --long --abbrev=7 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    		printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
  	)
}

#prepare() {

#}

build() {
	cmake -B build -S "$pkgname" \
		-DCMAKE_BUILD_TYPE='None' \
		-DCMAKE_INSTALL_PREFIX=/usr \
  		-DCMAKE_C_COMPILER=clang \
    		-DCMAKE_CXX_COMPILER=clang++ \
		-Wno-dev
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}