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

pkgname=git-warp-time-git
pkgver=0.4.1.r2.gfecf49f
pkgrel=1
pkgdesc='reset file timestamps to repo state'
arch=(x86_64)
url="https://github.com/alerque/${pkgname%-git}"
license=(GPL3)
makedepends=(git rust)
provides=("${pkgname%-git}")
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
}