summaryrefslogtreecommitdiffstats
path: root/avahi-daemon/Makefile.am
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-06-27 01:36:25 +0200
committerLennart Poettering <lennart@poettering.net>2010-06-27 01:36:25 +0200
commited11c6a4d4da379ff9ebccb7a0340e64232efabb (patch)
tree8fa5cea77c6a149f0efdc8536913ebcc28571da2 /avahi-daemon/Makefile.am
parent5b0187292d95c991c37efeeaf36fac9628dae5dc (diff)
build-sys: install systemd service files
Diffstat (limited to 'avahi-daemon/Makefile.am')
-rw-r--r--avahi-daemon/Makefile.am23
1 files changed, 22 insertions, 1 deletions
diff --git a/avahi-daemon/Makefile.am b/avahi-daemon/Makefile.am
index 04843fb..b5d2bf4 100644
--- a/avahi-daemon/Makefile.am
+++ b/avahi-daemon/Makefile.am
@@ -26,6 +26,7 @@ if HAVE_XML
pkgsysconfdir=$(sysconfdir)/avahi
servicedir=$(pkgsysconfdir)/services
introspectiondir=$(datadir)/dbus-1/interfaces
+dbussystemservicesdir=$(datadir)/dbus-1/system-services
AM_CFLAGS+= \
-DAVAHI_DAEMON_RUNTIME_DIR=\"$(avahi_runtime_dir)/avahi-daemon/\" \
@@ -75,6 +76,24 @@ dist_service_DATA = \
dist_pkgdata_DATA = \
avahi-service.dtd
+%.service: %.service.in
+ $(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+
+%.socket: %.socket.in
+ $(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' \
+ -e 's,@avahi_runtime_dir\@,$(avahi_runtime_dir),g' $< > $@
+
+if HAVE_SYSTEMD
+systemdsystemunit_DATA = \
+ avahi-daemon.service \
+ avahi-daemon.socket
+
+dist_dbussystemservices_DATA = \
+ org.freedesktop.Avahi.service
+endif
+
+CLEANFILES = $(systemdsystemunit_DATA)
+
if ENABLE_CHROOT
avahi_daemon_SOURCES += \
@@ -139,7 +158,9 @@ EXTRA_DIST = \
hosts \
example.service \
introspect.dtd \
- introspect.xsl
+ introspect.xsl \
+ avahi-daemon.service.in \
+ avahi-daemon.socket.in
xmllint:
xmllint --noout --valid example.service