You are not logged in.
nomino is a batch rename utility written in Rust.
# Maintainer: yaa110 <yaa110@gmail.com>
pkgname=nomino
pkgver=0.1.4
pkgrel=4
arch=('i686' 'x86_64')
url="https://github.com/yaa110/nomino"
license=("MIT")
pkgdesc='Batch rename utility for developers'
source=("$pkgver.tar.gz::https://github.com/yaa110/$pkgname/archive/$pkgver.tar.gz")
sha512sums=('f6a7201ac5469e421845f091b88f6c071eb1c7791c5fd2692924a19204084d56312160f98f8e34a20aa1a4ff125ef822d8ab68ed336885cce0855c3921b87bea')
makedepends=('rust' 'python3')
depends=('gcc-libs')
conflicts=('nomino-bin')
provides=('nomino')
build() {
cd "$srcdir/$pkgname-$pkgver"
RUSTFLAGS='-C link-args=-s' cargo build -j`nproc` --release
}
package() {
install -Dm755 "$pkgname-$pkgver/target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
install -Dm644 "$pkgname-$pkgver/LICENSE-MIT" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
Last edited by yaa110 (2020-04-18 11:17:10)
Offline
the $pkgver.tar.gz:: prefix is optional, and should be used when you want the downloaded file to be saved under a different name. The provides=($pkgname) is useless - every package provides itself
Last edited by Spider.007 (2020-04-18 11:52:11)
Offline
https://wiki.archlinux.org/index.php/Ru … guidelines may be helpful.
build -j`nproc`
Don't decide for other people how many cores this program should use.
Check https://doc.rust-lang.org/cargo/referen … ables.html , cargo does appear to allow setting such a value through an environment value.
Something like CARGO_BUILD_JOBS=$(nproc) makepkg <makepkg options> could then be used by those who want it.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Why is the pkgrel 4? This is the first time it's been put in the AUR. I see you've already uploaded it to the AUR so it's stuck that way until there's a new version, but the pkgrel should start at 1.
You should also generally not pass -j flags to make. I'm not familiar with cargo, and the docs don't seem to mention MAKEFLAGS, so it's unclear if they are used. If they are, you should remove the j flag.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
makedepends=('rust' 'python3')
The package python provides python3. Removing python3 from the makedepends the package built without issue.
RUSTFLAGS='-C link-args=-s' cargo build -j`nproc` --release
Is there a reason to use link-args=-s to have the linker strip the binary rather than letting makepkg do it?
Offline
(already noted on the -bin package comments, but repeated here for completeness' sake)
This package does not need to conflict with the -bin variant. See https://wiki.archlinux.org/index.php/PKGBUILD#conflicts for more explanation.
Offline
$RUSTFLAGS is a makepkg.conf variable, and you should not be overriding the user's preferences. Especially when, yes, makepkg already has a dedicated strip function.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline