From 45283d84e357a8a898fe0c5f91f30b729039279d Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Wed, 31 Oct 2018 11:05:00 +0100 Subject: 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 --- Makefile.am | 2 +- configure.ac | 2 ++ contrib/Makefile.am | 1 - contrib/osmo-pcap-client-tls.cfg | 16 ------------ contrib/osmo-pcap-client.cfg | 14 ---------- contrib/osmo-pcap-server-tls.cfg | 27 ------------------- contrib/osmo-pcap-server.cfg | 22 ---------------- debian/osmo-pcap-client.install | 3 +++ debian/osmo-pcap-server.install | 3 +++ debian/rules | 11 -------- doc/Makefile.am | 1 + doc/examples/Makefile.am | 30 ++++++++++++++++++++++ .../osmo-pcap-client/osmo-pcap-client-tls.cfg | 16 ++++++++++++ doc/examples/osmo-pcap-client/osmo-pcap-client.cfg | 14 ++++++++++ .../osmo-pcap-server/osmo-pcap-server-tls.cfg | 27 +++++++++++++++++++ doc/examples/osmo-pcap-server/osmo-pcap-server.cfg | 22 ++++++++++++++++ 16 files changed, 119 insertions(+), 92 deletions(-) delete mode 100644 contrib/osmo-pcap-client-tls.cfg delete mode 100644 contrib/osmo-pcap-client.cfg delete mode 100644 contrib/osmo-pcap-server-tls.cfg delete mode 100644 contrib/osmo-pcap-server.cfg create mode 100644 doc/Makefile.am create mode 100644 doc/examples/Makefile.am create mode 100644 doc/examples/osmo-pcap-client/osmo-pcap-client-tls.cfg create mode 100644 doc/examples/osmo-pcap-client/osmo-pcap-client.cfg create mode 100644 doc/examples/osmo-pcap-server/osmo-pcap-server-tls.cfg create mode 100644 doc/examples/osmo-pcap-server/osmo-pcap-server.cfg 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/contrib/osmo-pcap-client-tls.cfg b/contrib/osmo-pcap-client-tls.cfg deleted file mode 100644 index 73d1535..0000000 --- a/contrib/osmo-pcap-client-tls.cfg +++ /dev/null @@ -1,16 +0,0 @@ -! -! OsmoPCAPClient (UNKNOWN-dirty) configuration saved from vty -!! -! -! -line vty - no login -! -client - pcap device any - pcap filter host www.google.com - pcap detect-loop 0 - server ip 127.0.0.1 - server port 6001 - enable tls - tls priority NORMAL diff --git a/contrib/osmo-pcap-client.cfg b/contrib/osmo-pcap-client.cfg deleted file mode 100644 index 829ae5d..0000000 --- a/contrib/osmo-pcap-client.cfg +++ /dev/null @@ -1,14 +0,0 @@ -! -! OsmoPCAPClient (UNKNOWN-dirty) configuration saved from vty -!! -! -! -line vty - no login -! -client - pcap device any - pcap filter host www.google.com - pcap detect-loop 0 - server ip 127.0.0.1 - server port 6001 diff --git a/contrib/osmo-pcap-server-tls.cfg b/contrib/osmo-pcap-server-tls.cfg deleted file mode 100644 index 52f66f5..0000000 --- a/contrib/osmo-pcap-server-tls.cfg +++ /dev/null @@ -1,27 +0,0 @@ -! -! OsmoPCAPServer (UNKNOWN) configuration saved from vty -!! -! -log stderr - logging color 1 - logging timestamp 0 - logging level all everything - logging level pcap notice - logging level client notice - logging level server notice - logging level vty notice -! -line vty - no login -! -server - base-path /tmp - server ip 127.0.0.1 - server port 6001 - max-file-size 262144000 - client zecke1 127.0.0.1 - client zecke2 127.0.0.1 store tls - client zecke3 127.0.0.2 no-store tls - client zecke4 127.0.0.3 no-store - enable tls - tls priority SECURE diff --git a/contrib/osmo-pcap-server.cfg b/contrib/osmo-pcap-server.cfg deleted file mode 100644 index 2f4123a..0000000 --- a/contrib/osmo-pcap-server.cfg +++ /dev/null @@ -1,22 +0,0 @@ -! -! OsmoPCAPServer (UNKNOWN) configuration saved from vty -!! -! -log stderr - logging color 1 - logging timestamp 0 - logging level all everything - logging level pcap notice - logging level client notice - logging level server notice - logging level vty notice -! -line vty - no login -! -server - base-path /tmp - server ip 127.0.0.1 - server port 6001 - max-file-size 262144000 - client zecke 127.0.0.1 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/doc/examples/osmo-pcap-client/osmo-pcap-client-tls.cfg b/doc/examples/osmo-pcap-client/osmo-pcap-client-tls.cfg new file mode 100644 index 0000000..73d1535 --- /dev/null +++ b/doc/examples/osmo-pcap-client/osmo-pcap-client-tls.cfg @@ -0,0 +1,16 @@ +! +! OsmoPCAPClient (UNKNOWN-dirty) configuration saved from vty +!! +! +! +line vty + no login +! +client + pcap device any + pcap filter host www.google.com + pcap detect-loop 0 + server ip 127.0.0.1 + server port 6001 + enable tls + tls priority NORMAL diff --git a/doc/examples/osmo-pcap-client/osmo-pcap-client.cfg b/doc/examples/osmo-pcap-client/osmo-pcap-client.cfg new file mode 100644 index 0000000..829ae5d --- /dev/null +++ b/doc/examples/osmo-pcap-client/osmo-pcap-client.cfg @@ -0,0 +1,14 @@ +! +! OsmoPCAPClient (UNKNOWN-dirty) configuration saved from vty +!! +! +! +line vty + no login +! +client + pcap device any + pcap filter host www.google.com + pcap detect-loop 0 + server ip 127.0.0.1 + server port 6001 diff --git a/doc/examples/osmo-pcap-server/osmo-pcap-server-tls.cfg b/doc/examples/osmo-pcap-server/osmo-pcap-server-tls.cfg new file mode 100644 index 0000000..52f66f5 --- /dev/null +++ b/doc/examples/osmo-pcap-server/osmo-pcap-server-tls.cfg @@ -0,0 +1,27 @@ +! +! OsmoPCAPServer (UNKNOWN) configuration saved from vty +!! +! +log stderr + logging color 1 + logging timestamp 0 + logging level all everything + logging level pcap notice + logging level client notice + logging level server notice + logging level vty notice +! +line vty + no login +! +server + base-path /tmp + server ip 127.0.0.1 + server port 6001 + max-file-size 262144000 + client zecke1 127.0.0.1 + client zecke2 127.0.0.1 store tls + client zecke3 127.0.0.2 no-store tls + client zecke4 127.0.0.3 no-store + enable tls + tls priority SECURE diff --git a/doc/examples/osmo-pcap-server/osmo-pcap-server.cfg b/doc/examples/osmo-pcap-server/osmo-pcap-server.cfg new file mode 100644 index 0000000..2f4123a --- /dev/null +++ b/doc/examples/osmo-pcap-server/osmo-pcap-server.cfg @@ -0,0 +1,22 @@ +! +! OsmoPCAPServer (UNKNOWN) configuration saved from vty +!! +! +log stderr + logging color 1 + logging timestamp 0 + logging level all everything + logging level pcap notice + logging level client notice + logging level server notice + logging level vty notice +! +line vty + no login +! +server + base-path /tmp + server ip 127.0.0.1 + server port 6001 + max-file-size 262144000 + client zecke 127.0.0.1 -- cgit v1.2.3