# HG changeset patch # User Guido Berhoerster # Date 1398633126 -7200 # Node ID f0c7f45022c0b8d71c285446331eb4e8ad352df6 # Parent f219f96f07c20fcffcffa514379909ba18cb8854 Add manpage diff -r f219f96f07c2 -r f0c7f45022c0 Makefile --- a/Makefile Sun Apr 27 23:12:06 2014 +0200 +++ b/Makefile Sun Apr 27 23:12:06 2014 +0200 @@ -42,11 +42,29 @@ MSGFMT := msgfmt INTLTOOL_UPDATE := intltool-update INTLTOOL_MERGE := intltool-merge +XSLTPROC := xsltproc +DOCBOOK5_MANPAGES_STYLESHEET = http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl + +define generate-manpage-rule = +%.$(1): %.$(1).xml + $$(XSLTPROC) \ + --xinclude \ + --stringparam package $$(PACKAGE) \ + --stringparam version $$(VERSION)\ + data/docbook-update-source-data.xsl $$< | \ + $$(XSLTPROC) \ + --xinclude \ + $$(DOCBOOK5_MANPAGES_FLAGS) \ + --output $$@ \ + $$(DOCBOOK5_MANPAGES_STYLESHEET) \ + - +endef DESTDIR ?= prefix ?= /usr/local bindir ?= $(prefix)/bin datadir ?= $(prefix)/share +mandir ?= $(datadir)/man localedir ?= $(datadir)/locale sysconfdir ?= /etc xdgautostartdir ?= $(sysconfdir)/xdg/autostart @@ -82,7 +100,8 @@ endif OBJS = main.o xwrited-debug.o xwrited-unique.o $(OBJS_UTMP) -AUTOSTART_FILE = $(PACKAGE).desktop +MANPAGES = data/$(PACKAGE).1 +AUTOSTART_FILE = data/$(PACKAGE).desktop MOFILES := $(patsubst %.po,%.mo,$(wildcard po/*.po)) POTFILE = po/$(PACKAGE).pot POSRCS := $(shell $(SED) -e 's/\#.*//' -e '/^[ \t]*$$/d' \ @@ -97,12 +116,14 @@ -DG_LOG_DOMAIN=\"$(PACKAGE)\" LDLIBS := $(EXTRA_LIBS) \ $(shell pkg-config --libs $(PKGCONFIG_LIBS)) +DOCBOOK5_MANPAGES_FLAGS = --stringparam man.authors.section.enabled 0 \ + --stringparam man.copyright.section.enabled 0 .DEFAULT_TARGET = all .PHONY: all clean clobber dist install -all: $(PACKAGE) $(MOFILES) $(AUTOSTART_FILE) +all: $(PACKAGE) $(MANPAGES) $(MOFILES) $(AUTOSTART_FILE) $(PACKAGE): $(OBJS) $(LINK.o) $^ $(LDLIBS) -o $@ @@ -122,6 +143,8 @@ $(MAKEDEPEND.c) $< | $(SED) -f deps.sed >$*.d $(COMPILE.c) -o $@ $< +$(foreach section,1 2 3 4 5 6 7 8 9,$(eval $(call generate-manpage-rule,$(section)))) + %.desktop: %.desktop.in $(MOFILES) $(INTLTOOL_MERGE) --desktop-style --utf8 po $< $@ @@ -136,9 +159,11 @@ done $(INSTALL.data) $(AUTOSTART_FILE) \ "$(DESTDIR)$(xdgautostartdir)/$(notdir $(AUTOSTART_FILE))" + $(INSTALL.data) data/$(PACKAGE).1 \ + "$(DESTDIR)$(mandir)/man1/$(PACKAGE).1" clean: - rm -f $(PACKAGE) $(OBJS) $(POTFILE) $(MOFILES) $(AUTOSTART_FILE) + rm -f $(PACKAGE) $(OBJS) $(POTFILE) $(MOFILES) $(MANPAGES) $(AUTOSTART_FILE) clobber: clean rm -f $(patsubst %.o,%.d,$(OBJS)) diff -r f219f96f07c2 -r f0c7f45022c0 data/docbook-update-source-data.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/docbook-update-source-data.xsl Sun Apr 27 23:12:06 2014 +0200 @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff -r f219f96f07c2 -r f0c7f45022c0 data/xwrited.1.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/xwrited.1.xml Sun Apr 27 23:12:06 2014 +0200 @@ -0,0 +1,159 @@ + + + + + + + Guido + Berhoerster + + guido+xwrited@berhoerster.name + + + 27 April, 2014 + + + xwrited + 1 + + + User Commands + + + xwrited + display write and wall messages as desktop + notifications + + + + sencrypt + + + + + + + + + + + + + + + + + + + + + + + + + Description + The xwrited utility displays + write1 + and + wall1 + messages as desktop notifications. A notification daemon + compliant to the freedesktop.org Desktop Notification Specification draft + needs to be running in order to display the notifications. + + + Options + The following options are supported: + + + + + + + + + + + + + Print a summary of all command line options and exit. + + + + + + + + + + + Enable debugging output. + + + + + + + + + + + Print the version number and exit. + + + + + + Exit Status + The following exit values are returned: + + + 0 + + Command successfully executed. + + + + > 0 + + An error has occured. + + + + + + See Also + write + 1, + wall1 + + + + Notes + xwrited assumes that messages are encoded in UTF-8 because there is + no way for it to determine the character set encoding of the received + data. + + diff -r f219f96f07c2 -r f0c7f45022c0 data/xwrited.desktop.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data/xwrited.desktop.in Sun Apr 27 23:12:06 2014 +0200 @@ -0,0 +1,8 @@ +[Desktop Entry] +Encoding=UTF-8 +_Name=xwrited +_Comment=Display write and wall messages as desktop notifications +Exec=xwrited +Terminal=false +Type=Application +Categories=System;Monitor; diff -r f219f96f07c2 -r f0c7f45022c0 po/POTFILES.in --- a/po/POTFILES.in Sun Apr 27 23:12:06 2014 +0200 +++ b/po/POTFILES.in Sun Apr 27 23:12:06 2014 +0200 @@ -1,4 +1,4 @@ -xwrited.desktop.in +data/xwrited.desktop.in main.c xwrited-debug.c xwrited-unique.c diff -r f219f96f07c2 -r f0c7f45022c0 po/de.po --- a/po/de.po Sun Apr 27 23:12:06 2014 +0200 +++ b/po/de.po Sun Apr 27 23:12:06 2014 +0200 @@ -18,11 +18,11 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ../xwrited.desktop.in.h:1 +#: ../data/xwrited.desktop.in.h:1 msgid "xwrited" msgstr "xwrited" -#: ../xwrited.desktop.in.h:2 +#: ../data/xwrited.desktop.in.h:2 msgid "Display write and wall messages as desktop notifications" msgstr "Zeigt write und wall Nachrichten as Desktop-Benachrichtigungen an" diff -r f219f96f07c2 -r f0c7f45022c0 xwrited.desktop.in --- a/xwrited.desktop.in Sun Apr 27 23:12:06 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -_Name=xwrited -_Comment=Display write and wall messages as desktop notifications -Exec=xwrited -Terminal=false -Type=Application -Categories=System;Monitor;