blob: 875f1782c5b285d8f122177f4c023e49e4155ca7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
# Maintainer: Christian Balcom <robot.inventor@gmail.com>
pkgname=damascene-volume
pkgver=0.3.2
pkgrel=1
pkgdesc='PipeWire volume control panel built with Damascene'
arch=('x86_64')
url='https://github.com/computer-whisperer/damascene-volume'
license=('MIT OR Apache-2.0')
depends=(
'libpipewire'
'libx11'
'libxcursor'
'libxi'
'libxkbcommon'
'libxkbcommon-x11'
'vulkan-icd-loader'
'wayland'
'gcc-libs'
'glibc'
)
makedepends=('cargo' 'clang' 'pkgconf')
# Disable system LTO — Arch's default `-flto=auto` lands in CFLAGS and makes
# libspa's C wrapper (compiled by its build.rs via the `cc` crate) emit
# LTO-IR objects, which rust-lld can't resolve at the final Rust link step.
options=('!lto')
source=(
"$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz"
'LICENSE-MIT'
)
sha256sums=('2f9b9f1f5d80276bba09b7e1d09e899013b89536bbba67a4502c7334fdbc28bb'
'9f00c7ed7074fac147074cf3440eb30099ca20ffce962d9fda4188d84bcdface')
prepare() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --release --frozen --bin damascene-volume
}
check() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo test --release --frozen --lib
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 "target/release/damascene-volume" "$pkgdir/usr/bin/damascene-volume"
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
install -Dm644 damascene-volume.desktop \
"$pkgdir/usr/share/applications/damascene-volume.desktop"
# Scalable hicolor icon — `Icon=damascene-volume` in the .desktop entry
# resolves here. Renaming on install so the icon name is stable
# regardless of the source filename.
install -Dm644 icon.svg \
"$pkgdir/usr/share/icons/hicolor/scalable/apps/damascene-volume.svg"
install -Dm644 "$srcdir/LICENSE-MIT" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE-MIT"
}
|