diff options
author | taotieren | 2023-09-02 09:34:45 +0800 |
---|---|---|
committer | taotieren | 2023-09-02 09:34:45 +0800 |
commit | 2ec61b21457e04eca43b88eb04985cdd337ca846 (patch) | |
tree | 50322209f25a23581f9eb8c5e0dc5f078327a398 | |
parent | 53cb723bc2998bef2ca7b1437a227e1b827307b8 (diff) | |
download | aur-2ec61b21457e04eca43b88eb04985cdd337ca846.tar.gz |
Update 0.2.0-2
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 24 |
2 files changed, 23 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = sudo-rs pkgdesc = A memory safe implementation of sudo and su. pkgver = 0.2.0 - pkgrel = 1 + pkgrel = 2 url = https://github.com/memorysafety/sudo-rs arch = any license = Apache 2.0, @@ -13,7 +13,6 @@ pkgbase = sudo-rs conflicts = sudo-rs replaces = sudo options = !strip - options = !lto source = sudo-rs-0.2.0.tar.gz::https://github.com/memorysafety/sudo-rs/archive/refs/tags/v0.2.0.tar.gz sha256sums = 2d1e6bdfc8f14a6023328ffd48a00f7c973409e7bdc6199f484c095ad9817090 @@ -2,7 +2,7 @@ pkgname=sudo-rs pkgver=0.2.0 -pkgrel=1 +pkgrel=2 pkgdesc="A memory safe implementation of sudo and su." arch=('any') url="https://github.com/memorysafety/sudo-rs" @@ -15,11 +15,17 @@ makedepends=(cargo clang pam) backup=() -options=('!strip' '!lto') +options=('!strip') #install=${pkgname}.install source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz") sha256sums=('2d1e6bdfc8f14a6023328ffd48a00f7c973409e7bdc6199f484c095ad9817090') +# Use LTO +export CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 + +# Use debug +export CARGO_PROFILE_RELEASE_DEBUG=2 + build() { export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target @@ -42,4 +48,18 @@ package() { cd "${srcdir}/${pkgname}-${pkgver}/" cargo install --no-track --all-features --root "$pkgdir/usr/" --path . + install -Dm0644 "${srcdir}/${pkgname}-${pkgver}/"LICENSE* -t "$pkgdir/usr/share/licenses/${pkgname}/" + + +# Rename it to end in `-rs` to eliminate conflicts with `sudo` `utils-linux`. + directory="$pkgdir/usr/bin" + + cd "$directory" + + for file in *; do + if [ -x "$file" ]; then + new_name="${file}-rs" + mv "$file" "$new_name" + fi + done } |