Adding manpage

master
denes 6 years ago
parent a11c85f906
commit 9811ebb482

@ -33,6 +33,7 @@ DOCS="README.md"
src_install() {
dodoc ${DOCS}
dobin battery-status-led
doman *.1
systemd_dounit battery-status-led.service
}

@ -0,0 +1,33 @@
.TH BATTERY-STATUS-LED 1 LOCAL
.SH NAME
Battery Status LED - Battery (low/critical) status indication by making a (the
capslock) LED blink
.SH SYNOPSIS
.B battery-status-led
.SH DESCRIPTION
Takes no argument. To pick another LED device, edit
.I /lib/systemd/system/battery-status-led.service
and modify
.I BATTERY_STATUS_LED_DEV
to something else. The default value is
.I /sys/class/leds/input4\:\:capslock
.SH AUTHOR
Denes Matetelki <denes.matetelki@gmail.com>
.SH SEE ALSO
Homepage at: <https://github.com/dmatetelki/battery_status_led/>
.br
Copyright © 2018 Denes Matetelki.
.br
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
.br
There is NO WARRANTY, to the extent permitted by law.

@ -26,7 +26,7 @@ mkdir -p build/${NAME}_${VERSION}/DEBIAN
cat > build/${NAME}_${VERSION}/DEBIAN/control <<EOL
Package: ${NAME}
Version: ${VERSION}
Section: base
Section: misc
Priority: optional
Architecture: amd64
Maintainer: Denes Matetelki <denes.matetelki@gmail.com>
@ -43,6 +43,10 @@ cp ../${NAME} build/${NAME}_${VERSION}/usr/bin/
mkdir -p build/${NAME}_${VERSION}/usr/share/doc/${NAME}
cp ../README.md build/${NAME}_${VERSION}/usr/share/doc/${NAME}/
mkdir -p build/${NAME}_${VERSION}/usr/share/man/man1
cp ../${NAME}.1 build/${NAME}_${VERSION}/usr/share/man/man1/
bzip2 build/${NAME}_${VERSION}/usr/share/man/man1/${NAME}.1
cd build
dpkg-deb --root-owner-group --build ${NAME}_${VERSION}

@ -37,7 +37,7 @@ BuildArch: noarch
Source0: ${NAME}.service
Source1: ${NAME}
Source2: README.md
Source3: ${NAME}.1
%description
Battery (low/critical) status indication by making a (the capslock) LED blink
@ -51,6 +51,8 @@ mkdir -p %{buildroot}/%{_bindir}
install -p -m 755 %{SOURCE1} %{buildroot}/%{_bindir}
mkdir -p %{buildroot}/%{_docdir}/${NAME}
install -p -m 0644 %{SOURCE2} %{buildroot}%{_docdir}/${NAME}/
mkdir -p %{buildroot}/%{_mandir}/man1
install -p -m 0644 %{SOURCE3} %{buildroot}%{_mandir}/man1/
# %clean
@ -59,6 +61,7 @@ install -p -m 0644 %{SOURCE2} %{buildroot}%{_docdir}/${NAME}/
%{_unitdir}/${NAME}.service
%{_bindir}/${NAME}
%{_docdir}/${NAME}/README.md
%{_mandir}/man1/${NAME}.1.gz
# %changelog
EOL
@ -66,6 +69,7 @@ EOL
cp ../${NAME}.service build/
cp ../${NAME} build/
cp ../README.md build/
cp ../${NAME}.1 build/
cd build
rpmbuild --define "_sourcedir $PWD" --define "_rpmdir $PWD" --define "_unitdir /lib/systemd/system" -bb ${NAME}.spec

Loading…
Cancel
Save