man/Makefile
man/Makefile.in
scripts/shairport-sync.service
+scripts/shairport-sync.service-avahi
scripts/shairport-sync
shairport-sync.core
gitversion.h
getent group shairport-sync &>/dev/null || groupadd -r shairport-sync >/dev/null
getent passwd shairport-sync &> /dev/null || useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null
[ -e $(DESTDIR)$(systemdsystemunitdir) ] || mkdir -p $(DESTDIR)$(systemdsystemunitdir)
+if USE_AVAHI
+ [ -e $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service ] || cp scripts/shairport-sync.service-avahi $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service
+else
[ -e $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service ] || cp scripts/shairport-sync.service $(DESTDIR)$(systemdsystemunitdir)
endif
+endif
if INSTALL_FREEBSD_SERVICE
# Choose a uid and gid of 801 completely arbitrarity, except that it should be below 1000. FreeBSD doesn't seem to allow you to say "an ID in the range of..."
pw showgroup shairport-sync > /dev/null 2>&1 || pw addgroup -n shairport-sync -g 801 > /dev/null 2>&1
AC_DEFINE([CONFIG_AVAHI], 1, [Include Avahi-based mDNS support.])
AC_CHECK_LIB([avahi-client], [avahi_client_new], , AC_MSG_ERROR(Avahi support requires the avahi-client library!))
AC_CHECK_LIB([avahi-common],[avahi_strerror], , AC_MSG_ERROR(Avahi support requires the avahi-common library!))
+ AC_CONFIG_FILES([scripts/shairport-sync.service-avahi])
+else
+ AC_CONFIG_FILES([scripts/shairport-sync.service])
fi
AM_CONDITIONAL([USE_AVAHI], [test "x$with_avahi" = "xyes"])
AC_FUNC_FORK
AC_CHECK_FUNCS([atexit clock_gettime gethostname inet_ntoa memchr memmove memset mkfifo pow select socket stpcpy strcasecmp strchr strdup strerror strstr strtol strtoul])
-AC_CONFIG_FILES([Makefile man/Makefile scripts/shairport-sync.service])
+# Note -- there are AC_CONFIG_FILES directives further back, conditional on Avahi
+AC_CONFIG_FILES([Makefile man/Makefile])
AC_CONFIG_FILES([scripts/shairport-sync],[chmod +x scripts/shairport-sync])
AC_OUTPUT
--- /dev/null
+[Unit]
+Description=Shairport Sync - AirPlay Audio Receiver
+After=sound.target
+Requires=avahi-daemon.service
+After=avahi-daemon.service
+Wants=network-online.target
+After=network.target network-online.target
+
+[Service]
+ExecStart=@prefix@/bin/shairport-sync
+User=shairport-sync
+Group=shairport-sync
+
+[Install]
+WantedBy=multi-user.target
[Unit]
Description=Shairport Sync - AirPlay Audio Receiver
After=sound.target
-Requires=avahi-daemon.service
-After=avahi-daemon.service
Wants=network-online.target
After=network.target network-online.target