# We will use the libucw build system
include $(BUILDSYS)/Maketop
-EXTRA_RUNDIRS=run
+EXTRA_RUNDIRS=run share/man/man1 share/man/man8
# Add the detected flags to all the global flags
CFLAGS+=$(LIBUCW_CFLAGS) $(LIBUCW_JSON_CFLAGS)
# And finally the default rules of the build system
include $(BUILDSYS)/Makebottom
+# Our own rules for building man pages. They are a little bit hacky
+# as a2x cannot produce output in a different directory.
+$(o)/%.1: $(s)/%.1.txt
+ $(M)MAN $<
+ $(Q)cp $< $@.txt
+ $(Q)a2x -f manpage $@.txt
+ $(Q)$(call symlink,$@,run/share/man/man1)
+
+$(o)/%.8: $(s)/%.8.txt
+ $(M)MAN $<
+ $(Q)cp $< $@.txt
+ $(Q)a2x -f manpage $@.txt
+ $(Q)$(call symlink,$@,run/share/man/man8)
+
endif
$(o)/client/subauth: $(o)/client/subauth.o
-# This is a little bit hacky as a2x cannot produce output
-# in a different directory.
-$(o)/%.1: $(s)/%.1.txt
- $(M)MAN $<
- $(Q)cp $< $@.txt
- $(Q)a2x -f manpage $@.txt
-
.PHONY: install-client
install:: install-client
install-client:
- install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR)
+ install -d -m 755 $(DESTDIR)$(INSTALL_BIN_DIR) $(DESTDIR)$(INSTALL_MAN_DIR)/man1
install -m 755 $(o)/client/subauth $(DESTDIR)$(INSTALL_BIN_DIR)
+ install -m 644 run/share/man/man1/subauth.1 $(DESTDIR)$(INSTALL_MAN_DIR)/man1
DIRS+=server
-PROGS+=$(o)/server/subauthd
+PROGS+=$(o)/server/subauthd $(o)/server/subauthd.8
CONFIGS+=subauthd
$(o)/server/subauthd: $(addprefix $(o)/server/, subauthd.o cmd.o auth.o temp.o)
.PHONY: install-server
install:: install-server
install-server:
- install -d -m 755 $(DESTDIR)$(INSTALL_SBIN_DIR) $(DESTDIR)$(INSTALL_CONFIG_DIR)
+ install -d -m 755 $(DESTDIR)$(INSTALL_SBIN_DIR) $(DESTDIR)$(INSTALL_CONFIG_DIR) $(DESTDIR)$(INSTALL_MAN_DIR)/man8
install -m 755 $(o)/server/subauthd $(DESTDIR)$(INSTALL_SBIN_DIR)
install -m 644 run/etc/subauthd $(DESTDIR)$(INSTALL_CONFIG_DIR)
+ install -m 644 run/share/man/man8/subauthd.8 $(DESTDIR)$(INSTALL_MAN_DIR)/man8
--- /dev/null
+SUBAUTHD(8)
+===========
+
+NAME
+----
+subauthd - A server for the sub-authentication service
+
+
+SYNOPSIS
+--------
+*subauthd* 'options'
+
+
+DESCRIPTION
+-----------
+Please see *subauth*(1) for an overview of the sub-authentication service.
+
+This daemon maintains all sub-accounts and answers requests for authentication
+from system services (e.g., via the *pam_subauth* module), and requests for
+changes in accounts and tokens (e.g., via the *subauth*(1) client).
+
+
+OPTIONS
+-------
+
+*-C, --config=*'file'::
+ Use the specified config file instead of the default one.
+ If multiple instances of this option are given, all files are
+ loaded.
+
+*-S, --set=*'section'*.*'key'*=*'value'::
+ Set a configuration variable. In fact, the argument of *--set* can be
+ an arbitrary configuration expression; please see documentation on the LibUCW
+ configuration system for full explanation.
+
+
+FILES
+-----
+/etc/subauthd
+
+
+SEE ALSO
+--------
+*subauth*(1)