repo: ngircd
action: commit
revision: 
path_from: 
revision_from: 30b6e72b96e8092f3a0884b1a02eb403b8a4b12c:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit 30b6e72b96e8092f3a0884b1a02eb403b8a4b12c
Author: Alexander Barton 
Date:   Wed Nov 3 23:47:21 2010 +0100

    Fix up generation and distribution of sample-ngircd.conf

    - Add generated sample-ngircd.conf to new .gitignore file,
    - refactor Makefile.am to generate sample-ngircd.conf on "make all",
      to clean it up on "make clean", and to install it to the correct place.
    - Make sure path names in sample-ngircd.conf are separated by "/".

diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..0035855c90e6f21dee2a6fb55c9009c5d8873b22
--- /dev/null
+++ b/doc/.gitignore
@@ -0,0 +1 @@
+sample-ngircd.conf
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 51fab0ee09621213ebc5b8b0cfd3535be7987381..
index ..4b20e701ea8eda5e104f657808910dba12a2e408 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -17,27 +17,39 @@

 SUFFIXES = .tmpl

+static_docs = FAQ.txt GIT.txt Protocol.txt Platforms.txt README-AUX.txt \
+	README-BeOS.txt RFC.txt Services.txt SSL.txt Zeroconf.txt \
+	HowToRelease.txt
+
+doc_templates = sample-ngircd.conf.tmpl
+
+generated_docs = sample-ngircd.conf
+
+toplevel_docs = ../AUTHORS ../COPYING ../ChangeLog ../INSTALL ../NEWS ../README
+
 SUBDIRS = src

-EXTRA_DIST = FAQ.txt GIT.txt Protocol.txt Platforms.txt README-AUX.txt \
-	README-BeOS.txt RFC.txt Services.txt SSL.txt Zeroconf.txt \
-	HowToRelease.txt sample-ngircd.conf
+EXTRA_DIST = $(static_docs) $(doc_templates)
+
+CLEANFILES = $(generated_docs)

 maintainer-clean-local:
 	rm -f Makefile Makefile.in

-documents = $(EXTRA_DIST) ../AUTHORS ../COPYING ../ChangeLog ../INSTALL \
-	../NEWS ../README
+all: $(generated_docs)

-install-data-hook: $(documents)
+install-data-hook: $(static_docs) $(toplevel_docs) $(generated_docs)
 	$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
 	if [ ! -f $(DESTDIR)$(sysconfdir)/ngircd.conf ]; then \
-	  $(INSTALL) -m 600 -c $(srcdir)/sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; \
+	  $(INSTALL) -m 600 -c sample-ngircd.conf $(DESTDIR)$(sysconfdir)/ngircd.conf; \
 	 fi
 	$(mkinstalldirs) $(DESTDIR)$(docdir)
-	for f in $(documents); do \
+	for f in $(static_docs) $(toplevel_docs); do \
 	  $(INSTALL) -m 644 -c $(srcdir)/$$f $(DESTDIR)$(docdir)/; \
 	 done
+	for f in $(generated_docs); do \
+	  $(INSTALL) -m 644 -c $$f $(DESTDIR)$(docdir)/; \
+	 done

 uninstall-hook:
 	rm -rf $(DESTDIR)$(docdir)
diff --git a/doc/sample-ngircd.conf.tmpl b/doc/sample-ngircd.conf.tmpl
index c6dde60da6ac48db669bd0fe7219eb22de5d1dca..
index ..12b688d23d06ecabcc88494091ad3a4761c5ecc9 100644
--- a/doc/sample-ngircd.conf.tmpl
+++ b/doc/sample-ngircd.conf.tmpl
@@ -51,16 +51,16 @@
 	;SSLPorts = 6697, 9999

 	# SSL Server Key
-	;SSLKeyFile = :ETCDIR:ssl/server-key.pem
+	;SSLKeyFile = :ETCDIR:/ssl/server-key.pem

 	# password to decrypt SSLKeyFile (OpenSSL only)
 	;SSLKeyFilePassword = secret

 	# SSL Server Key Certificate
-	;SSLCertFile = :ETCDIR:ssl/server-cert.pem
+	;SSLCertFile = :ETCDIR:/ssl/server-cert.pem

 	# Diffie-Hellman parameters
-	;SSLDHFile = :ETCDIR:ssl/dhparams.pem
+	;SSLDHFile = :ETCDIR:/ssl/dhparams.pem

 	# comma separated list of IP addresses on which the server should
 	# listen. Default values are:
@@ -77,7 +77,7 @@

 	# Text file with the "message of the day" (MOTD). This message will
 	# be shown to all users connecting to the server:
-	;MotdFile = :ETCDIR:ngircd.motd
+	;MotdFile = :ETCDIR:/ngircd.motd

 	# A simple Phrase (<256 chars) if you don't want to use a motd file.
 	;MotdPhrase = "Hello world!"
@@ -270,7 +270,7 @@

 	# Key file, syntax for each line: "::".
 	# Default: none.
-	;KeyFile = :ETCDIR:#chan.key
+	;KeyFile = :ETCDIR:/#chan.key

 	# maximum users per channel (mode l)
 	;MaxUsers = 23

-----END OF PAGE-----