File PKGBUILD of Package cosmic-randr-git
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=cosmic-randr-git
pkgver=1.0.0.alpha.7.r0.gc32d0d6
pkgrel=1
pkgdesc="Library and utility for displaying and configuring Wayland outputs"
arch=('x86_64' 'aarch64')
url="https://github.com/pop-os/cosmic-randr"
license=('MPL-2.0')
depends=('wayland')
makedepends=(
'cargo'
'clang'
'git'
'just'
'mold'
)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/pop-os/cosmic-randr.git'
'lto.patch')
sha256sums=('SKIP'
'3906072bc828dd7bc7239652e4b75979487b6f8b16e8e575a7d6b05be6cbb275')
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
# Use thin LTO
patch -Np1 -i ../lto.patch
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[@]}
'095db8c92c0e526b3b8347eab951e519a15376c9ffe9219b05abc26ddfc32c41'
'af427cdc1167f755dddeceba3f099b8004bf5a5ee2bbcbd5092239417c454433')