Added manpage and systemd service
This commit is contained in:
parent
259afcf567
commit
4fd33bfe66
11
PKGBUILD
11
PKGBUILD
@ -1,14 +1,14 @@
|
|||||||
# Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com>
|
# Maintainer: Lucien Cartier-Tilet <lucien@phundrak.com>
|
||||||
pkgname=pumopm
|
pkgname=pumopm
|
||||||
pkgver=0.1.1
|
pkgver=0.1.1
|
||||||
pkgrel=2
|
pkgrel=3
|
||||||
pkgdesc="A tiny power manager written in Rust"
|
pkgdesc="A tiny power manager written in Rust"
|
||||||
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
|
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
|
||||||
url="https://labs.phundrak.com/phundrak/pumopm"
|
url="https://labs.phundrak.com/phundrak/pumopm"
|
||||||
license=('GPL3')
|
license=('GPL3')
|
||||||
depends=()
|
depends=()
|
||||||
makedepends=('rustup' 'git')
|
makedepends=('rustup' 'git')
|
||||||
options=()
|
options=('strip' 'zipman')
|
||||||
source=("$pkgname::https://labs.phundrak.com/phundrak/pumopm/archive/$pkgver.tar.gz")
|
source=("$pkgname::https://labs.phundrak.com/phundrak/pumopm/archive/$pkgver.tar.gz")
|
||||||
md5sums=('347a95efacdbf9f8ab3b2da6a7eff6cc')
|
md5sums=('347a95efacdbf9f8ab3b2da6a7eff6cc')
|
||||||
|
|
||||||
@ -25,9 +25,14 @@ build() {
|
|||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "$pkgname"
|
cd "$pkgname"
|
||||||
|
echo EXE
|
||||||
install -Dm755 "target/release/pumopm" "$pkgdir/usr/bin/pumopm"
|
install -Dm755 "target/release/pumopm" "$pkgdir/usr/bin/pumopm"
|
||||||
|
echo LICENSE
|
||||||
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
|
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
|
||||||
|
echo MAN
|
||||||
|
install -Dm644 "pumopm.1" "$pkgdir/usr/share/man/man1/pumopm.1"
|
||||||
|
echo SERVCE
|
||||||
|
install -Dm644 "pumopm.service" "$pkgdir/usr/lib/systemd/system/pumopm.service"
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim:set ts=2 sw=2 et:
|
# vim:set ts=2 sw=2 et:
|
||||||
|
49
pumopm.1
Normal file
49
pumopm.1
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
\" -*- mode: nroff; -*-
|
||||||
|
.TH PUMOPM 1 pumopm
|
||||||
|
.SH NAME
|
||||||
|
pumopm \- simple, small, no bloat power manager
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B pumopm
|
||||||
|
.RB [-h\ --help]
|
||||||
|
.RB [-V\ --version]
|
||||||
|
.RB [-l\ --low\ 5-95]
|
||||||
|
.RB [-L\ --very-low\ 5-95]
|
||||||
|
.RB [-c\ --critical\ 5-95]
|
||||||
|
.RB [-r\ --refresh-rate\ <seconds>]
|
||||||
|
.RB [-v\ --verbose]
|
||||||
|
.SH DESCRIPTIOR
|
||||||
|
pumopm is a simple, small, no bloat power manager written by Phundrak in
|
||||||
|
an attempt to create a power manager that is small, simple, and does
|
||||||
|
exactly what he wants to do: warn about low, very low, and critical
|
||||||
|
battery levels before suspending the computer.
|
||||||
|
.SH FLAGS
|
||||||
|
.TP
|
||||||
|
.B \-h \-\-help
|
||||||
|
Prints help information
|
||||||
|
.TP
|
||||||
|
.B \-v \-\-verbose
|
||||||
|
Prints verbose information
|
||||||
|
.TP
|
||||||
|
.B \-V \-\-version
|
||||||
|
Prints version information
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
.B \-l \-\-low <value>
|
||||||
|
Level at which the battery is considered to be low. Value between 5 and
|
||||||
|
95. Default 25
|
||||||
|
.TP
|
||||||
|
.B \-L \-\-very-low <value>
|
||||||
|
level at which the battery is considered to be very low. Value between 5
|
||||||
|
and 95. Default 15
|
||||||
|
.TP
|
||||||
|
.B \-c \-\-critical <value>
|
||||||
|
level at which the battery is considered to be critical. Value between 5
|
||||||
|
and 95. Default 10
|
||||||
|
.TP
|
||||||
|
.B \-r \-\-refresh-rate <value>
|
||||||
|
refresh rate of the battery’s reads in seconds. Default 5
|
||||||
|
.SH BUGS
|
||||||
|
Although I try to hunt for bugs, but if you ever find one, please do not
|
||||||
|
hesitate reporting it at lucien@phundrak.com or on
|
||||||
|
https://labs.phundrak.com/phundrak/pumopm or
|
||||||
|
https://github.com/Phundrak/pumopm/
|
17
pumopm.service
Normal file
17
pumopm.service
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=A small, simple, no bloat power manager.
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=notify
|
||||||
|
ExecStart=/usr/bin/pumo
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
# Disalow writing to /usr, /bin, /usr/bin... It shouldn’t, but just in case
|
||||||
|
ProtectSystem=yes
|
||||||
|
# I swear I’m not paranoid about my own program
|
||||||
|
NoNewPrivileges=yes
|
||||||
|
ProtectKernelTunables=yes
|
||||||
|
ProtectControlGroups=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
Loading…
Reference in New Issue
Block a user