summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8c7b9c586f7ab23f6ceafc8b95b4733fdf5b7d7c (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
# Maintainer: Zeioth
_pkgname=power-rules-daemon
pkgname=power-rules-daemon-git
pkgver=1.0
pkgrel=2
pkgdesc="Daemon written in Rust to automatically change your power profile when a program is executed."
arch=("any")
url="https://github.com/Zeioth/power-rules-daemon"
license=("GPL-3.0")
depends=("power-profiles-daemon")
makedepends=("git" "rust")
provides=(power-rules-daemon-git)
conflicts=(power-rules-daemon)
options=('!debug') # Disable debug binary
source=("git+$url#commit=f81d7bcd0194b0f85046224abacd78625724af9e")
sha256sums=('SKIP')

build() {
	cd "${_pkgname}"
	cargo build --release --locked
}

package() {
	cd "${_pkgname}"

	# Install the binary
	install -Dm755 "target/release/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"

	# Install the service
	install -Dm644 "$_pkgname.service" "$pkgdir/usr/lib/systemd/system/$_pkgname.service"

	# Install the license
	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"

	# Install the manual
	# (for the future)
}