[pacman-dev] [PATCH 3/6] Update Makefile.am and configure.ac for gpgdir

Pang Yan Han pangyanhan at gmail.com
Sat May 28 10:37:33 EDT 2011


install-data-local target in Makefile.am will now create the default GPGDir,
trustdb.gpg, pubring.gpg if they do not exist.

configure script will now output the default gpgdir with the other info
(eg. database dir, cachedir, etc)

Signed-off-by: Pang Yan Han <pangyanhan at gmail.com>
---
 Makefile.am  |    7 +++++--
 configure.ac |    1 +
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 259a455..edae191 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,10 +24,13 @@ check-local: test/pacman test/util src/pacman src/util
 	$(SH) $(top_srcdir)/test/util/vercmptest.sh \
 		$(top_builddir)/src/util/vercmp
 
-# create the pacman DB and cache directories upon install
+# create the pacman DB, cache and GPG directories, trustdb.gpg, pubring.gpg upon install
 install-data-local:
-	for dir in "$(DESTDIR)$(localstatedir)/lib/pacman" "$(DESTDIR)$(localstatedir)/cache/pacman/pkg"; do \
+	for dir in "$(DESTDIR)$(localstatedir)/lib/pacman" "$(DESTDIR)$(localstatedir)/cache/pacman/pkg" "$(DESTDIR)$(sysconfdir)/pacman.d/gnupg"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
+	for f in "$(DESTDIR)$(sysconfdir)/pacman.d/gnupg/pubring.gpg" "$(DESTDIR)$(sysconfdir)/pacman.d/gnupg/trustdb.gpg"; do \
+		test -e "$$f" || touch "$$f"; \
+	done
 
 # vim:set ts=2 sw=2 noet:
diff --git a/configure.ac b/configure.ac
index 02f9f40..6422f57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -394,6 +394,7 @@ ${PACKAGE_NAME}:
     prefix                 : ${prefix}
     sysconfdir             : $(eval echo ${sysconfdir})
        conf file           : $(eval echo ${sysconfdir})/pacman.conf
+       gpg dir             : $(eval echo ${sysconfdir})/pacman.d/gnupg/
     localstatedir          : $(eval echo ${localstatedir})
        database dir        : $(eval echo ${localstatedir})/lib/pacman/
        cache dir           : $(eval echo ${localstatedir})/cache/pacman/pkg/
-- 
1.7.5.rc0.101.g3d23c



More information about the pacman-dev mailing list