summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0a719e4119d1d00a1034009aa0f5d0e187306964 (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=git-lfs-git
pkgver=2.11.0.r23.g02f92e2f
pkgrel=1
pkgdesc="Git extension for versioning large files"
arch=('i686' 'x86_64')
url="https://git-lfs.github.com/"
license=('MIT')
depends=('glibc')
makedepends=('git' 'go' 'go-tools' 'ruby-ronn')
provides=('git-lfs')
conflicts=('git-lfs')
source=("git+https://github.com/git-lfs/git-lfs.git")
sha256sums=('SKIP')


pkgver() {
  cd "git-lfs"

  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "git-lfs"

  go build \
    -buildmode=pie \
    -ldflags "-extldflags $LDFLAGS" \
    -trimpath \
    -mod=readonly \
    -modcacherw \
    ./
  make man
}

check() {
  cd "git-lfs"

  go test \
    -mod=readonly \
    ./...
}

package() {
  cd "git-lfs"

  install -Dm755 "git-lfs" -t "$pkgdir/usr/bin"

  install -Dm644 "LICENSE.md" -t "$pkgdir/usr/share/licenses/git-lfs"
  install -Dm644 "man"/*.1 -t "$pkgdir/usr/share/man/man1"
  install -Dm644 "man"/*.5 -t "$pkgdir/usr/share/man/man5"
}