From c003f3825e5217cd3ef8272f4e8ebe47270a7847 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Wed, 27 Jun 2018 01:10:16 +0200 Subject: [PATCH] Distribute a minimal opensc.conf closes https://github.com/OpenSC/OpenSC/issues/1102 --- .gitignore | 3 +-- etc/Makefile.am | 23 ++++++++----------- etc/opensc.conf | 7 ++++++ ...{opensc.conf.in => opensc.conf.example.in} | 0 4 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 etc/opensc.conf rename etc/{opensc.conf.in => opensc.conf.example.in} (100%) diff --git a/.gitignore b/.gitignore index 8d91981e..dfe8ea4f 100644 --- a/.gitignore +++ b/.gitignore @@ -82,8 +82,7 @@ doc/tools/opensc-asn1 doc/tools/opensc-notify doc/files/opensc.conf.5.xml -etc/opensc.conf.win -etc/opensc.conf +etc/opensc.conf.example src/common/compat_getopt_main src/minidriver/opensc-minidriver.inf src/tools/cardos-tool diff --git a/etc/Makefile.am b/etc/Makefile.am index 6a0bb3d9..3add83b2 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -1,20 +1,21 @@ CV_CERTS = DESRCACC100001 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in -DISTCLEANFILES = opensc.conf +DISTCLEANFILES = opensc.conf.example EXTRA_DIST = $(CV_CERTS) Makefile.mak SUFFIXES = .in -dist_noinst_DATA = opensc.conf.in -nodist_noinst_DATA = opensc.conf +dist_noinst_DATA = opensc.conf.example.in +nodist_noinst_DATA = opensc.conf.example +dist_sysconf_DATA = opensc.conf # Make sure we build this every time # as there is no dependency for this. # Can be removed if MSVC is not requried. force: -opensc.conf: opensc.conf.in force +opensc.conf.example: opensc.conf.example.in force .in: @sed \ @@ -30,16 +31,12 @@ opensc.conf: opensc.conf.in force -e 's|@PROFILE_DIR_DEFAULT[@]|$(PROFILE_DIR_DEFAULT)|g' \ < $< > $@ -install-exec-hook: opensc.conf - $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" - if [ -f "$(DESTDIR)$(sysconfdir)/opensc.conf" ]; then \ - $(INSTALL_DATA) opensc.conf "$(DESTDIR)$(sysconfdir)/opensc.conf.new"; \ - else \ - $(INSTALL_DATA) opensc.conf "$(DESTDIR)$(sysconfdir)/opensc.conf"; \ - fi +install-exec-hook: opensc.conf.example + $(MKDIR_P) "$(DESTDIR)$(docdir)" + $(INSTALL_DATA) opensc.conf.example "$(DESTDIR)$(docdir)/opensc.conf"; -uninstall-hook: opensc.conf - rm -f "$(DESTDIR)$(sysconfdir)/opensc.conf.new" "$(DESTDIR)$(sysconfdir)/opensc.conf" +uninstall-hook: opensc.conf.example + rm -f "$(DESTDIR)$(docdir)/opensc.conf" if ENABLE_OPENPACE install-data-local: diff --git a/etc/opensc.conf b/etc/opensc.conf new file mode 100644 index 00000000..eab9b44c --- /dev/null +++ b/etc/opensc.conf @@ -0,0 +1,7 @@ +app default { + # debug = 3; + # debug_file = opensc-debug.txt + framework pkcs15 { + # use_file_caching = true; + } +} diff --git a/etc/opensc.conf.in b/etc/opensc.conf.example.in similarity index 100% rename from etc/opensc.conf.in rename to etc/opensc.conf.example.in