Skip to content

Commit

Permalink
build: update pkgbuilds
Browse files Browse the repository at this point in the history
  • Loading branch information
ripytide committed Oct 27, 2024
1 parent 381ffa7 commit 606ec81
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PKGBUILD → metapac-bin/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ arch=("x86_64")
provides=("metapac")
conflicts=("metapac")
source=("https://github.com/ripytide/metapac/releases/download/v$pkgver/metapac-x86_64-unknown-linux-gnu.tar.xz")
sha256sums=("75b73137f35ba659f3a8583f3384d015c4f3d659a2d056841404870023bd56a6")
sha256sums=('2f47cd4d48ccbf3115ec17ce671635a290d16552d7e4c1408a3b675b8faf9dbe')

package() {
install -Dm755 metapac -t "$pkgdir/usr/bin"
install -Dm755 metapac-x86_64-unknown-linux-gnu/metapac -t "$pkgdir/usr/bin"
}
43 changes: 43 additions & 0 deletions metapac/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Maintainer: James Forster <[email protected]>

pkgname=metapac
pkgver=0.2.0
pkgrel=1
pkgdesc="multi-backend declarative package manager"
url="https://github.com/ripytide/$pkgname"
license=("GPL-3.0-or-later")
arch=("x86_64")
provides=("metapac")
conflicts=("metapac")
makedepends=('cargo')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate")
sha256sums=('0d6dc59705228bcb1a6014eb8faeae5c0a043522196ce598f17e75c76daa7edf')

prepare() {
cd "$pkgname-$pkgver"

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

build() {
cd "$pkgname-$pkgver"

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

check() {
cd "$pkgname-$pkgver"

export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
}

package() {
cd "$pkgname-$pkgver"

install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
}

0 comments on commit 606ec81

Please sign in to comment.