You are not logged in.

#1 2020-04-18 11:14:30

yaa110
Member
Registered: 2020-04-18
Posts: 2

PKGBUILD review request: nomino

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

#2 2020-04-18 11:51:59

Spider.007
Member
Registered: 2004-06-20
Posts: 1,172

Re: PKGBUILD review request: nomino

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

#3 2020-04-18 12:16:19

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 8,071

Re: PKGBUILD review request: nomino

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.


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#4 2020-04-18 12:27:58

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 23,441
Website

Re: PKGBUILD review request: nomino

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

#5 2020-04-18 12:30:47

loqs
Member
Registered: 2014-03-06
Posts: 10,586

Re: PKGBUILD review request: nomino

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

#6 2020-04-18 12:36:19

ayekat
Member
Registered: 2011-01-17
Posts: 1,385
Website

Re: PKGBUILD review request: nomino

(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.


{,META,RE}PKGBUILDSpacman-hacks (includes makemetapkg and remakepkg) │ dotfiles

Offline

#7 2020-04-19 06:34:28

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,309

Re: PKGBUILD review request: nomino

$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

Board footer

Powered by FluxBB