summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2014-12-17 15:50:08 -0400
committerJoey Hess <joeyh@joeyh.name>2014-12-17 15:50:08 -0400
commitaf43b5f484862bd846aaa17ad594bd8f4472c3c1 (patch)
tree4a8131beb80fd65e62ce7dd4334740b30c952229 /Makefile
parent14f9378d55af48e4622a9daa5d9c4632a9a2eafc (diff)
parent339d3bdcccd9f05996e5122194269e9b5ce44818 (diff)
Merge branch 'get_version' of https://github.com/anwa/etckeeper
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 5d19a3e..c95d51a 100644
--- a/Makefile
+++ b/Makefile
@@ -15,11 +15,11 @@ INSTALL_EXE=${INSTALL}
INSTALL_DATA=${INSTALL} -m 0644
PYTHON=python
-build: etckeeper.spec
+build: etckeeper.spec etckeeper.version
-$(PYTHON) ./etckeeper-bzr/__init__.py build || echo "** bzr support not built"
-$(PYTHON) ./etckeeper-dnf/etckeeper.py build || echo "** DNF support not built"
-install:
+install: etckeeper.version
mkdir -p $(DESTDIR)$(etcdir)/etckeeper/ $(DESTDIR)$(vardir)/cache/etckeeper/
$(CP) *.d $(DESTDIR)$(etcdir)/etckeeper/
$(INSTALL_DATA) $(CONFFILE) $(DESTDIR)$(etcdir)/etckeeper/etckeeper.conf
@@ -55,11 +55,15 @@ endif
-$(PYTHON) ./etckeeper-bzr/__init__.py install --root=$(DESTDIR) ${PYTHON_INSTALL_OPTS} || echo "** bzr support not installed"
echo "** installation successful"
-clean: etckeeper.spec
+clean: etckeeper.spec etckeeper.version
rm -rf build
etckeeper.spec:
sed -i~ "s/Version:.*/Version: $$(perl -e '$$_=<>;print m/\((.*?)\)/'<debian/changelog)/" etckeeper.spec
rm -f etckeeper.spec~
-.PHONY: etckeeper.spec
+etckeeper.version:
+ sed -i~ "s/Version:.*/Version: $$(perl -e '$$_=<>;print m/\((.*?)\)/'<debian/changelog)\"/" etckeeper
+ rm -f etckeeper~
+
+.PHONY: etckeeper.spec etckeeper.version