From 9811ebb4820deb08a3682ffd366da1858942cbe8 Mon Sep 17 00:00:00 2001 From: denes Date: Thu, 30 Aug 2018 21:34:14 +0200 Subject: [PATCH] Adding manpage --- .../battery-status-led-0.1.ebuild | 1 + battery-status-led.1 | 33 +++++++++++++++++++ debian/package-deb.sh | 6 +++- redhat/package-rpm | 6 +++- 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 battery-status-led.1 diff --git a/app-misc/battery-status-led/battery-status-led-0.1.ebuild b/app-misc/battery-status-led/battery-status-led-0.1.ebuild index 4943105..700a5a4 100644 --- a/app-misc/battery-status-led/battery-status-led-0.1.ebuild +++ b/app-misc/battery-status-led/battery-status-led-0.1.ebuild @@ -33,6 +33,7 @@ DOCS="README.md" src_install() { dodoc ${DOCS} dobin battery-status-led + doman *.1 systemd_dounit battery-status-led.service } diff --git a/battery-status-led.1 b/battery-status-led.1 new file mode 100644 index 0000000..0d8512e --- /dev/null +++ b/battery-status-led.1 @@ -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 + +.SH SEE ALSO + +Homepage at: + +.br +Copyright © 2018 Denes Matetelki. +.br +License GPLv3+: GNU GPL version 3 or later . +.br +This is free software: you are free to change and redistribute it. +.br +There is NO WARRANTY, to the extent permitted by law. diff --git a/debian/package-deb.sh b/debian/package-deb.sh index 655b91a..98c3ecb 100755 --- a/debian/package-deb.sh +++ b/debian/package-deb.sh @@ -26,7 +26,7 @@ mkdir -p build/${NAME}_${VERSION}/DEBIAN cat > build/${NAME}_${VERSION}/DEBIAN/control < @@ -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} diff --git a/redhat/package-rpm b/redhat/package-rpm index 3148643..ce3e221 100755 --- a/redhat/package-rpm +++ b/redhat/package-rpm @@ -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