aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2014-11-13 11:13:20 +1300
committerTom Ryder <tom@sanctum.geek.nz>2014-11-13 11:13:20 +1300
commit91633c46338ddac59e2e4f1ad7f44870d471fce5 (patch)
treece3c1342c9ee870672f16f35bd23915b7e0a8c6a /Makefile
parentDon't use Pathogen if Vim is ancient (diff)
downloaddotfiles-91633c46338ddac59e2e4f1ad7f44870d471fce5.tar.gz
dotfiles-91633c46338ddac59e2e4f1ad7f44870d471fce5.zip
Generate gpg.conf from m4 template on make call
We have to do this because gpg.conf doesn't understand tilde or environment variable expansion in the configuration file, and the only reliable way to make the ca-cert-file option work between different implementations of gpg(1) and its cURL link is to explicitly specify the path to the CA file. This is probably a better approach than installing the thing as a trusted system CA anyway, which requires root privileges that I don't really want to assume anyone installing this has. I'm also including the CA, CRL, and .pem for the SKS keyservers in this commit. This seems a lesser evil than trying to pull them with cURL or wget at make(1) time.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 22 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 9855f46b..3524a6a0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,8 @@
-.PHONY: install \
+.PHONY: all \
+ clean \
+ distclean \
+ gnupg \
+ install \
install-bash \
install-bin \
install-curl \
@@ -30,14 +34,22 @@
test-bash \
test-bin \
test-sh \
- test-urxvt \
- usage
+ test-urxvt
-usage :
- @echo "tejr/dotfiles: Nothing to do."
+all : gnupg
@echo "Run make -n install, and read the output carefully."
@echo "If you're happy with what it'll do, then run make install."
+clean :
+ rm -f gnupg/gpg.conf
+
+distclean : clean
+
+gnupg : gnupg/gpg.conf
+
+gnupg/gpg.conf :
+ m4 -D DOTFILES_HOME="$(HOME)" gnupg/gpg.conf.m4 > gnupg/gpg.conf
+
install : install-bash \
install-curl \
install-dircolors \
@@ -74,9 +86,12 @@ install-dircolors :
install-git :
install -m 0644 -- git/gitconfig "$(HOME)"/.gitconfig
-install-gnupg :
- install -m 0700 -d -- "$(HOME)"/.gnupg
+install-gnupg : gnupg/gpg.conf
+ install -m 0700 -d -- \
+ "$(HOME)"/.gnupg \
+ "$(HOME)"/.gnupg/sks-keyservers.net
install -m 0600 -- gnupg/*.conf "$(HOME)"/.gnupg
+ install -m 0644 -- gnupg/sks-keyservers.net/* "$(HOME)"/.gnupg/sks-keyservers.net
install-i3 : install-x
install -m 0755 -d -- "$(HOME)"/.i3