diff options
author | Aaron Ball <nullspoon@oper.io> | 2019-02-04 23:33:12 -0700 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2019-02-04 23:33:12 -0700 |
commit | adc6ce3070c304bf9d934ff9458dce915af4d6e1 (patch) | |
tree | 17896dab8829aeed15a30225c2d304c7ca2bc12c | |
parent | 6878a1fc964d4ef0ddba15461801caf972f91185 (diff) | |
download | upwgen-man-page.tar.gz upwgen-man-page.tar.xz |
Initial commit of man pageman-page
Updated the make file to produce the man page during `make` and `make
install`. The make process interpolates the config using sed to find and
replace jinja-style variables for the release date and the build
version.
Added new variables to the Makefile: VERSION, PATCHLEVEL, EXTRAVERSION,
RELDATE (and BUILDVERSION, though this is assembled from the previously
mentioned variables). Also added the MANPREFIX variable to make the man
install destination configurable.
-rw-r--r-- | Makefile | 27 | ||||
-rw-r--r-- | doc/upwgen.1 | 47 |
2 files changed, 68 insertions, 6 deletions
@@ -1,11 +1,26 @@ -CC = cc -CCOPTS = -Wall -std=gnu99 -out = upwgen -PREFIX = /usr/bin +VERSION = 1 +PATCHLEVEL = 0 +EXTRAVERSION = +RELDATE = 2019 February 04 + +CC = cc +CCOPTS = -Wall -std=gnu99 +out = upwgen +PREFIX = /usr/bin +MANPREFIX = /usr/share/man +BUILDVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL))$(EXTRAVERSION) all: + # Compile upwgen $(CC) $(CCOPTS) src/main.c -o $(out) + # Interpolate the man page and compress + sed \ + -e "s/{{ BUILDVERSION }}/$(BUILDVERSION)/" \ + -e "s/{{ RELDATE }}/$(RELDATE)/" \ + doc/upwgen.1 | gzip -c > upwgen.1.gz install: - mkdir -p $(DESTDIR)/$(PREFIX) - cp $(out) $(DESTDIR)/$(PREFIX)/$(out) + # Install the binary + install -D -m 755 $(out) "$(DESTDIR)/$(PREFIX)/$(out)" + # Install the man page + install -D -m 644 upwgen.1.gz "$(DESTDIR)/$(MANPREFIX)/man1/upwgen.1.gz" diff --git a/doc/upwgen.1 b/doc/upwgen.1 new file mode 100644 index 0000000..3b46e1c --- /dev/null +++ b/doc/upwgen.1 @@ -0,0 +1,47 @@ +.TH UPWGEN 1 "{{ RELDATE }}" "pwgen version {{ BUILDVERSION }}" +.SH NAME +upwgen \- generate international (utf-8) passwords +.SH SYNOPSIS +.B upwgen +[ +.I OPTION +] +[ +.I pw_length +] +.SH DESCRIPTION +The +.B upwgen +program generates passwords which include international characters, +significantly increasing password complexity. These passwords are not only +designed to be difficult to memorize, but are also nearly impossible to type as +they will usually span multiple character sets, requiring multiple keyboard +locales. By design, the passwords generated by upwgen are intended to be copied +and pasted. +.B +.SH OPTIONS +.TP +.B \-c, --capitalize +Include at least one capital letter in the password. +.TP +.B \-i, --i18n +Include at least one international letter (output becomes utf-8 encoded) +.TP +.B \-h, --help +Print the help text +.TP +.B \-l, --lower +Include at least one lower case letter in the password. +.TP +.B \-n, --numerals +Include at least one number in the password. +.TP +.B \-y, --symbols +Include at least one special character in the password. +.SH AUTHOR +.B Upwgen +was written by Aaron Ball <nullspoon@oper.io>. +It is modelled after pwgen, a program written by Theodore Ts'o. +.SH SEE ALSO +.BR passwd (1) +.BR pwgen (1) |