diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | PKGBUILD | 32 |
3 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6f29d6811e3a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = cargo-component-git + pkgdesc = Allows conveniently modify features of crate + pkgver = r33.b8ba57b + pkgrel = 1 + url = https://github.com/bytecodealliance/cargo-component + arch = i686 + arch = x86_64 + license = Apache + makedepends = git + depends = cargo + provides = cargo-component + conflicts = cargo-component + source = git+https://github.com/bytecodealliance/cargo-component.git + sha256sums = SKIP + +pkgname = cargo-component-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..87ce2a7a3f38 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +/src +/pkg +/cargo-edit +*.xz +*.tar.* +*.pkg.* +*.zip +*.zip.sig +*.log diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..d41c9241306b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: Gyara <laxect39@gmail.com> + +pkgname=cargo-component-git +_pkgname=cargo-component +pkgver=r33.b8ba57b +pkgrel=1 +pkgdesc="Allows conveniently modify features of crate" +url="https://github.com/bytecodealliance/cargo-component" +conflicts=('cargo-component') +provides=('cargo-component') +depends=('cargo') +makedepends=('git') +arch=('i686' 'x86_64') +license=('Apache') +source=("git+$url.git") +sha256sums=('SKIP') + +pkgver() { + cd "$_pkgname/" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$srcdir/$_pkgname/" + cargo build --release --target-dir=target +} + +package() { + cd "$srcdir/$_pkgname/" + install -Dm755 "target/release/cargo-component" "$pkgdir/usr/bin/cargo-component" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} |