aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-10-31 11:05:00 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-11-01 12:52:22 +0100
commit45283d84e357a8a898fe0c5f91f30b729039279d (patch)
tree1567d25746d0de45bfb8d53ce1b9f788e36021ef
parentb29f84ff6cd4ef6a384af4fe625d4c372a34d938 (diff)
Install cfg files with autotools
Cfg files are moved to doc/examples like in other osmocom projects. All the cfg files get installed into $prefix/share/doc/osmo-pcap/examples/$subdir/, and 1 script per binary is installed into /etc/osmocom. Change-Id: If3f3a7d3867c0d4d2b1fe01f465532d1ce4bda66
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac2
-rw-r--r--contrib/Makefile.am1
-rw-r--r--debian/osmo-pcap-client.install3
-rw-r--r--debian/osmo-pcap-server.install3
-rwxr-xr-xdebian/rules11
-rw-r--r--doc/Makefile.am1
-rw-r--r--doc/examples/Makefile.am30
-rw-r--r--doc/examples/osmo-pcap-client/osmo-pcap-client-tls.cfg (renamed from contrib/osmo-pcap-client-tls.cfg)0
-rw-r--r--doc/examples/osmo-pcap-client/osmo-pcap-client.cfg (renamed from contrib/osmo-pcap-client.cfg)0
-rw-r--r--doc/examples/osmo-pcap-server/osmo-pcap-server-tls.cfg (renamed from contrib/osmo-pcap-server-tls.cfg)0
-rw-r--r--doc/examples/osmo-pcap-server/osmo-pcap-server.cfg (renamed from contrib/osmo-pcap-server.cfg)0
12 files changed, 40 insertions, 13 deletions
diff --git a/Makefile.am b/Makefile.am
index 0f4a249..1dd1ff4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
-SUBDIRS = include src contrib tests
+SUBDIRS = include src contrib doc tests
BUILT_SOURCES = $(top_srcdir)/.version
EXTRA_DIST = git-version-gen .version
diff --git a/configure.ac b/configure.ac
index f885e6d..95c5270 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,5 +145,7 @@ AC_OUTPUT(
src/Makefile
contrib/Makefile
contrib/systemd/Makefile
+ doc/Makefile
+ doc/examples/Makefile
tests/Makefile
Makefile)
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 7bd8c23..e1927a7 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -1,3 +1,2 @@
SUBDIRS = systemd
dist_pkgdata_DATA = osmo_pcap_clean_old
-EXTRA_DIST = osmo-pcap-server.cfg osmo-pcap-client.cfg
diff --git a/debian/osmo-pcap-client.install b/debian/osmo-pcap-client.install
index ac7c65c..ef6576e 100644
--- a/debian/osmo-pcap-client.install
+++ b/debian/osmo-pcap-client.install
@@ -1,2 +1,5 @@
+etc/osmocom/osmo-pcap-client.cfg
lib/systemd/system/osmo-pcap-client.service
usr/bin/osmo-pcap-client
+usr/share/doc/osmo-pcap/examples/osmo-pcap-client/osmo-pcap-client.cfg
+usr/share/doc/osmo-pcap/examples/osmo-pcap-client/osmo-pcap-client-tls.cfg
diff --git a/debian/osmo-pcap-server.install b/debian/osmo-pcap-server.install
index 6ba698e..cedee92 100644
--- a/debian/osmo-pcap-server.install
+++ b/debian/osmo-pcap-server.install
@@ -1,2 +1,5 @@
+etc/osmocom/osmo-pcap-server.cfg
lib/systemd/system/osmo-pcap-server.service
usr/bin/osmo-pcap-server
+usr/share/doc/osmo-pcap/examples/osmo-pcap-server/osmo-pcap-server.cfg
+usr/share/doc/osmo-pcap/examples/osmo-pcap-server/osmo-pcap-server-tls.cfg
diff --git a/debian/rules b/debian/rules
index a9a8b30..90bd79e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,17 +21,6 @@ override_dh_auto_configure:
PCAP_CFLAGS=$(PCAP_CFLAGS) \
PCAP_LIBS=$(PCAP_LIBS)
-override_dh_auto_install:
- dh_auto_install $@
- install -d -m 0755 $(CURDIR)/debian/osmo-pcap-client/etc/osmo-pcap/
- install -m 0644 $(CURDIR)/contrib/osmo-pcap-client.cfg $(CURDIR)/debian/osmo-pcap-client/etc/osmo-pcap
-
- install -d -m 0755 $(CURDIR)/debian/osmo-pcap-server/etc/osmo-pcap/
- install -m 0644 $(CURDIR)/contrib/osmo-pcap-server.cfg $(CURDIR)/debian/osmo-pcap-server/etc/osmo-pcap
-
- install -d -m 0755 $(CURDIR)/debian/osmo-pcap-server/etc/cron.daily/
- install -m 0755 $(CURDIR)/contrib/osmo_pcap_clean_old $(CURDIR)/debian/osmo-pcap-server/etc/cron.daily/
-
override_dh_strip:
dh_strip -posmo-pcap-client --dbg-package=osmo-pcap-client-dbg
dh_strip -posmo-pcap-server --dbg-package=osmo-pcap-server-dbg
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..aee2d7b
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = examples
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
new file mode 100644
index 0000000..9337c9e
--- /dev/null
+++ b/doc/examples/Makefile.am
@@ -0,0 +1,30 @@
+OSMOCONF_FILES = \
+ osmo-pcap-client/osmo-pcap-client.cfg \
+ osmo-pcap-server/osmo-pcap-server.cfg
+
+osmoconfdir = $(sysconfdir)/osmocom
+osmoconf_DATA = $(OSMOCONF_FILES)
+EXTRA_DIST = $(OSMOCONF_FILES)
+
+CFG_FILES = find $(srcdir) -type f -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/contrib/osmo-pcap-client-tls.cfg b/doc/examples/osmo-pcap-client/osmo-pcap-client-tls.cfg
index 73d1535..73d1535 100644
--- a/contrib/osmo-pcap-client-tls.cfg
+++ b/doc/examples/osmo-pcap-client/osmo-pcap-client-tls.cfg
diff --git a/contrib/osmo-pcap-client.cfg b/doc/examples/osmo-pcap-client/osmo-pcap-client.cfg
index 829ae5d..829ae5d 100644
--- a/contrib/osmo-pcap-client.cfg
+++ b/doc/examples/osmo-pcap-client/osmo-pcap-client.cfg
diff --git a/contrib/osmo-pcap-server-tls.cfg b/doc/examples/osmo-pcap-server/osmo-pcap-server-tls.cfg
index 52f66f5..52f66f5 100644
--- a/contrib/osmo-pcap-server-tls.cfg
+++ b/doc/examples/osmo-pcap-server/osmo-pcap-server-tls.cfg
diff --git a/contrib/osmo-pcap-server.cfg b/doc/examples/osmo-pcap-server/osmo-pcap-server.cfg
index 2f4123a..2f4123a 100644
--- a/contrib/osmo-pcap-server.cfg
+++ b/doc/examples/osmo-pcap-server/osmo-pcap-server.cfg