This change prettifies man pages with <SYSCONFDIR> and /var/lib
so that it will show the actual value connman was compiled with,
rather than just hinting at some magical compile time variable.
---
 .gitignore                                           |  8 ++++++--
 Makefile.am                                          | 20 ++++++++++++++++----
 ...-service.config.5 => connman-service.config.5.in} |  8 ++++----
 ...der.config.5 => connman-vpn-provider.config.5.in} |  6 +++---
 doc/{connman-vpn.8 => connman-vpn.8.in}              |  5 ++---
 doc/{connman-vpn.conf.5 => connman-vpn.conf.5.in}    |  8 +-------
 doc/{connman.8 => connman.8.in}                      |  5 ++---
 doc/{connman.conf.5 => connman.conf.5.in}            |  8 +-------
 doc/{connmanctl.1 => connmanctl.1.in}                |  0
 9 files changed, 35 insertions(+), 33 deletions(-)
 rename doc/{connman-service.config.5 => connman-service.config.5.in} (96%)
 rename doc/{connman-vpn-provider.config.5 => connman-vpn-provider.config.5.in} 
(98%)
 rename doc/{connman-vpn.8 => connman-vpn.8.in} (90%)
 rename doc/{connman-vpn.conf.5 => connman-vpn.conf.5.in} (90%)
 rename doc/{connman.8 => connman.8.in} (94%)
 rename doc/{connman.conf.5 => connman.conf.5.in} (97%)
 rename doc/{connmanctl.1 => connmanctl.1.in} (100%)

