Caleb Maclennan pushed to branch main at Arch Linux / Packaging / Packages / 
dua-cli


Commits:
c0d312e4 by Caleb Maclennan at 2026-07-15T15:42:14+03:00
upgpkg: 2.38.0-2: Improve Rust build profile, see RFC69

c.f. https://gitlab.archlinux.org/archlinux/rfcs/-/merge_requests/69

- - - - -


2 changed files:

- .SRCINFO
- PKGBUILD


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,14 +1,15 @@
 pkgbase = dua-cli
        pkgdesc = A tool to conveniently learn about the disk usage of 
directories, fast!
        pkgver = 2.38.0
-       pkgrel = 1
+       pkgrel = 2
        url = https://github.com/Byron/dua-cli
        arch = x86_64
        license = MIT
        makedepends = cargo
        depends = glibc
        depends = libgcc
-       source = 
dua-cli-2.38.0.tar.gz::https://github.com/Byron/dua-cli/archive/v2.38.0.tar.gz
+       depends = libgcc_s.so
+       source = 
https://github.com/Byron/dua-cli/archive/refs/tags/v2.38.0/dua-cli-2.38.0.tar.gz
        sha512sums = 
39366e5efff83c7346f1cadd303bf4e20430d5a599f901156e3163384be88eb9388f5697caf26ce0f17199806dc2e19a02b0e9f33a9496c09e19c74f310da89f
 
 pkgname = dua-cli


=====================================
PKGBUILD
=====================================
@@ -5,34 +5,46 @@
 
 pkgname=dua-cli
 pkgver=2.38.0
-pkgrel=1
+pkgrel=2
 pkgdesc="A tool to conveniently learn about the disk usage of directories, 
fast!"
-arch=('x86_64')
+arch=(x86_64)
 url="https://github.com/Byron/dua-cli";
-license=('MIT')
-depends=('glibc' 'libgcc')
-makedepends=('cargo')
-source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+license=(MIT)
+depends=(glibc # libc.so libm.so
+         libgcc libgcc_s.so)
+makedepends=(cargo)
+_archive="$pkgname-$pkgver"
+source=("$url/archive/refs/tags/v$pkgver/$_archive.tar.gz")
 
sha512sums=('39366e5efff83c7346f1cadd303bf4e20430d5a599f901156e3163384be88eb9388f5697caf26ce0f17199806dc2e19a02b0e9f33a9496c09e19c74f310da89f')
 
+_srcenv() {
+       cd "$_archive"
+       export CARGO_HOME="$srcdir"
+       export CARGO_PROFILE_RELEASE_DEBUG=2
+       export CARGO_PROFILE_RELEASE_STRIP=false
+       export CARGO_PROFILE_RELEASE_LTO=true
+       export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
+       export CARGO_PROFILE_RELEASE_OPT_LEVEL=3
+}
+
 prepare() {
-  cd "$pkgname-$pkgver"
-  cargo fetch --locked --target "$(rustc --print host-tuple)"
+  _srcenv
+  cargo fetch --locked --target host-tuple
 }
 
 build() {
-  cd "$pkgname-$pkgver"
+  _srcenv
   cargo build --release --frozen
 }
 
 check() {
-  cd "$pkgname-$pkgver"
+  _srcenv
   cargo test --frozen -- --skip "interactive"
 }
 
 package() {
-  cd "$srcdir/$pkgname-$pkgver"
-  install -Dm 644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-  install -Dm 644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
-  install -Dm 755 "target/release/dua" "$pkgdir/usr/bin/dua"
+  cd "$_archive"
+  install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
+  install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
+  install -Dm0755 -t "$pkgdir/usr/bin/" target/release/dua
 }



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/dua-cli/-/commit/c0d312e4b68695f27373748f8b96a5d616249661

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/dua-cli/-/commit/c0d312e4b68695f27373748f8b96a5d616249661
You're receiving this email because of your account on gitlab.archlinux.org. 
Manage all notifications: https://gitlab.archlinux.org/-/profile/notifications 
| Help: https://gitlab.archlinux.org/help


Reply via email to