[28264] in Source-Commits

home help back first fref pref prev next nref lref last post

printing-config commit: Only transform settings.ini on Ubuntu

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Wed Jun 18 13:00:43 2014

Date: Wed, 18 Jun 2014 13:00:36 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201406181700.s5IH0a96025012@drugstore.mit.edu>
To: source-commits@MIT.EDU

https://github.com/mit-athena/printing-config/commit/e18bf9a8ad72ac8371ca4f0f567c5594e5f00215
commit e18bf9a8ad72ac8371ca4f0f567c5594e5f00215
Author: Jonathan Reed <jdreed@mit.edu>
Date:   Wed Jun 18 12:44:42 2014 -0400

    Only transform settings.ini on Ubuntu
    
    - Debian does not ship a settings.ini, so we can't transform it
      Instead, we ship our own for not-Ubuntu.

 debian/changelog    |    8 ++++++++
 debian/rules        |    9 +++++++++
 debian/settings.ini |    2 ++
 3 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 18c9154..cb36d0d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+debathena-printing-config (1.34.2) unstable; urgency=low
+
+  * Only transform the gtk 3.0 settings.ini file on Ubuntu, since it is
+    the only distribution that actually ships it.  On other distributions,
+    simply ship a new settings.ini file.
+
+ -- Jonathan Reed <jdreed@mit.edu>  Wed, 18 Jun 2014 12:44:10 -0400
+
 debathena-printing-config (1.34.1) unstable; urgency=low
 
   * Actually transform the gtk 3.0 settings.ini file, by ensuring there
diff --git a/debian/rules b/debian/rules
index 7812f55..9d1c15c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,8 +4,11 @@ DEB_PYTHON_SYSTEM = pysupport
 
 DEB_DIVERT_EXTENSION = .debathena
 
+# NOTE: This is the opposite of the test below
+ifeq (Ubuntu,$(shell lsb_release -si))
 DEB_TRANSFORM_FILES_debathena-printing-config += \
 	/etc/gtk-3.0/settings.ini.debathena
+endif
 
 DEB_DIVERT_FILES_debathena-printing-config += \
 	/usr/bin/lp.debathena \
@@ -28,6 +31,12 @@ include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/rules/config-package.mk
 include /usr/share/cdbs/1/class/python-distutils.mk
 
+# NOTE: This the opposite of the above test.
+ifneq (Ubuntu,$(shell lsb_release -si))
+install/debathena-printing-config::
+	dh_install debian/settings.ini etc/gtk-3.0
+endif
+
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
 common-build-arch common-build-indep:: $(addprefix python-check-stamp-, $(cdbs_python_build_versions))
 python-check-stamp-%: python-build-stamp-%
diff --git a/debian/settings.ini b/debian/settings.ini
new file mode 100644
index 0000000..93ba1fc
--- /dev/null
+++ b/debian/settings.ini
@@ -0,0 +1,2 @@
+[Settings]
+gtk-print-backends = file,cups,lpr

home help back first fref pref prev next nref lref last post