Package Details: cargo-pkgbuild 0.2.0-1

Git Clone URL: https://aur.archlinux.org/cargo-pkgbuild.git (read-only, click to copy)
Package Base: cargo-pkgbuild
Description: ArchLinux PKGBUILD generator from Cargo.toml manifest
Upstream URL: https://github.com/kstep/cargo-pkgbuild
Licenses: Apache-2.0 OR MIT
Submitter: kstep
Maintainer: None
Last Packager: neitsab
Votes: 4
Popularity: 0.22
First Submitted: 2016-07-04 16:18 (UTC)
Last Updated: 2024-09-06 21:06 (UTC)

Latest Comments

neitsab commented on 2024-09-06 21:13 (UTC) (edited on 2024-09-06 21:22 (UTC) by neitsab)

All right folks, I just updated the package.

I think this really ought to be a -git package, this would avoid having to pick a specific commit hash and use that in a custom variable because of it.

Note though that the author has commented:

I lost interest in the package a long time ago, but if you are willing to contribute, I'll be happy to accept your PRs.

So this is unlikely to see much change.

I tried it on a simple package and it didn't do much better than a good old copy paste from a template Rust PKGBUILD, which I leave here for those interested:

pkgname=
pkgver=
pkgrel=1
pkgdesc=''
url=''
license=()
makedepends=('cargo')
depends=()
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
source=()
b2sums=()

# Generated in accordance to https://wiki.archlinux.org/title/Rust_package_guidelines.
# Might require further modification depending on the package involved.

prepare() {
    export RUSTUP_TOOLCHAIN=stable
    cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release --all-features
}

check() {
    export RUSTUP_TOOLCHAIN=stable
    cargo test --frozen --all-features
}

package() {
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
    # for custom license, e.g. MIT
    # install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

I'll orphan this as I'm not expecting to be using it in the future.

AkechiShiro commented on 2023-07-07 22:27 (UTC) (edited on 2023-07-07 22:27 (UTC) by AkechiShiro)

Here is diff to update the PKGBUILD :

< pkgver=0.1.1
< _sha=e5fea7fa4f083a2a78e5347c0ec33c17f931c187
---
> pkgver=0.2.0
> _sha=0fc6d2767ca7fe59dd760b9d4203c78662bc1b7c
17c17
< sha256sums=('0d67691b9674614dc64229891316297a6272ba9a6ffe3d48215292dfc44ff8aa')
---
> sha256sums=('a295df0a83493004158a04f5a5756128d50a400a758ead5afb8df3eeed056028')

AkechiShiro commented on 2023-07-03 13:32 (UTC) (edited on 2023-07-03 15:35 (UTC) by AkechiShiro)

This package does not work at the moment, it spits back a Rust error :

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { inner: ErrorInner { kind: Custom, line: Some(0), col: 0, at: Some(0), message: "missing field `package`", key: [] } }', src/main.rs:45:41
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Sorry this is an error upstream, it just needs a Cargo.toml files that contains metadata in the folder where you're running the command.

mdorst commented on 2022-07-19 09:02 (UTC)

This package has been fixed so that it now produces output consistent with the Rust package guidelines.

alerque commented on 2021-08-28 18:18 (UTC)

I adopted this because it sounded worth a try. I fixed up the packaging, but then I looked at what the upstream project in actually doing. The output of this program is so far from the Rust package guidelines that I do not recommend anyone use it! If upstream issues such as this one ever get addressed that could change, but for the moment using this will run afoul of so many guidelines that it would take more work to fix than to write properly from scratch.

I'm orphaning this again ... adopter beware.

kstep commented on 2016-12-16 09:31 (UTC)

Thank you for reporting your problem! It should be fixed now in v0.1.0-2.

jtojnar commented on 2016-12-14 00:36 (UTC)

This does not install for me. These files are generated: cargo-pkgbuild /bin/ cargo-pkgbuild /bin/cargo-pkgbuild The following error is produced: error: failed to commit transaction (conflicting files) cargo-pkgbuild: /bin exists in filesystem Errors occurred, no packages were upgraded.