[arch-commits] Commit in git-sizer/repos (community-x86_64 community-x86_64/PKGBUILD)

Caleb Maclennan alerque at gemini.archlinux.org
Fri Oct 8 08:54:52 UTC 2021


    Date: Friday, October 8, 2021 @ 08:54:51
  Author: alerque
Revision: 1028016

archrelease: copy trunk to community-x86_64

Added:
  git-sizer/repos/community-x86_64/
  git-sizer/repos/community-x86_64/PKGBUILD
    (from rev 1028015, git-sizer/trunk/PKGBUILD)

----------+
 PKGBUILD |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

Copied: git-sizer/repos/community-x86_64/PKGBUILD (from rev 1028015, git-sizer/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2021-10-08 08:54:51 UTC (rev 1028016)
@@ -0,0 +1,45 @@
+# Maintainer: Caleb Maclennan <caleb at alerque.com>
+# Contributor: AUR[ogarcia]
+
+pkgname=git-sizer
+pkgver=1.4.0
+pkgrel=2
+pkgdesc='Compute various size metrics for a Git repository'
+arch=(x86_64 i686 armv6h armv7h aarch64)
+url="https://github.com/github/$pkgname"
+license=(MIT)
+depends=(git)
+makedepends=(go)
+_archive="$pkgname-$pkgver"
+source=("$_archive.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha256sums=('5dafc4014d6bfae40e678d72c0a67a29cd9ac7b38a0894fc75ab8c05a9064a4b')
+
+build() {
+	cd "$_archive"
+	export CGO_CPPFLAGS="$CPPFLAGS"
+	export CGO_CFLAGS="$CFLAGS"
+	export CGO_CXXFLAGS="$CXXFLAGS"
+	export CGO_LDFLAGS="$LDFLAGS"
+	go build \
+		-trimpath \
+		-buildmode=pie \
+		-mod=readonly \
+		-modcacherw \
+		-ldflags="-X main.BuildVersion=$pkgver -linkmode external" \
+		-o . ./...
+}
+
+# Note: Upstream tests seem to do goofy things like assume a terminal, if
+# anybody knows how to run these so they work in a chroot build properly I'm
+# open to contributions.
+check() {
+	cd "$_archive"
+	# go test ./...
+}
+
+package() {
+	cd "$_archive"
+	install -Dm0755 -t "$pkgdir/usr/bin/" git-sizer
+	install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
+	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE.md
+}



More information about the arch-commits mailing list