summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0d082ae254e61d56deea1d0c56c4d71504642dc6 (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
# Maintainer:  Caleb Maclennan <caleb@alerque.com>

pkgname=git-warp-time-git
pkgver=0.4.3.r1.g690557a
pkgrel=2
pkgdesc='reset file timestamps to repo state'
arch=(x86_64)
url="https://github.com/alerque/${pkgname%-git}"
license=(GPL3)
makedepends=(cargo
             git
             jq)
provides=("${pkgname%-git}=$pkgver")
conflicts=("${pkgname%-git}")
source=("$pkgname::git+$url.git")
sha256sums=('SKIP')

pkgver() {
	cd "$pkgname"
	git describe --long --abbrev=7 --tags --match="v*" |
		sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
	cd "$pkgname"
	sed Makefile.am -i \
		-e "/^licensedir = /s#.(_gwt)\$#$pkgname#" \
		-e 's/cargo \(build\|install\|test\)/cargo --offline \1/'
	./bootstrap.sh
	cargo fetch --locked
}

build() {
	cd "$pkgname"
	./configure --prefix "/usr"
	make
}

check() {
	cd "$pkgname"
	make check
}

package() {
	cd "$pkgname"
	make DESTDIR="$pkgdir" install
}