diff --git a/.gitignore b/.gitignore
index 9c22e4a..bbb44c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -64,8 +64,12 @@ unit/test-nat
 doc/*.bak
 doc/*.stamp
 doc/connman.*
-!doc/connman.8
-!doc/connman.conf.5
+doc/*.1
+doc/*.5
+doc/*.8
+!doc/*.1.in
+!doc/*.5.in
+!doc/*.8.in
 doc/connman-*.txt
 
 vpn/builtin.h
diff --git a/Makefile.am b/Makefile.am
index 3d0645e..abd30eb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -248,8 +248,6 @@ include Makefile.plugins
 if CLIENT
 bin_PROGRAMS += client/connmanctl
 
-MANUAL_PAGES += doc/connmanctl.1
-
 client_connmanctl_SOURCES = client/dbus_helpers.h client/dbus_helpers.c \
                        client/services.h client/services.c \
                        client/commands.h client/commands.c \
@@ -385,7 +383,10 @@ EXTRA_DIST += doc/overview-api.txt doc/behavior-api.txt \
 EXTRA_DIST += src/main.conf \
                src/eduroam.config
 
-MANUAL_PAGES += doc/connman.8 doc/connman.conf.5
+MANUAL_PAGES += doc/connmanctl.1 doc/connman.conf.5 \
+               doc/connman-service.config.5 doc/connman-vpn.conf.5 \
+               doc/connman-vpn-provider.config.5 \
+               doc/connman.8 doc/connman-vpn.8
 
 dist_man_MANS = $(MANUAL_PAGES)
 
@@ -449,8 +450,19 @@ do_subst = $(AM_V_GEN)$(SED) \
                -e 's,[@]prefix[@],$(prefix),g' \
                -e 's,[@]sbindir[@],$(sbindir),g' \
                -e 's,[@]sysconfdir[@],$(sysconfdir),g' \
+               -e 's,[@]storagedir[@],$(storagedir),g' \
+               -e 's,[@]vpn_storagedir[@],$(vpn_storagedir),g' \
                -e 's,[@]localstatedir[@],$(localstatedir),g'
 
+%.1 : %.1.in
+       $(do_subst) < $< > $@
+
+%.5 : %.5.in
+       $(do_subst) < $< > $@
+
+%.8 : %.8.in
+       $(do_subst) < $< > $@
+
 %.service: %.service.in Makefile
        $(AM_V_at)$(MKDIR_P) $(dir $@)
        $(do_subst) < $< > $@
@@ -468,4 +480,4 @@ include/connman/%.h: $(abs_top_srcdir)/include/%.h
        $(AM_V_GEN)$(LN_S) $< $@
 
 clean-local:
-       @$(RM) -rf include/connman
+       @$(RM) -rf include/connman $(MANUAL_PAGES)
diff --git a/doc/connman-service.config.5 b/doc/connman-service.config.5.in
similarity index 96%
rename from doc/connman-service.config.5
rename to doc/connman-service.config.5.in
index 3cf3692..535c626 100644
--- a/doc/connman-service.config.5
+++ b/doc/connman-service.config.5.in
@@ -6,11 +6,11 @@
 .SH NAME
 service-name.config \- ConnMan service provisioning file
 .SH SYNOPSIS
-.B /var/lib/connman/\fIservice-name\fB.config
+.B @storagedir@/\fIservice-name\fB.config
 .SH DESCRIPTION
 .P
 \fIConnMan\fP's services are configured with so called
-"\fBprovisioning files\fP" which reside under \fI/var/lib/connman/\fP.
+"\fBprovisioning files\fP" which reside under \fI@storagedir@/\fP.
 The files can be named anything, as long as they end in \fB.config\fP.
 The provisioning files can be used to configure for example secured
 wireless access points which need complex authentication, for example
@@ -125,7 +125,7 @@ method (should only be used with \fBEAP=ttls\fP).
 .SH "EXAMPLE"
 .SS Eduroam
 This is a configuration file for eduroam networks. This file could for
-example be /var/lib/connman/eduroam.config. Your university's exact
+example be @storagedir@/eduroam.config. Your university's exact
 settings might be different.
 .PP
 .nf
@@ -139,7 +139,7 @@ CACertFile = /etc/ssl/certs/UNIV_CA.crt
 .SS Complex networking
 This is a configuration file for a network providing EAP-TLS, EAP-TTLS and
 EAP-PEAP services. The respective SSIDs are tls_ssid, ttls_ssid and peap_ssid
-and the file name could be /var/lib/connman/complex.config.
+and the file name could be @storagedir@/complex.config.
 .PP
 Please note that the SSID entry is for hexadecimal encoded SSID (e.g. "SSID =
 746c735f73736964"). If your SSID does not contain any exotic character then
diff --git a/doc/connman-vpn-provider.config.5 
b/doc/connman-vpn-provider.config.5.in
similarity index 98%
rename from doc/connman-vpn-provider.config.5
rename to doc/connman-vpn-provider.config.5.in
index cb12854..5393260 100644
--- a/doc/connman-vpn-provider.config.5
+++ b/doc/connman-vpn-provider.config.5.in
@@ -6,11 +6,11 @@
 .SH NAME
 connection_name.config \- ConnMan vpn connection provisioning file
 .SH SYNOPSIS
-.B /var/lib/connman-vpn/\fIconnection-name\fB.config
+.B @vpn_storagedir@/\fIconnection-name\fB.config
 .SH DESCRIPTION
 .P
 \fIConnMan\fP's vpn connections are configured with so called
-"\fBprovisioning files\fP" which reside under \fI/var/lib/connman-vpn/\fP.
+"\fBprovisioning files\fP" which reside under \fI@vpn_storagedir@/\fP.
 The files can be named anything, as long as they contain only printable
 ascii characers, for example letters, numbers and underscores. The file
 must end with \fB.config\fP. Each VPN connection requires a provisioning
@@ -387,7 +387,7 @@ No Van Jacobson compression.
 .SH "EXAMPLE"
 This is a configuration file for a VPN providing L2TP, OpenVPN and
 OpenConnect services. It could, for example, be in the file
-.B /var/lib/connman-vpn/example.config\fR.
+.B @vpn_storagedir@/example.config\fR.
 .PP
 .nf
 [global]
diff --git a/doc/connman-vpn.8 b/doc/connman-vpn.8.in
similarity index 90%
rename from doc/connman-vpn.8
rename to doc/connman-vpn.8.in
index 968ef50..6130b3b 100644
--- a/doc/connman-vpn.8
+++ b/doc/connman-vpn.8.in
@@ -38,9 +38,8 @@ Print ConnMan-VPN's available options and exit.
 .TP
 .BI \-c\  file\fR,\ \fB\-\-config= \fIfile
 Specify configuration file to set up various settings for ConnMan.  If not
-specified, the default value of \fI<SYSCONFDIR>/connman/connman-vpn.conf\fP
-is used; where \fI<SYSCONFDIR>\fP is dependent on your distribution (usually
-it's \fI/etc\fP).  See \fBconnman-vpn.conf\fP(5) for more information on
+specified, the default value of \fI@sysconfdir@/connman/connman-vpn.conf\fP
+is used.  See \fBconnman-vpn.conf\fP(5) for more information on
 configuration file. The use of config file is optional and sane default values
 are used if config file is missing.
 .TP
diff --git a/doc/connman-vpn.conf.5 b/doc/connman-vpn.conf.5.in
similarity index 90%
rename from doc/connman-vpn.conf.5
rename to doc/connman-vpn.conf.5.in
index 5facd37..fcc4c69 100644
--- a/doc/connman-vpn.conf.5
+++ b/doc/connman-vpn.conf.5.in
@@ -6,13 +6,7 @@
 .SH NAME
 connman-vpn.conf \- ConnMan-VPN configuration file
 .SH SYNOPSIS
-.B /etc/connman/connman-vpn.conf
-.br
-or
-.br
-\fI<SYSCONFDIR>\fB/connman/connman-vpn.conf
-.br
-.RI where\  <SYSCONFDIR> " depends on your distribution or build."
+.B @sysconfdir@/connman/connman-vpn.conf
 .SH DESCRIPTION
 .P
 .B connman-vpn.conf
diff --git a/doc/connman.8 b/doc/connman.8.in
similarity index 94%
rename from doc/connman.8
rename to doc/connman.8.in
index 3d065db..9b71779 100644
--- a/doc/connman.8
+++ b/doc/connman.8.in
@@ -48,9 +48,8 @@ Print ConnMan's available options and exit.
 .TP
 .BI \-c\  file\fR,\ \fB\-\-config= \fIfile
 Specify configuration file to set up various settings for ConnMan.  If not
-specified, the default value of \fI<SYSCONFDIR>/connman/main.conf\fP
-is used; where \fI<SYSCONFDIR>\fP is dependent on your distribution (usually
-it's \fI/etc\fP).  See \fBconnman.conf\fP(5) for more information on
+specified, the default value of \fI@sysconfdir@/connman/main.conf\fP
+is used.  See \fBconnman.conf\fP(5) for more information on
 configuration file. The use of config file is optional and sane default values
 are used if config file is missing.
 .TP
diff --git a/doc/connman.conf.5 b/doc/connman.conf.5.in
similarity index 97%
rename from doc/connman.conf.5
rename to doc/connman.conf.5.in
index 0da3b47..ff97b7c 100644
--- a/doc/connman.conf.5
+++ b/doc/connman.conf.5.in
@@ -6,13 +6,7 @@
 .SH NAME
 main.conf \- ConnMan configuration file
 .SH SYNOPSIS
-.B /etc/connman/main.conf
-.br
-or
-.br
-\fI<SYSCONFDIR>\fB/connman/main.conf
-.br
-.RI where\  <SYSCONFDIR> " depends on your distribution or build."
+.B @sysconfdir@/connman/main.conf
 .SH DESCRIPTION
 .P
 .B main.conf
diff --git a/doc/connmanctl.1 b/doc/connmanctl.1.in
similarity index 100%
rename from doc/connmanctl.1
rename to doc/connmanctl.1.in
-- 
2.6.1

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to