aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorTommi Virtanen <tv@eagain.net>2007-09-03 18:30:16 -0700
committerTommi Virtanen <tv@eagain.net>2007-09-03 18:30:16 -0700
commitf9158dca1ec1eeab2ec4048e961b48036148ca64 (patch)
tree64ab38b9c621974dae182e4f7cea74ad0d2a05ad /debian
parentMake debian package version match setup.py (diff)
downloadgitosis-dakkar-f9158dca1ec1eeab2ec4048e961b48036148ca64.tar.gz
gitosis-dakkar-f9158dca1ec1eeab2ec4048e961b48036148ca64.tar.bz2
gitosis-dakkar-f9158dca1ec1eeab2ec4048e961b48036148ca64.zip
Add a simple "./debian/rules generate" to build debian/control.
This is ugly and annoying but alternatives are storing generated files in version control, or manually maintaining pesky little details. The control file will be part of the .diff.gz.
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules24
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
index 28b3be2..507190c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,31 @@
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
+ifeq ($(wildcard debian/control),)
+ifeq ($(DEB_AUTO_UPDATE_DEBIAN_CONTROL),)
+advice_about_control := yes
+endif
+endif
+
+ifeq ($(advice_about_control),yes)
+advice-on-debian-control %::
+ @echo "It seems you are building from pristine source and"
+ @echo "debian/control is missing. It will be autogenerated"
+ @echo "if you say:"
+ @echo
+ @echo " ./debian/rules generate"
+ @echo
+ @exit 1
+else
+
DEB_PYTHON_SYSTEM := pysupport
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk
+endif
+
+
+generate::
+# I wish this was atomic
+ cp debian/control.in debian/control
+ fakeroot env DEB_AUTO_UPDATE_DEBIAN_CONTROL=1 ./debian/rules clean