Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions brush/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

pkgname=brush
pkgver=0.4.0
pkgrel=1
pkgdesc="Bash/POSIX-compatible shell"
arch=('x86_64')
url="https://github.com/reubeno/brush"
msys2_repository_url="${url}"
msys2_references=(
'archlinux: brush'
)
license=('spdx:MIT')
depends=("gcc-libs")
makedepends=("git" "rust")
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgname}-shell-v${pkgver}.tar.gz"
"${pkgname}-docs-${pkgver}.tar.gz::${url}/releases/download/${pkgname}-shell-v${pkgver}/${pkgname}-docs.tar.gz"
"git+https://github.com/nix-rust/nix#tag=v0.31.2"
)
sha256sums=('0cce607454972c18bc4a30d2f44a2c91fccf02c458475fda7720370a3dc8a4f0'
'1070fa3a9470927c0c3d9c5417151f1b8f72317b42bed21f33e5fd4f3dad3332'
'93c4a2491774ddb2badc665310fab119272245d7bfbd68c2721900bc3de3bf8f')

prepare() {
cd "${pkgname}-${pkgname}-shell-v$pkgver"
cargo update
git -C ../nix cherry-pick -n 962d80cb6174f305d954ae2015d3d94bd4efd93e # add ioctl
cat >> Cargo.toml <<END

[patch.crates-io]
nix.path = "../nix"
END

cargo update -p nix@0.31.2
cargo fetch --locked --target "${RUST_CHOST}"
}

build() {
cd "${pkgname}-${pkgname}-shell-v$pkgver"
cargo build --release --frozen
}

package() {
cd "${pkgname}-${pkgname}-shell-v$pkgver"
install -Dm 755 "target/release/$pkgname" -t "$pkgdir/usr/bin"
install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
install -Dm644 "${srcdir}/man/${pkgname}.1" "$pkgdir/usr/share/man/man1"
}
Loading