[pkg-bacula-commits] [bacula] 02/04: Enable systemd integration
Sven Hartge
hartge-guest at moszumanska.debian.org
Tue Jul 12 19:47:48 UTC 2016
This is an automated email from the git hooks/post-receive script.
hartge-guest pushed a commit to branch master-systemd
in repository bacula.
commit 5f8228360541cb09228baa1d8b43e4699005cc50
Author: Sven Hartge <sven at svenhartge.de>
Date: Tue Jul 12 21:23:01 2016 +0200
Enable systemd integration
debian/control: Add a build-dependency on "dh-systemd (>= 1.5) [linux-any]".
This is strictly speaking no longer neccessary since
debhelper-9.20160709 integrates dh_systemd_enable and
dh_systemd_start but it helps backporting to Debian Jessie.
After the release of Stretch the dependecy of debhelper
should be raised to debhelper (>= 9.20160709) and the explicit
dh-systemd one removed.
debian/rules: Reenable all the bits checking for Linux and systemd to
only enable the support on Linux systems and use the SysV-init
system on kFreeBSD.
---
debian/control | 1 +
debian/rules | 24 ++++++++++++++----------
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/debian/control b/debian/control
index 4b7e71b..05080e4 100644
--- a/debian/control
+++ b/debian/control
@@ -8,6 +8,7 @@ Build-Depends:
autotools-dev,
bc,
debhelper (>= 9),
+ dh-systemd (>= 1.5) [linux-any],
libacl1-dev,
libcap-dev [linux-any],
libgnome2-dev,
diff --git a/debian/rules b/debian/rules
index 1081be6..5816fc4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -49,16 +49,16 @@ CONF_ALL = \
--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),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))
+HAVE_SYSTEMD = $(findstring 1,$(shell egrep "^\#define HAVE_SYSTEMD" config.log))
LONGNAME_mysql = mysql
LONGNAME_pgsql = postgresql
@@ -93,7 +93,11 @@ $(foreach template,$(wildcard debian/*-db.*.in),$(call template-cleanup,$(templa
endef
%:
+ifeq ($(HAVE_SYSTEMD),1)
+ dh $@ --with autotools_dev,systemd --parallel
+else
dh $@ --with autotools_dev --parallel
+endif
override_dh_shlibdeps:
# Handle shlibs for the database packages specially so they get
@@ -131,12 +135,12 @@ override_dh_install-arch:
-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;)
-#ifeq ($(HAVE_SYSTEMD),1)
-# # only install systemd related files if systemd is enabled during build
-# install -m 644 platforms/systemd/bacula-fd.service -D debian/bacula-fd/lib/systemd/system/bacula-fd.service
-# install -m 644 platforms/systemd/bacula-sd.service -D debian/bacula-sd/lib/systemd/system/bacula-sd.service
-# install -m 644 platforms/systemd/bacula-dir.service -D debian/bacula-director-common/lib/systemd/system/bacula-director.service
-#endif
+ifeq ($(HAVE_SYSTEMD),1)
+ # only install systemd related files if systemd is enabled during build
+ install -m 644 platforms/systemd/bacula-fd.service -D debian/bacula-fd/lib/systemd/system/bacula-fd.service
+ install -m 644 platforms/systemd/bacula-sd.service -D debian/bacula-sd/lib/systemd/system/bacula-sd.service
+ install -m 644 platforms/systemd/bacula-dir.service -D debian/bacula-director-common/lib/systemd/system/bacula-director.service
+endif
override_dh_installdocs:
dh_installdocs -pbacula --link-doc=bacula-server
--
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