mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-31 11:21:17 +02:00
83 lines
2.3 KiB
Plaintext
83 lines
2.3 KiB
Plaintext
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
|
pkgname=git-lfs
|
|
pkgver=2.4.2
|
|
pkgrel=0
|
|
pkgdesc="Git extension for versioning large files"
|
|
url="https://git-lfs.github.io/"
|
|
arch="all"
|
|
license="MIT"
|
|
depends="git"
|
|
checkdepends="bash coreutils git-daemon perl-utils"
|
|
makedepends="go ronn"
|
|
# Go doesn't play well with strip tool. http://bit.ly/2jlJsSU
|
|
options="!strip"
|
|
subpackages="$pkgname-doc"
|
|
install="$pkgname.post-install $pkgname.pre-deinstall"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/git-lfs/$pkgname/archive/v$pkgver.tar.gz
|
|
fix-test-locks.patch"
|
|
builddir="$srcdir/src/github.com/git-lfs/$pkgname"
|
|
|
|
export GOPATH="$srcdir:$builddir"
|
|
|
|
prepare() {
|
|
mkdir -p "${builddir%/*}"
|
|
ln -s "$srcdir"/$pkgname-$pkgver "$builddir"
|
|
|
|
default_prepare
|
|
}
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
|
|
# Build manpages first (some embedding in the executable is done).
|
|
cd docs
|
|
ronn man/*.ronn
|
|
go run man/mangen.go
|
|
cd -
|
|
|
|
# Build git-lfs executable.
|
|
_gobuild -o bin/$pkgname
|
|
|
|
# Build test executables.
|
|
local file; for file in test/cmd/*.go; do
|
|
_gobuild -o bin/$(basename $file .go) $file
|
|
done
|
|
_gobuild -o bin/git-lfs-test-server-api \
|
|
test/git-lfs-test-server-api/*.go
|
|
}
|
|
|
|
check() {
|
|
cd "$builddir"
|
|
|
|
GIT_LFS_TEST_MAXPROCS=$JOBS SKIPCOMPILE=1 ./script/integration
|
|
}
|
|
|
|
package() {
|
|
local docdir="$pkgdir/usr/share/doc/$pkgname"
|
|
local mandir="$pkgdir/usr/share/man"
|
|
|
|
cd "$builddir"
|
|
|
|
install -Dm755 bin/$pkgname "$pkgdir"/usr/bin/$pkgname
|
|
|
|
mkdir -p "$mandir"/man1 "$mandir"/man5
|
|
install -m 644 docs/man/*.1 "$mandir"/man1/
|
|
install -m 644 docs/man/*.5 "$mandir"/man5/
|
|
|
|
mkdir -p "$docdir"
|
|
cp -r docs/*.md docs/api "$docdir"/
|
|
rm -r "$docdir"/api/schemas
|
|
}
|
|
|
|
_gobuild() {
|
|
# -tags netcgo - use system's DNS resolver by default. Go's built-in DNS
|
|
# resolver is buggy; it resolved localhost to totally wrong IP
|
|
# address on ARM builders and so caused test failures.
|
|
# -ldflags - omit symbol and debug tables (strip).
|
|
go build -tags netcgo -ldflags='-s -w' -v "$@"
|
|
}
|
|
|
|
sha512sums="c89a15c36b9d52091eb6e89f8e1db23b03f35333794467432ee49728ba83fc5d25d238f5df49bf736a4a3079778d70a527db01c2299ecd96a7b5f70059616967 git-lfs-2.4.2.tar.gz
|
|
66927aa462cb7b5061442e5ffaf7c9e4a5d97179482dc00de3f4abfad5959a9c55df3e88c211067bf15b5b0ea3ef29b249ca32290cc9839280266de5c6854b3f fix-test-locks.patch"
|