diff options
author | Orhun Parmaksız | 2024-04-07 18:30:25 +0300 |
---|---|---|
committer | Orhun Parmaksız | 2024-04-07 18:30:25 +0300 |
commit | aff2e8f42c097905dc94bdc18c217356c9055498 (patch) | |
tree | a6f3cce6f4f7498d8d2ead7a905df5cc2261004f /PKGBUILD | |
download | aur-aff2e8f42c097905dc94bdc18c217356c9055498.tar.gz |
Initial upload: cargo-unfmt-git r60.0f4882f-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..91424fb1d53e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: orhun <orhunparmaksiz@gmail.com> +# https://github.com/orhun/pkgbuilds + +pkgname=cargo-unfmt-git +pkgver=r60.0f4882f +pkgrel=1 +pkgdesc="Unformat Rust code into perfect blocks (git)" +arch=('x86_64') +url="https://github.com/fprasx/cargo-unfmt" +license=('GPL3') +depends=('gcc-libs') +makedepends=('cargo' 'git') +conflicts=("${pkgname%-git}") +provides=("${pkgname%-git}") +source=("git+${url}") +sha512sums=('SKIP') + +pkgver() { + cd "${pkgname%-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)" +} + +prepare() { + cd "${pkgname%-git}" + cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" +} + +build() { + cd "${pkgname%-git}" + cargo build --release --frozen +} + +package() { + cd "${pkgname%-git}" + install -Dm 755 "target/release/${pkgname%-git}" -t "${pkgdir}/usr/bin" + install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname" +} |