Hi,
On Mon, 2015-10-19 at 13:50 +0300, Jaakko Hannikainen wrote:
> 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 | 17
> ++++++++++++++++-
> ...man-service.config.5 => connman-service.config.5.in} | 8 ++++----
> ...ovider.config.5 => connman-vpn-provider.config.5.in} | 6 +++---
> doc/{connman-vpn.8 => connman-vpn.8.in} | 3 +--
> doc/{connman-vpn.conf.5 => connman-vpn.conf.5.in} | 8 +-------
> doc/{connman.8 => connman.8.in} | 3 +--
> doc/{connman.conf.5 => connman.conf.5.in} | 8 +-------
> doc/{connmanctl.1 => connmanctl.1.in} | 0
> 9 files changed, 33 insertions(+), 28 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} (93%)
> rename doc/{connman-vpn.conf.5 => connman-vpn.conf.5.in} (90%)
> rename doc/{connman.8 => connman.8.in} (95%)
> 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 8312a66..0887831 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -390,6 +390,21 @@ EXTRA_DIST += doc/overview-api.txt doc/behavior-api.txt \
> EXTRA_DIST += src/main.conf \
> src/eduroam.config
>
> +%.1 : %.1.in
> + sed -e 's|<SYSCONFDIR>|$(sysconfdir)|' \
> + -e 's|<STORAGEDIR>|$(storagedir)|' \
> + -e 's|<VPN_STORAGEDIR>|$(vpn_storagedir)|' $< > $@
> +
> +%.5 : %.5.in
> + sed -e 's|<SYSCONFDIR>|$(sysconfdir)|' \
> + -e 's|<STORAGEDIR>|$(storagedir)|' \
> + -e 's|<VPN_STORAGEDIR>|$(vpn_storagedir)|' $< > $@
> +
> +%.8 : %.8.in
> + sed -e 's|<SYSCONFDIR>|$(sysconfdir)|' \
> + -e 's|<STORAGEDIR>|$(storagedir)|' \
> + -e 's|<VPN_STORAGEDIR>|$(vpn_storagedir)|' $< > $@
> +
As this is a .in file, I'd rather like @sysconfdir@ etc. being used
since @variablename@ is the common syntax here. At the bottom of
Makefile.am, there is do_subst that does the same thing.
> dist_man_MANS = $(MANUAL_PAGES)
>
> pkgconfigdir = $(libdir)/pkgconfig
> @@ -471,4 +486,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 e1ee753..e932fe7 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 in /var/lib/connman/eduroam.config. Your university's exact
> +example be in <STORAGEDIR>/eduroam.config. Your university's exact
> settings might be different.
> .PP
> .nf
> @@ -139,7 +139,7 @@ CACertFile = /home/user/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 is /var/lib/connman/example.config.
> +and the file name is <STORAGEDIR>/example.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 615b4c4..71e958c 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 93%
> rename from doc/connman-vpn.8
> rename to doc/connman-vpn.8.in
> index 968ef50..dd7c69c 100644
> --- a/doc/connman-vpn.8
> +++ b/doc/connman-vpn.8.in
> @@ -39,8 +39,7 @@ Print ConnMan-VPN's available options and exit.
> .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
> +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 5216aa9..5e80793 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 95%
> rename from doc/connman.8
> rename to doc/connman.8.in
> index 3d065db..30ebec9 100644
> --- a/doc/connman.8
> +++ b/doc/connman.8.in
> @@ -49,8 +49,7 @@ Print ConnMan's available options and exit.
> .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
> +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 e6f5adb..6a123bf 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
Patrik
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman