diff options
-rw-r--r-- | debian/control | 3 | ||||
-rw-r--r-- | debian/cups-daemon.install | 3 | ||||
-rwxr-xr-x | debian/rules | 33 |
3 files changed, 24 insertions, 15 deletions
diff --git a/debian/control b/debian/control index a658c47e..cd8c5ba2 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,8 @@ Uploaders: Build-Depends: debhelper (>= 9~), dh-apparmor [linux-any], - dh-systemd, + dh-systemd [linux-any], + dh-smf (>= 5) [illumos-any], dpkg-dev (>= 1.16.1~), patch, autoconf, diff --git a/debian/cups-daemon.install b/debian/cups-daemon.install index d2aa054a..d76d3113 100644 --- a/debian/cups-daemon.install +++ b/debian/cups-daemon.install @@ -18,6 +18,3 @@ usr/share/man/man5/mime.types.5.gz usr/share/man/man5/printers.conf.5.gz usr/share/man/man7/backend.7.gz usr/share/man/man8/cupsd.8.gz -lib/systemd/system/cups.socket -lib/systemd/system/cups.path -lib/systemd/system/cups.service diff --git a/debian/rules b/debian/rules index 7a3b7aae..e00cf161 100755 --- a/debian/rules +++ b/debian/rules @@ -16,20 +16,26 @@ export DSOFLAGS = $(shell dpkg-buildflags --get LDFLAGS) DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) -%: - dh $@ --with systemd -CONFIG_LIBUSB=--enable-libusb APPARMOR := no -ifeq ($(DEB_HOST_ARCH_OS),hurd) -CONFIG_LIBUSB=--disable-libusb -endif -ifeq ($(DEB_HOST_ARCH_OS),illumos) -CONFIG_LIBUSB=--disable-libusb +CONFIG_LIBUSB := --enable-libusb +DH_WITH := +ifeq (linux,$(DEB_HOST_ARCH_OS)) +DH_WITH += systemd +CONFIG_SYSTEMD := --with-systemdsystemunitdir=/lib/systemd/system endif -ifeq ($(DEB_HOST_ARCH_OS),linux) +ifeq (illumos,$(DEB_HOST_ARCH_OS)) +DH_WITH += smf +CONFIG_SMF := --with-smfmanifestdir=/lib/svc/manifest/applications +CONFIG_LIBUSB := --disable-libusb APPARMOR := yes endif +ifeq ($(DEB_HOST_ARCH_OS),hurd) +CONFIG_LIBUSB := --disable-libusb +endif + +%: + dh $@ $(DH_WITH:%=--with %) override_dh_auto_configure: ifeq ($(derives_from_ubuntu),yes) @@ -64,8 +70,7 @@ endif --with-printcap=/var/run/cups/printcap \ --with-log-file-perm=0640 \ --with-local_protocols='dnssd' \ - --with-systemdsystemunitdir=/lib/systemd/system \ - $(CONFIG_LIBUSB) + $(CONFIG_SMF) $(CONFIG_SYSTEMD) $(CONFIG_LIBUSB) override_dh_auto_install: dh_auto_install -- install BUILDROOT=$(shell pwd)/debian/tmp @@ -82,6 +87,12 @@ ifeq ($(derives_from_ubuntu),yes) cp debian/local/*.upstart debian endif dh_install +ifneq (,$(CONFIG_SYSTEMD)) + dh_install -pcups-daemon lib/systemd +endif +ifneq (,$(CONFIG_SMF)) + dh_install -pcups-daemon lib/svc +endif ifneq (,$(filter cups-server-common,$(shell dh_listpackages))) # Remove all files which get replaced by the ones in the cups-filters |