summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--debian/control4
-rwxr-xr-xdebian/rules1
-rwxr-xr-xetckeeper-bzr/__init__.py (renamed from etckeeper-bzr.py)8
4 files changed, 10 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 930dc7b..aac2f1e 100644
--- a/Makefile
+++ b/Makefile
@@ -27,3 +27,4 @@ endif
ifeq ($(LOWLEVEL_PACKAGE_MANAGER),pacman-g2)
$(INSTALL_DATA) pacman-g2.hook $(DESTDIR)$(etcdir)/pacman-g2/hooks/etckeeper
endif
+ -./etckeeper-bzr/__init__.py install --root=$(DESTDIR)
diff --git a/debian/control b/debian/control
index af675b6..df3e58c 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,7 @@
Source: etckeeper
Section: admin
Priority: optional
-Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.9.0)
+Build-Depends: debhelper (>= 5), dpkg-dev (>= 1.9.0), bzr (>= 1.4~), python-support (>= 0.5.3)
Maintainer: Joey Hess <joeyh@debian.org>
Standards-Version: 3.7.3
Vcs-Git: git://git.kitenet.net/etckeeper
@@ -10,7 +10,7 @@ Homepage: http://kitenet.net/~joey/code/etckeeper/
Package: etckeeper
Architecture: all
Section: admin
-Depends: git-core (>= 1:1.5.4) | mercurial | bzr (>= 1.0), ${misc:Depends}
+Depends: git-core (>= 1:1.5.4) | mercurial | bzr (>= 1.4~), ${misc:Depends}
Description: store /etc in git, mercurial, or bzr
The etckeeper program is a tool to let /etc be stored in a git, mercurial,
or bzr repository. It hooks into APT to automatically commit changes made to
diff --git a/debian/rules b/debian/rules
index eb737a5..28e3c1b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,6 +15,7 @@ binary-indep: build
dh_testroot
dh_clean -k
$(MAKE) install DESTDIR=debian/etckeeper
+ dh_pysupport
dh_installdocs README TODO
dh_installexamples
dh_installchangelogs
diff --git a/etckeeper-bzr.py b/etckeeper-bzr/__init__.py
index 97a8689..a5381c5 100755
--- a/etckeeper-bzr.py
+++ b/etckeeper-bzr/__init__.py
@@ -3,11 +3,15 @@
"""Runs etckeeper pre-commit when necessary."""
+import bzrlib
from bzrlib.mutabletree import MutableTree
from bzrlib.errors import BzrError, NotLocalUrl
import os
import subprocess
+if bzrlib.version_info[:2] < (1,4):
+ raise "Version of Bazaar to old. Need at least 1.4."
+
def etckeeper_startcommit_hook(tree):
if not os.path.exists(tree.abspath(".etckeeper")):
# Only run the commit hook when this is an etckeeper branch
@@ -22,5 +26,5 @@ MutableTree.hooks.name_hook(etckeeper_startcommit_hook, "etckeeper")
if __name__ == "__main__":
from distutils.core import setup
setup(name="bzr-etckeeper",
- package_dir={"bzrlib.plugins.etckeeper":__file__},
- py_modules=["bzrlib.plugins.etckeeper"])
+ packages=["bzrlib.plugins.etckeeper"],
+ package_dir={"bzrlib.plugins.etckeeper":"etckeeper-bzr"})