doc/examples: install bankd_pcsc_slots.csv
Related: SYS#5187
Change-Id: Iba0b98729ae2a830e05d1b337b33259dcae25d15
diff --git a/configure.ac b/configure.ac
index 8592dd4..400578b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -199,6 +199,7 @@
contrib/systemd/Makefile
contrib/osmo-remsim.spec
doc/Makefile
+ doc/examples/Makefile
doc/manuals/Makefile
src/Makefile
src/rspro/Makefile
diff --git a/contrib/osmo-remsim.spec.in b/contrib/osmo-remsim.spec.in
index e11e93f..6d44b82 100644
--- a/contrib/osmo-remsim.spec.in
+++ b/contrib/osmo-remsim.spec.in
@@ -194,6 +194,7 @@
%{_bindir}/osmo-remsim-bankd
%{_unitdir}/osmo-remsim-bankd.service
%config(noreplace) %{_sysconfdir}/default/osmo-remsim-bankd
+%config(noreplace) %{_sysconfdir}/osmocom/bankd_pcsc_slots.csv
%files -n osmo-remsim-client-shell
%{_bindir}/osmo-remsim-client-shell
diff --git a/debian/osmo-remsim-bankd.install b/debian/osmo-remsim-bankd.install
index 4e1d6a5..a4afa70 100644
--- a/debian/osmo-remsim-bankd.install
+++ b/debian/osmo-remsim-bankd.install
@@ -1,3 +1,4 @@
usr/bin/osmo-remsim-bankd
lib/systemd/system/osmo-remsim-bankd.service
etc/default/osmo-remsim-bankd
+etc/osmocom/bankd_pcsc_slots.csv
diff --git a/doc/Makefile.am b/doc/Makefile.am
index dd4a573..f561ed8 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,4 +1,5 @@
SUBDIRS = \
+ examples \
manuals \
$(NULL)
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
new file mode 100644
index 0000000..4a8fcbd
--- /dev/null
+++ b/doc/examples/Makefile.am
@@ -0,0 +1,29 @@
+OSMOCONF_FILES = \
+ bankd_pcsc_slots.csv \
+ $(NULL)
+
+osmoconfdir = $(sysconfdir)/osmocom
+osmoconf_DATA = $(OSMOCONF_FILES)
+
+EXTRA_DIST = $(OSMOCONF_FILES)
+
+CFG_FILES = find $(srcdir) -name '*.cfg*' -o -name '*.csv' | sed -e 's,^$(srcdir),,'
+
+dist-hook:
+ for f in $$($(CFG_FILES)); do \
+ j="$(distdir)/$$f" && \
+ $(INSTALL_DATA) -D $(srcdir)/$$f $$j; \
+ done
+
+install-data-hook:
+ for f in $$($(CFG_FILES)); do \
+ j="$(DESTDIR)$(docdir)/examples/$$f" && \
+ $(INSTALL_DATA) -D $(srcdir)/$$f $$j; \
+ done
+
+uninstall-hook:
+ @$(PRE_UNINSTALL)
+ for f in $$($(CFG_FILES)); do \
+ j="$(DESTDIR)$(docdir)/examples/$$f" && \
+ $(RM) $$j; \
+ done