summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjahway6032024-02-27 10:08:28 -0500
committerjahway6032024-02-27 10:08:28 -0500
commit64ee795675011067a03105a05806341273d21136 (patch)
tree3312ca5627c618375ecc4261682cc8eedeb21d2b
parent7484a734cc0c554b18a1a0f13a04c7e97c9d248c (diff)
downloadaur-64ee795675011067a03105a05806341273d21136.tar.gz
dnspeep: added AUR Rust package guidelines
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD16
2 files changed, 16 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 91d4fceeb114..f85e45190b2c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,14 @@
pkgbase = dnspeep
pkgdesc = Spy on the DNS queries your computer is making
pkgver = 0.1.3
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/jvns/dnspeep
arch = x86_64
license = MIT
makedepends = rust
depends = libpcap
+ provides = dnspeep
+ conflicts = dnspeep-bin
source = https://github.com/jvns/dnspeep/archive/v0.1.3.tar.gz
sha512sums = 82dafdf415678eeff1112a0114806e9e2edb8fea6fd2b7642df2384fcb995a69c80a9674745fcd7fc1baed7a72ecf27756f3a7f0cdf494e6ff9a7e4812e24bc9
diff --git a/PKGBUILD b/PKGBUILD
index 711102124f3a..4f220a015471 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,20 +2,30 @@
pkgname=dnspeep
pkgver=0.1.3
-pkgrel=1
+pkgrel=2
pkgdesc='Spy on the DNS queries your computer is making'
url='https://github.com/jvns/dnspeep'
arch=('x86_64')
license=('MIT')
depends=('libpcap')
makedepends=('rust')
+provides=('dnspeep')
+conflicts=('dnspeep-bin')
source=("$url/archive/v$pkgver.tar.gz")
sha512sums=('82dafdf415678eeff1112a0114806e9e2edb8fea6fd2b7642df2384fcb995a69c80a9674745fcd7fc1baed7a72ecf27756f3a7f0cdf494e6ff9a7e4812e24bc9')
+# per https://wiki.archlinux.org/title/Rust_package_guidelines#Prepare
+prepare() {
+ cd "$pkgname-$pkgver"
+ export RUSTUP_TOOLCHAIN=stable
+ cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
+}
+
build() {
- tar xzvf v$pkgver.tar.gz
cd "$pkgname-$pkgver"
- cargo build --release
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --frozen --release --all-features
}
package() {