File PKGBUILD of Package cosmic-idle-git
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=cosmic-idle-git
pkgver=1.0.0.alpha.7.r0.g267bb83
pkgrel=1
pkgdesc="Cosmic idle daemon"
arch=('x86_64' 'aarch64')
url="https://github.com/pop-os/cosmic-idle"
license=('GPL-3.0-only')
depends=(
'libxkbcommon'
'wayland'
)
makedepends=(
'cargo'
'git'
'just'
)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/pop-os/cosmic-idle.git')
sha256sums=('SKIP')
pkgver() {
cd "${pkgname%-git}"
git describe --long --tags --abbrev=7 | sed 's/^epoch-//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "${pkgname%-git}"
mkdir -p .cargo; cat ../vendor.toml >> .cargo/config.toml
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "${pkgname%-git}"
export RUSTUP_TOOLCHAIN=stable
# use nice to build with lower priority
nice just build-release --frozen
}
package() {
cd "${pkgname%-git}"
just rootdir="$pkgdir" install
}
source=($(printf "%s\n" "${source[@]}" | sed -E "s|git\+https://github.com/pop-os/([^/]+).git|\1.tar|g"))
source=(${source[@]}
'vendor.toml'
'vendor.tar.xz')
sha256sums=(${sha256sums[@]}
'ff60266a6fc49dc316436426f770a4cb871ad049d9ddedee4acf41d5b5350e8a'
'e563f067924030db0cc64224ceea01cf28e46a8680e05c992e7803149646f600')