2021-03-27 21:01:05 +00:00
|
|
|
|
# Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com>
|
2021-12-17 15:24:41 +00:00
|
|
|
|
pkgname=pumopm-bin
|
|
|
|
|
pkgver=0.1.1
|
2021-03-27 21:01:05 +00:00
|
|
|
|
pkgrel=3
|
|
|
|
|
pkgdesc="A tiny power manager written in Rust"
|
|
|
|
|
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
|
|
|
|
|
url="https://labs.phundrak.com/phundrak/pumopm"
|
|
|
|
|
license=('GPL3')
|
|
|
|
|
depends=()
|
2021-12-17 15:24:41 +00:00
|
|
|
|
makedepends=('rustup')
|
2021-03-27 21:01:05 +00:00
|
|
|
|
options=('strip' 'zipman')
|
2021-12-17 15:24:41 +00:00
|
|
|
|
source=("${pkgname%-bin}::https://labs.phundrak.com/phundrak/pumopm/archive/$pkgver.tar.gz")
|
2021-03-27 21:01:05 +00:00
|
|
|
|
# If Phundrak’s Gitea takes too long to answer, or if it is down, use the
|
|
|
|
|
# Github mirror
|
2021-12-17 15:24:41 +00:00
|
|
|
|
# source=("${pkgname%-bin}::https://github.com/Phundrak/pumopm/archive/$pkgver.tar.gz")
|
|
|
|
|
md5sums=('347a95efacdbf9f8ab3b2da6a7eff6cc')
|
|
|
|
|
conflicts=('pumopm' 'pumopm-git')
|
2021-03-27 21:01:05 +00:00
|
|
|
|
|
|
|
|
|
build() {
|
|
|
|
|
cd "$pkgname"
|
|
|
|
|
if command -v rustup >/dev/null 2>&1; then
|
|
|
|
|
RUSTFLAGS="-C target-cpu=native" rustup run stable cargo build --release
|
|
|
|
|
elif rustc --version | grep -q stable; then
|
|
|
|
|
RUSTFLAGS="-C target-cpu=native" cargo build --release
|
|
|
|
|
else
|
|
|
|
|
cargo build --release
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
package() {
|
|
|
|
|
cd "$pkgname"
|
2021-12-17 15:24:41 +00:00
|
|
|
|
echo EXE
|
2021-03-27 21:01:05 +00:00
|
|
|
|
install -Dm755 "target/release/pumopm" "$pkgdir/usr/bin/pumopm"
|
2021-12-17 15:24:41 +00:00
|
|
|
|
echo LICENSE
|
2021-03-27 21:01:05 +00:00
|
|
|
|
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
|
2021-12-17 15:24:41 +00:00
|
|
|
|
echo MAN
|
2021-03-27 21:01:05 +00:00
|
|
|
|
install -Dm644 "pumopm.1" "$pkgdir/usr/share/man/man1/pumopm.1"
|
2021-12-17 15:24:41 +00:00
|
|
|
|
echo SERVCE
|
2021-03-27 21:01:05 +00:00
|
|
|
|
install -Dm644 "pumopm.service" "$pkgdir/usr/lib/systemd/system/pumopm.service"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# vim:set ts=2 sw=2 et:
|