mirror of
https://github.com/Zenithsiz/zsw.git
synced 2026-02-03 09:50:31 +00:00
Added PKGBUILD-git.
This commit is contained in:
parent
1b56c1577e
commit
07175711da
52
PKGBUILD-git
Normal file
52
PKGBUILD-git
Normal file
@ -0,0 +1,52 @@
|
||||
# Maintainer: Filipe Rodrigues <filipejacintorodrigues1@gmail.com>
|
||||
pkgname=zsw-git
|
||||
pkgver=0.1.0
|
||||
pkgrel=1
|
||||
pkgdesc="Zenithsiz's scrolling wallpaper"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/zenithsiz/zsw"
|
||||
depends=('gcc-libs')
|
||||
makedepends=('cargo-nightly')
|
||||
provides=(${pkgname%-git}=$pkgver)
|
||||
conflicts=(${pkgname%-git})
|
||||
source=("git+https://github.com/zenithsiz/${pkgname%-git}.git")
|
||||
sha512sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
git describe --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
|
||||
export RUSTUP_TOOLCHAIN=nightly
|
||||
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
|
||||
# TODO: Remove adding `tokio_unstable` to `RUSTFLAGS` once
|
||||
# we can get `cargo` to read `.cargo/config.toml` here
|
||||
export RUSTUP_TOOLCHAIN=nightly
|
||||
export RUSTFLAGS+=" --cfg tokio_unstable"
|
||||
cargo build --frozen --release
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
|
||||
# TODO: Remove adding `tokio_unstable` to `RUSTFLAGS` once
|
||||
# we can get `cargo` to read `.cargo/config.toml` here
|
||||
export RUSTUP_TOOLCHAIN=nightly
|
||||
export RUSTFLAGS+=" --cfg tokio_unstable"
|
||||
cargo test --frozen
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/${pkgname%-git}"
|
||||
|
||||
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/${pkgname%-git}"
|
||||
install -Dm0644 -t "$pkgdir/usr/share/applications/" "install/zsw.desktop"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user