Skip to content

Instantly share code, notes, and snippets.

@delcypher
Created January 22, 2017 19:30
Show Gist options
  • Save delcypher/120b6222f39d00539fee4c0229582a11 to your computer and use it in GitHub Desktop.
Save delcypher/120b6222f39d00539fee4c0229582a11 to your computer and use it in GitHub Desktop.
Hacked version of PKGBUILD for AUR build of git-lfs
# Maintainer: Michael Schubert <mschu.dev at gmail>
# Contributor: Mikkel Oscar Lyderik <mikkeloscar at gmail dot com>
pkgname=git-lfs
pkgver=1.5.5
pkgrel=1
pkgdesc="An open source Git extension for versioning large files"
arch=('i686' 'x86_64' 'armv7h')
url="https://${pkgname}.github.com"
license=('MIT')
makedepends=('go' 'ruby-ronn')
depends=('git')
install=${pkgname}.install
source=("https://github.com/github/$pkgname/archive/v$pkgver.tar.gz")
sha1sums=('a03bbb287a53c7ad01928d3b1c76e26286e88ff6')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
GOPATH="$srcdir" go get -v -d
# HACK: go get seems to put the master branch sources for git-lfs in
# `$srcdir/src/github.com/git-lfs/git-lfs/`. I don't know why it does this.
# so remove them and link in the right sources.
rm -rf "$srcdir"/src/github.com/git-lfs/git-lfs
ln -sf "$srcdir/$pkgname-$pkgver" "$srcdir"/src/github.com/git-lfs/git-lfs
}
build() {
cd "$srcdir/$pkgname-$pkgver"
GOPATH="$srcdir" go run script/*.go -cmd build
# build man pages
ronn docs/man/*.ronn
}
package() {
cd "$srcdir/$pkgname-$pkgver"
install -Dm755 bin/$pkgname "$pkgdir"/usr/bin/$pkgname
install -d "$pkgdir"/usr/share/man/man1
install -Dm644 docs/man/*.1 "$pkgdir"/usr/share/man/man1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment