diff options
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 39 |
2 files changed, 39 insertions, 13 deletions
@@ -1,11 +1,16 @@ pkgbase = pnket pkgdesc = A download manager - pkgver = 0.2.2 - pkgrel = 2 + pkgver = 0.3.1 + pkgrel = 1 url = https://github.com/Ablaze-MIRAI/pnket arch = x86_64 license = MIT - source = https://github.com/Ablaze-MIRAI/pnket/releases/download/v0.2.2/pnket - md5sums = SKIP + makedepends = cargo + depends = glibc + depends = gcc-libs + depends = openssl + options = !lto + source = pnket-0.3.1.tar.gz::https://github.com/Ablaze-MIRAI/pnket/archive/refs/tags/v0.3.1.tar.gz + sha256sums = 796d0ef3a27a74244d26a30f83f79df62a7c924e76b537416547689ff14d56e8 pkgname = pnket @@ -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}/" } |