diff --git a/Makefile b/Makefile index 394a75a..432447f 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,9 @@ LIB = -lcurl -loauth -ljsoncpp -lhtmlcxx -lboost_system -lboost_filesystem -lbo LDFLAGS = VERSION = -DVERSION_STRING="\"$(shell sh version.sh)\"" +HELP2MAN = $(shell which help2man 2> /dev/null) +MAN_DIR = man +MAN_PAGE = lgogdownloader.1 INC_DEBUG = $(INC) CFLAGS_DEBUG = $(CFLAGS) -g -DDEBUG @@ -88,7 +91,11 @@ before_release: test -d $(OBJDIR_RELEASE) || mkdir -p $(OBJDIR_RELEASE) test -d $(OBJDIR_RELEASE)/src || mkdir -p $(OBJDIR_RELEASE)/src -after_release: +after_release: out_release +ifdef HELP2MAN + help2man -N -i $(MAN_DIR)/lgogdownloader.supplemental.groff -o $(MAN_DIR)/$(MAN_PAGE) $(OUT_RELEASE) + gzip -9 $(MAN_DIR)/$(MAN_PAGE) +endif release: before_release out_release after_release @@ -115,12 +122,19 @@ clean_release: rm -rf bin/Release rm -rf $(OBJDIR_RELEASE) rm -rf $(OBJDIR_RELEASE)/src + rm -f $(MAN_DIR)/$(MAN_PAGE) $(MAN_DIR)/$(MAN_PAGE).gz install: install $(OUT_RELEASE) /usr/bin + if test -f $(MAN_DIR)/$(MAN_PAGE).gz; then \ + install $(MAN_DIR)/$(MAN_PAGE).gz /usr/share/man/man1; \ + fi uninstall: rm /usr/bin/lgogdownloader + if test -f /usr/share/man/man1/lgogdownloader.1.gz; then \ + rm /usr/share/man/man1/lgogdownloader.1.gz; \ + fi .PHONY: before_debug after_debug clean_debug before_release after_release clean_release diff --git a/man/lgogdownloader.supplemental.groff b/man/lgogdownloader.supplemental.groff new file mode 100644 index 0000000..9bb1858 --- /dev/null +++ b/man/lgogdownloader.supplemental.groff @@ -0,0 +1,35 @@ +[synopsis] +.B lgogdownloader +[\fIOPTION\fP]... + +[description] +An open-source GOG.com downloader for Linux users which uses the same API as the official GOGDownloader. +.PP +LGOGDownloader can download purchased games, query GOG.com to see if game files have changed, as well as downloading extras such as artwork and manuals. It is capable of downloading language-specific installers for games where they exist. +.PP +These games are currently offered only for the Microsoft Windows\[rg] and Apple OS X\[rg] operating systems. To play these games under GNU/Linux will require a compatibility layer such as Wine. Usage of such a program is outside the scope of this document. + +/--update-check/ +.nf +/--no-installers/ +.fi + +/Status codes:/ +.nf + +[files] +.fi +.TP +\fI$XDG_CONFIG_HOME/lgogdownloader/\fP +Storage for configuration files and cookies +.br +If \fB$XDG_CONFIG_HOME\fP is not set, it will use \fI$HOME/.config/lgogdownloader/\fP. + +.TP +\fI$XDG_CACHE_HOME/lgogdownloader/xml/\fP +Storage for XML files +.br +If \fB$XDG_CACHE_HOME\fP is not set, it will use \fI$HOME/.cache/lgogdownloader/xml/\fP. + +[availability] +The latest version of this distribution is available from \fIhttps://github.com/Sude-/lgogdownloader\fP