mirror of
https://github.com/Zenithsiz/zsw.git
synced 2026-02-03 09:50:31 +00:00
53 lines
1.4 KiB
Plaintext
53 lines
1.4 KiB
Plaintext
# 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"
|
|
}
|