[arch-commits] Commit in duf/repos (2 files)

Caleb Maclennan alerque at gemini.archlinux.org
Tue Aug 24 10:45:42 UTC 2021


    Date: Tuesday, August 24, 2021 @ 10:45:42
  Author: alerque
Revision: 1004506

archrelease: copy trunk to community-testing-x86_64

Added:
  duf/repos/community-testing-x86_64/
  duf/repos/community-testing-x86_64/PKGBUILD
    (from rev 1004505, duf/trunk/PKGBUILD)

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

Copied: duf/repos/community-testing-x86_64/PKGBUILD (from rev 1004505, duf/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD	                        (rev 0)
+++ community-testing-x86_64/PKGBUILD	2021-08-24 10:45:42 UTC (rev 1004506)
@@ -0,0 +1,38 @@
+# Maintainer: Caleb Maclennan <caleb at alerque.com>
+# Contributor: Christian Muehlhaeuser <muesli at gmail dot com>
+
+pkgname=duf
+pkgver=0.6.2
+pkgrel=2
+pkgdesc='Disk Usage/Free Utility'
+arch=(x86_64)
+url="https://github.com/muesli/$pkgname"
+license=(MIT)
+depends=(glibc)
+makedepends=(git go)
+_archive="$pkgname-$pkgver"
+source=("$url/archive/v$pkgver/$_archive.tar.gz")
+sha256sums=('f2314d8e5e133a6ce93968b3450c1710a3e432cb4a5dfc528aa0317d968a8988')
+
+build() {
+	local commit=$(zcat $_archive.tar.gz | git get-tar-commit-id)
+	local extraflags="-X main.Version=$pkgver -X main.CommitSHA=$commit"
+	export CGO_CPPFLAGS="$CPPFLAGS"
+	export CGO_CFLAGS="$CFLAGS"
+	export CGO_CXXFLAGS="$CXXFLAGS"
+	export CGO_LDFLAGS="$LDFLAGS"
+	cd "$_archive"
+	go build \
+		-trimpath \
+		-buildmode=pie \
+		-mod=readonly \
+		-modcacherw \
+		-ldflags "-linkmode external $extraflags -extldflags \"$LDFLAGS\"" \
+		-o "$pkgname" .
+}
+
+package() {
+	cd "$_archive"
+	install -Dm0755 -t "$pkgdir/usr/bin/" "$pkgname"
+	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
+}



More information about the arch-commits mailing list