summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--[l---------]Makefile48
1 files changed, 47 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4ecdba5..fbde21c 120000..100644
--- a/Makefile
+++ b/Makefile
@@ -1 +1,47 @@
-build-aux/Makefile.README.mk \ No newline at end of file
+# Copyright 2016 Luke Shumaker
+# This work is free. You can redistribute it and/or modify it under the
+# terms of the Do What The Fuck You Want To Public License, Version 2,
+# as published by Sam Hocevar. See the COPYING file for more details.
+
+topsrcdir = .
+topoutdir = .
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+# The core of pristine-etc-keeper
+std.sys_files += /etc/etckeeper/pristine/drain
+std.sys_files += /etc/etckeeper/pristine/fill
+std.sys_files += /var/lib/pristine-etc/chroot.lock
+std.sys_files += /var/lib/pristine-etc/spool.lock
+
+$(DESTDIR)/etc/etckeeper/pristine/%: $(srcdir)/%
+ install -Dm755 $< $@
+$(DESTDIR)/var/lib/pristine-etc/%.lock:
+ mkdir -p $(@D)
+ touch $@
+
+# Convenience symlinks in bindir
+std.sys_files += /usr/bin/pristine-etc-keeper
+
+$(DESTDIR)/usr/bin/pristine-etc-keeper: $(DESTDIR)/etc/etckeeper/pristine/fill
+ mkdir -p $(@D)
+ ln -srfT $< $@
+
+# pacman integration
+std.sys_files += /usr/share/libalpm/hooks/zz-pristine-etc-keeper-post-install.hook
+
+$(DESTDIR)/usr/share/libalpm/hooks/%.hook: %.hook
+ install -Dm644 $< $@
+
+# systemd integration
+std.sys_files += /usr/lib/systemd/system/pristine-etc-keeper.service
+
+$(DESTDIR)/usr/lib/systemd/system/%: $(srcdir)/%
+ install -Dm644 $< $@
+
+# Documentation
+std.sys_files += /usr/share/doc/pristine-etc-keeper/README.md
+
+$(DESTDIR)/usr/share/doc/pristine-etc-keeper/%: %
+ install -Dm644 $< $@
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk