aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-11-27 00:47:09 +0100
committerMattias Andrée <maandree@operamail.com>2015-11-27 00:47:09 +0100
commitcf816ced150a05e3344ea031e594868860fce45b (patch)
tree6bb018138e454577af173b519fcf7859c3dfd71b
parentadd shell tab-completion (diff)
downloadadjbacklight-cf816ced150a05e3344ea031e594868860fce45b.tar.gz
adjbacklight-cf816ced150a05e3344ea031e594868860fce45b.tar.bz2
adjbacklight-cf816ced150a05e3344ea031e594868860fce45b.tar.xz
add manpage
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--Makefile60
-rw-r--r--doc/info/adjbacklight.texinfo (renamed from info/adjbacklight.texinfo)0
-rw-r--r--doc/info/fdl.texinfo (renamed from info/fdl.texinfo)0
-rw-r--r--doc/info/gpl.texinfo (renamed from info/gpl.texinfo)0
-rw-r--r--doc/man/adjbacklight.1104
5 files changed, 138 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index a2f5ceb..a4967f5 100644
--- a/Makefile
+++ b/Makefile
@@ -7,15 +7,6 @@
#
# [GNU All Permissive License]
-OPTIMISATION = -Ofast
-# -Os optimise for small size
-# -Ofast optimise for performance
-# -Og optimise for debugging
-# -g include debugging data (use together with -Og or alone)
-
-PKGNAME = adjbacklight
-COMMAND = adjbacklight
-
PREFIX = /usr
BIN = /bin
BINDIR = $(PREFIX)$(BIN)
@@ -23,10 +14,20 @@ DATA = /share
DATADIR = $(PREFIX)$(DATA)
DOCDIR = $(DATADIR)/doc
INFODIR = $(DATADIR)/info
+MANDIR = $(DATADIR)/man
+MAN1DIR = $(MANDIR)/man1
LICENSEDIR = $(DATADIR)/licenses
-MANUAL = adjbacklight
-MANUALDIR = info/
+
+PKGNAME = adjbacklight
+COMMAND = adjbacklight
+
+
+OPTIMISATION = -Ofast
+# -Os optimise for small size
+# -Ofast optimise for performance
+# -Og optimise for debugging
+# -g include debugging data (use together with -Og or alone)
WARN = -Wall -Wextra -Wdouble-promotion -Wformat=2 -Winit-self -Wmissing-include-dirs \
-Wtrampolines -Wfloat-equal -Wshadow -Wmissing-prototypes -Wmissing-declarations \
@@ -41,6 +42,7 @@ WARN = -Wall -Wextra -Wdouble-promotion -Wformat=2 -Winit-self -Wmissing-include
# excluded: -pedantic
+
# compile the package
.PHONY: default
default: code info shell
@@ -59,31 +61,31 @@ bin/adjbacklight: src/adjbacklight.c
doc: info pdf dvi ps
.PHONY: info
-info: bin/$(MANUAL).info
-bin/%.info: $(MANUALDIR)%.texinfo
+info: bin/adjbacklight.info
+bin/%.info: doc/info/%.texinfo
@mkdir -p bin
$(MAKEINFO) "$<"
mv $*.info $@
.PHONY: pdf
-pdf: bin/$(MANUAL).pdf
-bin/%.pdf: $(MANUALDIR)%.texinfo
+pdf: bin/adjbacklight.pdf
+bin/%.pdf: doc/info/%.texinfo
@! test -d obj/pdf || rm -rf obj/pdf
@mkdir -p bin obj/pdf
cd obj/pdf && texi2pdf ../../"$<" < /dev/null
mv obj/pdf/$*.pdf $@
.PHONY: dvi
-dvi: bin/$(MANUAL).dvi
-bin/%.dvi: $(MANUALDIR)%.texinfo
+dvi: bin/adjbacklight.dvi
+bin/%.dvi: doc/info/%.texinfo
@! test -d obj/dvi || rm -rf obj/dvi
@mkdir -p bin obj/dvi
cd obj/dvi && $(TEXI2DVI) ../../"$<" < /dev/null
mv obj/dvi/$*.dvi $@
.PHONY: ps
-ps: bin/$(MANUAL).ps
-bin/%.ps: $(MANUALDIR)%.texinfo
+ps: bin/adjbacklight.ps
+bin/%.ps: doc/info/%.texinfo
@! test -d obj/ps || rm -rf obj/ps
@mkdir -p bin obj/ps
cd obj/ps && texi2pdf --ps ../../"$<" < /dev/null
@@ -113,7 +115,7 @@ bin/adjbacklight.%sh-completion: obj/adjbacklight.auto-completion
# install to system
.PHONY: install
-install: install-base install-info install-shell
+install: install-base install-info install-man install-shell
.PHONY: install-all
install-all: install-base install-doc install-shell
@@ -140,28 +142,33 @@ install-license:
install -m644 -- LICENSE "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
.PHONY: install-doc
-install-doc: install-info install-pdf install-dvi install-ps
+install-doc: install-info install-pdf install-dvi install-ps install-man
.PHONY: install-info
-install-info: bin/$(MANUAL).info
+install-info: bin/adjbacklight.info
install -dm755 -- "$(DESTDIR)$(INFODIR)"
install -m644 -- "$<" "$(DESTDIR)$(INFODIR)/$(PKGNAME).info"
.PHONY: install-pdf
-install-pdf: bin/$(MANUAL).pdf
+install-pdf: bin/adjbacklight.pdf
install -dm755 -- "$(DESTDIR)$(DOCDIR)"
install -m644 -- "$<" "$(DESTDIR)$(DOCDIR)/$(PKGNAME).pdf"
.PHONY: install-dvi
-install-dvi: bin/$(MANUAL).dvi
+install-dvi: bin/adjbacklight.dvi
install -dm755 -- "$(DESTDIR)$(DOCDIR)"
install -m644 -- "$<" "$(DESTDIR)$(DOCDIR)/$(PKGNAME).dvi"
.PHONY: install-ps
-install-ps: bin/$(MANUAL).ps
+install-ps: bin/adjbacklight.ps
install -dm755 -- "$(DESTDIR)$(DOCDIR)"
install -m644 -- "$<" "$(DESTDIR)$(DOCDIR)/$(PKGNAME).ps"
+.PHONY: install-man
+install-man: doc/man/adjbacklight.1
+ install -dm755 -- "$(DESTDIR)$(MAN1DIR)"
+ install -m644 "$<" -- "$(DESTDIR)$(MAN1DIR)/$(COMMAND).1"
+
.PHONY: install-shell
install-shell: install-bash install-fish install-zsh
@@ -187,7 +194,7 @@ uninstall:
-rm -- "$(DESTDIR)$(BINDIR)/$(COMMAND)"
-rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/COPYING"
-rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE"
- -rm -d -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
+ -rmdir -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
-rm -- "$(DESTDIR)$(INFODIR)/$(PKGNAME).info"
-rm -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).pdf"
-rm -- "$(DESTDIR)$(DOCDIR)/$(PKGNAME).dvi"
@@ -195,6 +202,7 @@ uninstall:
-rm -- "$(DESTDIR)$(DATADIR)/bash-completion/completions/$(COMMAND)"
-rm -- "$(DESTDIR)$(DATADIR)/fish/completions/$(COMMAND).fish"
-rm -- "$(DESTDIR)$(DATADIR)/zsh/site-functions/_$(COMMAND)"
+ -rm -- "$(DESTDIR)$(MAN1)/$(COMMAND).1"
# remove files created by `all`
diff --git a/info/adjbacklight.texinfo b/doc/info/adjbacklight.texinfo
index b4c6986..b4c6986 100644
--- a/info/adjbacklight.texinfo
+++ b/doc/info/adjbacklight.texinfo
diff --git a/info/fdl.texinfo b/doc/info/fdl.texinfo
index cb71f05..cb71f05 100644
--- a/info/fdl.texinfo
+++ b/doc/info/fdl.texinfo
diff --git a/info/gpl.texinfo b/doc/info/gpl.texinfo
index 97a17e1..97a17e1 100644
--- a/info/gpl.texinfo
+++ b/doc/info/gpl.texinfo
diff --git a/doc/man/adjbacklight.1 b/doc/man/adjbacklight.1
new file mode 100644
index 0000000..d946738
--- /dev/null
+++ b/doc/man/adjbacklight.1
@@ -0,0 +1,104 @@
+.TH ADJBACKLIGHT 1 ADJBACKLIGHT
+.SH NAME
+adjbacklight - Convenient method for adjusting the backlight on your portable computer
+.SH SYNOPSIS
+.B adjbacklight
+(-c | -w | [-g | -s
+.IR LEVEL
+|
+.IR LEVEL ]
+[-a |
+.IR DEVICE ...])
+.SH DESCRIPTION
+.B adjbacklight
+can be used to fetch or set the backlight non-interactively.
+If these feature is not used, it starts a interactive user
+interface in the terminal.
+.PP
+.B adjbacklight
+installs with the set-uid bit set, to enable any user to
+change the backlight on the computer.
+.PP
+.B adjbacklight
+was originally designed for small netbooks that are not running
+.BR X .
+However, it is still suitable for desktop computers and can
+be used inside
+.BR X .
+In fact it seems to work for all machines with backlight, which
+is not true for
+.BR xbacklight (1).
+.V adjbacklight
+uses
+.IR /sys/class/backlight .
+.B adjbacklight
+as been retrofitted to be convenient for use inside
+.B X
+on desktop computers, with commands that lets it be used
+non-interactively with hotkeys set up in
+.BR xbindkeys (1).
+.SH OPTIONS
+.TP
+.BR \-c ,\ \-\-copyright ,\ \-\-copying
+Display copyright information.
+.TP
+.BR \-w, \ \-\-warranty
+Display warranty disclaimer.
+.TP
+.BR \-a, \ \-\-all
+Run for all devices, including ACPI devices.
+.TP
+.BR \-g, \ \-\-get
+Get average brightness on devices.
+.TP
+.BR \-s, \ \-\-set \ \fILEVEL\fP[%]
+Set brightness on devices.
+.PP
+.TP
+.BR \+ \fILEVEL\fP
+Increase brightness on devices by actual value.
+.TP
+.BR \- \fILEVEL\fP
+Decrease brightness on devices by actual value.
+.TP
+.BR \= \fILEVEL\fP
+Set brightness on devices by actual value.
+.br
+.TP
+.BR \+ \fILEVEL\fP%
+Increase brightness on devices by percentage-points.
+.TP
+.BR \- \fILEVEL\fP%
+Decrease brightness on devices by percentage-points.
+.TP
+.BR \= \fILEVEL\fP%
+Set brightness on devices by percentage-points.
+.br
+.TP
+.BR \+ \fILEVEL\fP%%
+Increase brightness on devices by percentage.
+.TP
+.BR \- \fILEVEL\fP%%
+Decrease brightness on devices by percentage.
+.TP
+.BR \= \fILEVEL\fP%%
+Set brightness on devices by percentage.
+.SH "SEE ALSO"
+.BR xbindkeys (1),
+.BR xbacklight (1)
+.PP
+Full documentation available locally via: info \(aq(adjbacklight)\(aq
+.SH AUTHORS
+Principal author, Mattias Andrée. See the COPYING file for the full
+list of authors.
+.SH LICENSE
+Copyright \(co 2015 Mattias Andrée
+.br
+License GPLv3+: GNU GPL version 3 or later <http://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.
+.SH BUGS
+Please report bugs to https://github.com/maandree/adjbacklight/issues or to
+maandree@member.fsf.org