diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2011-09-30 08:37:36 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-30 08:37:36 +0200 |
commit | 83f6498aac5f3d62611d392c8a35f1b1fcf1e75a (patch) | |
tree | dfbd9d5669e2df93e06eaf9c3c191bc717ec7e93 | |
parent | 525a791987c66ed2f8b1ca9e5357836f536fdb8b (diff) | |
download | mpd-83f6498aac5f3d62611d392c8a35f1b1fcf1e75a.tar.gz mpd-83f6498aac5f3d62611d392c8a35f1b1fcf1e75a.tar.xz mpd-83f6498aac5f3d62611d392c8a35f1b1fcf1e75a.zip |
Install systemd service file if systemd is available
Diffstat (limited to '')
-rw-r--r-- | Makefile.am | 9 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | mpd.service.in | 9 |
4 files changed, 27 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 478614406..45dd631af 100644 --- a/Makefile.am +++ b/Makefile.am @@ -803,6 +803,15 @@ FILTER_SRC = \ # +# systemd unit +# + +if HAVE_SYSTEMD +systemdsystemunit_DATA = \ + mpd.service +endif + +# # Sparse code analysis # # sparse is a semantic parser @@ -11,6 +11,7 @@ ver 0.16.5 (2010/??/??) - ffmpeg: don't require key frame for seeking - fix CUE track seeking * WIN32: close sockets properly +* install systemd service file if systemd is available ver 0.16.4 (2011/09/01) diff --git a/configure.ac b/configure.ac index 020f15d35..1c1a4b91f 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,13 @@ fi AC_PROG_INSTALL AC_PROG_MAKE_SET PKG_PROG_PKG_CONFIG +AC_ARG_WITH([systemdsystemunitdir], + AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), + [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) +if test "x$with_systemdsystemunitdir" != xno; then + AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) +fi +AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ]) dnl --------------------------------------------------------------------------- dnl Declare Variables @@ -1592,5 +1599,6 @@ dnl --------------------------------------------------------------------------- dnl Generate files dnl --------------------------------------------------------------------------- AC_OUTPUT(Makefile) +AC_OUTPUT(mpd.service) echo 'MPD is ready for compilation, type "make" to begin.' diff --git a/mpd.service.in b/mpd.service.in new file mode 100644 index 000000000..9e9282fa6 --- /dev/null +++ b/mpd.service.in @@ -0,0 +1,9 @@ +[Unit] +Description=Music Player Daemon +After=sound.target + +[Service] +ExecStart=@prefix@/bin/mpd --no-daemon + +[Install] +WantedBy=multi-user.target |