[PATCH] openggsn[master]: Move examples to doc/examples and include them in DIST

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Sep 5 20:29:22 UTC 2017


Move examples to doc/examples and include them in DIST

Change-Id: I0846e21ac63774939934ab629c6d7212269be9a6
---
M configure.ac
R contrib/osmo-ggsn.init
M debian/osmo-ggsn.examples
M doc/Makefile.am
A doc/examples/Makefile.am
R doc/examples/firewall
R doc/examples/osmo-ggsn.cfg
R doc/examples/sgsnemu.conf
8 files changed, 28 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openggsn refs/changes/53/3853/2

diff --git a/configure.ac b/configure.ac
index c19eedc..19548d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,6 +137,7 @@
 
 AC_CONFIG_FILES([Makefile
                  doc/Makefile
+                 doc/examples/Makefile
                  ggsn/Makefile
                  gtp/Makefile
                  lib/Makefile
diff --git a/examples/osmo-ggsn.init b/contrib/osmo-ggsn.init
similarity index 100%
rename from examples/osmo-ggsn.init
rename to contrib/osmo-ggsn.init
diff --git a/debian/osmo-ggsn.examples b/debian/osmo-ggsn.examples
index 3898d26..775b9cd 100644
--- a/debian/osmo-ggsn.examples
+++ b/debian/osmo-ggsn.examples
@@ -1,2 +1,2 @@
-examples/osmo-ggsn.conf
-examples/sgsnemu.conf
+doc/examples/osmo-ggsn.conf
+doc/examples/sgsnemu.conf
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 7e2246c..46c634e 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2,5 +2,6 @@
 man_aux = $(man_MANS:.1=.x)
 EXTRA_DIST = $(man_MANS)
 
-
-
+SUBDIRS = \
+	examples \
+	$(NULL)
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
new file mode 100644
index 0000000..530c3fa
--- /dev/null
+++ b/doc/examples/Makefile.am
@@ -0,0 +1,22 @@
+CFG_FILES = find $(srcdir) -name '*.cfg*' | sed -e 's,^$(srcdir),,'
+
+dist-hook:
+	for f in $$($(CFG_FILES)); do \
+		j="$(distdir)/$$f" && \
+		mkdir -p "$$(dirname $$j)" && \
+		$(INSTALL_DATA) $(srcdir)/$$f $$j; \
+	done
+
+install-data-hook:
+	for f in $$($(CFG_FILES)); do \
+		j="$(DESTDIR)$(docdir)/examples/$$f" && \
+		mkdir -p "$$(dirname $$j)" && \
+		$(INSTALL_DATA) $(srcdir)/$$f $$j; \
+	done
+
+uninstall-hook:
+	@$(PRE_UNINSTALL)
+	for f in $$($(CFG_FILES)); do \
+		j="$(DESTDIR)$(docdir)/examples/$$f" && \
+		$(RM) $$j; \
+	done
diff --git a/examples/firewall b/doc/examples/firewall
similarity index 100%
rename from examples/firewall
rename to doc/examples/firewall
diff --git a/examples/osmo-ggsn.cfg b/doc/examples/osmo-ggsn.cfg
similarity index 100%
rename from examples/osmo-ggsn.cfg
rename to doc/examples/osmo-ggsn.cfg
diff --git a/examples/sgsnemu.conf b/doc/examples/sgsnemu.conf
similarity index 100%
rename from examples/sgsnemu.conf
rename to doc/examples/sgsnemu.conf

-- 
To view, visit https://gerrit.osmocom.org/3853
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0846e21ac63774939934ab629c6d7212269be9a6
Gerrit-PatchSet: 2
Gerrit-Project: openggsn
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list