summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorFabioLolix2023-12-31 18:30:20 +0100
committerFabioLolix2023-12-31 18:30:20 +0100
commitc6c5a4527adefe97c21fd4c28cba9b1595b4b74c (patch)
treee9a6725a44a428bcffb3ce11553b8a7ef08f4bd6 /PKGBUILD
parent86af78103af45ac14ff24c786f5b60a75405195e (diff)
downloadaur-pnket.tar.gz
v0.3.1, source build
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD39
1 files changed, 30 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e6183e7dfe45..c6e8913452e4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,17 +1,38 @@
# Maintainer: Piano Nekomiya <kotone.olin1010@gmail.com>
+
pkgname=pnket
-pkgver=0.2.2
-pkgrel=2
+pkgver=0.3.1
+pkgrel=1
pkgdesc="A download manager"
arch=("x86_64")
url="https://github.com/Ablaze-MIRAI/pnket"
-license=('MIT')
-source=("https://github.com/Ablaze-MIRAI/pnket/releases/download/v0.2.2/pnket")
-noextract=()
-md5sums=("SKIP")
-validpgpkeys=()
+license=(MIT)
+depends=(glibc gcc-libs openssl)
+makedepends=(cargo)
+options=(!lto)
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Ablaze-MIRAI/pnket/archive/refs/tags/v${pkgver}.tar.gz")
+sha256sums=('796d0ef3a27a74244d26a30f83f79df62a7c924e76b537416547689ff14d56e8')
+
+prepare() {
+ cd "pnket-${pkgver}"
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo fetch --target "$CARCH-unknown-linux-gnu"
+
+# Don't work with --locked (see Arch's Rust packaging guidelines) and neither with --offline
+#error: the lock file /home/fabio/Dev/Github/AURFIX/p/pnket/src/pnket-0.3.1/Cargo.lock needs to be updated but --locked was passed to prevent this
+#If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead.
+}
+
+build() {
+ cd "pnket-${pkgver}"
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --frozen --release --all-features
+}
package() {
- cd "${srcdir}"
- install -Dm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ cd "pnket-${pkgver}"
+ install -Dm755 target/release/pnket -t "${pkgdir}/usr/bin/"
+ install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}