Package Details: rn 0.1.0-2

Git Clone URL: https://aur.archlinux.org/rn.git (read-only, click to copy)
Package Base: rn
Description: Rename files and directories.
Upstream URL: https://github.com/thled/rn
Licenses: MIT
Submitter: thled
Maintainer: thled
Last Packager: thled
Votes: 1
Popularity: 0.000000
First Submitted: 2021-07-08 05:57 (UTC)
Last Updated: 2021-07-08 18:03 (UTC)

Required by (0)

Sources (1)

Latest Comments

lmartinez-mirror commented on 2021-07-08 06:57 (UTC) (edited on 2021-07-08 07:27 (UTC) by lmartinez-mirror)

Since this package doesn't have the -git suffix it should target tagged releases instead of the master branch. You should reupload as rn-git if you want it to compile master.

EDIT: I put together this patch to address a few things in your PKGBUILD:

  • gcc-libs as its dependency
  • Uses the latest release tarball as its source
  • Added a check() function

The changelog can be extracted from the tarball using tar -xvf rn-0.1.0.tar.gz rn-0.1.0/CHANGELOG.md --strip-components=1

diff --git a/PKGBUILD b/PKGBUILD
index 3bbe4e5..572928f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,26 +1,32 @@
 # Maintainer: Thomas Le Duc <dev@tleduc.de>
-pkgname='rn'
-pkgver='0.1.0'
-pkgrel=1
+# Contributor: Luis Martinez <luis dot martinez at tuta dot io>
+
+pkgname=rn
+pkgver=0.1.0
+pkgrel=2
 pkgdesc='Rename files and directories.'
 arch=('x86_64')
 url='https://github.com/thled/rn'
 license=('MIT')
-depends=()
-makedepends=('cargo' 'git')
-checkdepends=()
-optdepends=()
-provides=('rn')
-conflicts=('rn')
-source=("git+https://github.com/thled/rn.git")
-sha256sums=('SKIP')
+depends=('gcc-libs')
+makedepends=('cargo')
+changelog=CHANGELOG.md
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha256sums=('d853e33480f05af2b7a396acc979b575b342856ccfd2ffc2d22f5f03ed991e78')

 build() {
-    cd "$pkgname/app"
-    cargo build --release
+    cd "$pkgname-$pkgver/app"
+    cargo build --release --locked --all-features --target-dir=target
+}
+
+check() {
+    cd "$pkgname-$pkgver/app"
+    cargo test --release --locked --target-dir=target
 }

 package() {
-    cd $pkgname
-    install -Dm755 "app/target/release/rn" "$pkgdir/usr/bin/rn"
+    cd "$pkgname-$pkgver"
+    install -Dm755 "app/target/release/$pkgname" -t "$pkgdir/usr/bin/"
+    install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
+    install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
 }