aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac8
-rw-r--r--data/Makefile.am21
-rw-r--r--data/indicator-printers.override1
-rw-r--r--data/indicator-printers.service.in8
-rw-r--r--debian/control2
5 files changed, 38 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 23ce342..67ac462 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,9 +52,13 @@ if test "x$CUPS_CONFIG" = "xno"; then
AC_MSG_ERROR([could not find cups-config])
fi
AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([could not find cups.h]))
-SERVICE_CFLAGS+=`$CUPS_CONFIG --cflags`
-SERVICE_LIBS+=`$CUPS_CONFIG --libs`
+CUPS_CFLAGS+=`$CUPS_CONFIG --cflags`
+CUPS_LIBS+=`$CUPS_CONFIG --libs`
+SERVICE_CFLAGS="$SERVICE_CFLAGS $CUPS_CFLAGS"
+SERVICE_LIBS="$SERVICE_LIBS $CUPS_LIBS"
+SYSTEMD_USERDIR=`$PKG_CONFIG --variable=systemduserunitdir systemd`
+AC_SUBST(SYSTEMD_USERDIR)
with_localinstall="no"
AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall],
diff --git a/data/Makefile.am b/data/Makefile.am
index 51ed2dd..c040edb 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -6,6 +6,27 @@ EXTRA_DIST=
SUBDIRS = upstart
#
+# the systemd unit file
+#
+
+systemddir = $(SYSTEMD_USERDIR)
+systemd_DATA = indicator-printers.service
+systemd_in = $(systemd_DATA:.service=.service.in)
+$(systemd_DATA): $(systemd_in)
+ $(AM_V_GEN) $(SED) -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@
+BUILT_SOURCES += $(systemd_DATA)
+EXTRA_DIST += $(systemd_in)
+CLEANFILES += $(systemd_DATA)
+
+#
+# the systemd upstart override
+#
+
+upstart_overridedir = $(datadir)/upstart/systemd-session/upstart
+upstart_override_DATA = indicator-printers.override
+EXTRA_DIST += $(upstart_override_DATA)
+
+#
# the upstart job file
#
diff --git a/data/indicator-printers.override b/data/indicator-printers.override
new file mode 100644
index 0000000..2905494
--- /dev/null
+++ b/data/indicator-printers.override
@@ -0,0 +1 @@
+manual
diff --git a/data/indicator-printers.service.in b/data/indicator-printers.service.in
new file mode 100644
index 0000000..4cbba6c
--- /dev/null
+++ b/data/indicator-printers.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Indicator Printers Service
+PartOf=graphical-session.target
+After=indicators-pre.target
+
+[Service]
+ExecStart=@pkglibexecdir@/indicator-printers-service
+Restart=on-failure
diff --git a/debian/control b/debian/control
index 62a0855..adc07f6 100644
--- a/debian/control
+++ b/debian/control
@@ -14,6 +14,7 @@ Build-Depends: debhelper (>= 9),
libdbusmenu-gtk3-dev (>= 0.5.90),
libindicator3-dev (>= 0.3.91),
libcups2-dev,
+ systemd,
Standards-Version: 3.9.2
Homepage: https://launchpad.net/indicator-printers
# If you aren't a member of ~indicator-applet-developers but need to upload
@@ -27,6 +28,7 @@ Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
cups (>= 1.5),
+ indicator-common,
Recommends: indicator-applet (>= 0.2) | indicator-renderer,
system-config-printer-gnome,
Description: indicator showing active print jobs