[pkg-bacula-commits] [bacula] 01/01: don't install systemd related files on non-linux ports

Carsten Leonhardt leo at moszumanska.debian.org
Tue Aug 4 10:15:09 UTC 2015


This is an automated email from the git hooks/post-receive script.

leo pushed a commit to branch master
in repository bacula.

commit 9b8ab4bacc86fc73b346debb4a4338587a1f482b
Author: Carsten Leonhardt <leo at debian.org>
Date:   Tue Aug 4 12:14:49 2015 +0200

    don't install systemd related files on non-linux ports
---
 debian/bacula-common.install |  1 -
 debian/changelog             |  1 +
 debian/rules                 | 14 ++++++++++++--
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/debian/bacula-common.install b/debian/bacula-common.install
index 24b8add..f25581d 100644
--- a/debian/bacula-common.install
+++ b/debian/bacula-common.install
@@ -12,4 +12,3 @@ etc/bacula/bconsole.conf	usr/share/bacula-common/defconfig
 etc/bacula/bacula-sd.conf	usr/share/bacula-common/defconfig
 etc/bacula/bacula-fd.conf	usr/share/bacula-common/defconfig
 etc/bacula/bacula-dir.conf	usr/share/bacula-common/defconfig
-platforms/systemd/bacula.conf	usr/lib/tmpfiles.d
diff --git a/debian/changelog b/debian/changelog
index c4cadd3..06f8f44 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,7 @@ bacula (7.0.5+dfsg-1) unstable; urgency=medium
     (Closes: #714161, #718641)
   * debian/patches/add-basic-kfreebsd-support.patch:
     + better support for GNU/kFreeBSD ("onefs=no" works) (upstream 2156)
+  * don't install systemd related files on non-linux ports
 
  --
 
diff --git a/debian/rules b/debian/rules
index 8a09c1e..777fa1d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -46,14 +46,20 @@ CONF_ALL	= \
 	--with-subsys-dir=/var/lock \
 	--with-dump-email=root \
 	--with-job-email=root \
-	--with-systemd=/lib/systemd/system \
 	--with-mysql --with-postgresql --with-sqlite3 \
 	--enable-bat --with-x
 
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+CONF_ALL	+= --with-systemd=/lib/systemd/system
+endif
+
 ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
 CONF_ALL	+= --disable-acl --disable-xattr
 endif
 
+#set to 1 if configured with systemd
+HAVE_SYSTEMD = $(findstring 1,$(shell egrep "^\#define HAVE_SYSTEMD" config.log))
+
 LONGNAME_mysql		= mysql
 LONGNAME_pgsql		= postgresql
 LONGNAME_sqlite3	= sqlite3
@@ -128,7 +134,11 @@ override_dh_install:
 		-e "s/XX_DBLONGNAME_XX/$(LONGNAME_$(db))/" \
 		debian/bacula-director-$(db)/etc/bacula/scripts/make_catalog_backup \
 		debian/bacula-director-$(db)/etc/bacula/scripts/make_catalog_backup.pl;)
-
+	$(info HAVE_SYSTEMD=$(HAVE_SYSTEMD))
+ifeq ($(HAVE_SYSTEMD),1)
+	# only install systemd related files if systemd is enabled during build
+	install -m 644 platforms/systemd/bacula.conf -D debian/bacula-common/usr/lib/tmpfiles.d/bacula.conf
+endif
 
 override_dh_installdocs:
 	dh_installdocs -pbacula --link-doc=bacula-common

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bacula/bacula.git



More information about the pkg-bacula-commits mailing list