public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] dev/mrueg:master commit in: media-sound/mopidy/, media-sound/mopidy/files/
@ 2015-07-02 13:41 Manuel Rüger
  0 siblings, 0 replies; only message in thread
From: Manuel Rüger @ 2015-07-02 13:41 UTC (permalink / raw
  To: gentoo-commits

commit:     36373359ecce4a3ec54dd5338e578e3267b828f0
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  2 13:40:52 2015 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Thu Jul  2 13:40:52 2015 +0000
URL:        https://gitweb.gentoo.org/dev/mrueg.git/commit/?id=36373359

[media-sound/mopidy] Install init script, systemd unit file and mopidyctl

Package-Manager: portage-2.2.20

 media-sound/mopidy/files/mopidy.initd              | 24 ++++++++++++++++++++++
 ...{mopidy-1.0.7.ebuild => mopidy-1.0.7-r1.ebuild} | 15 ++++++++++++--
 2 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/media-sound/mopidy/files/mopidy.initd b/media-sound/mopidy/files/mopidy.initd
new file mode 100644
index 0000000..bf6cc10
--- /dev/null
+++ b/media-sound/mopidy/files/mopidy.initd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+PIDFILE=/run/mopidy.pid
+
+start() {
+    ebegin "Starting mopidy"
+        start-stop-daemon --start --quiet --background \
+        --user mopidy \
+        --pidfile ${PIDFILE} --make-pidfile \
+        --exec /usr/bin/mopidy \
+        --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf\
+        -- --foreground
+    eend $?
+}
+
+stop() {
+    ebegin "Stopping mopidy"
+        start-stop-daemon --stop --quiet \
+        --pidfile ${PIDFILE}
+    eend $?
+}

diff --git a/media-sound/mopidy/mopidy-1.0.7.ebuild b/media-sound/mopidy/mopidy-1.0.7-r1.ebuild
similarity index 76%
rename from media-sound/mopidy/mopidy-1.0.7.ebuild
rename to media-sound/mopidy/mopidy-1.0.7-r1.ebuild
index c1090bf..90b730c 100644
--- a/media-sound/mopidy/mopidy-1.0.7.ebuild
+++ b/media-sound/mopidy/mopidy-1.0.7-r1.ebuild
@@ -5,7 +5,7 @@
 EAPI=5
 PYTHON_COMPAT=(python2_7)
 
-inherit eutils distutils-r1
+inherit eutils systemd distutils-r1
 
 DESCRIPTION="An extensible music server that plays music from local disk and more"
 HOMEPAGE="http://mopidy.com https://github.com/mopidy/mopidy"
@@ -30,10 +30,21 @@ DEPEND="test? ( ${RDEPEND}
 
 S=${WORKDIR}/Mopidy-${PV}
 
+pkg_setup() {
+	enewuser mopidy -1 -1 "/etc/mopidy" mopidy
+	enewgroup mopidy
+	distutils-r1_pkg_setup
+}
+
 src_install() {
 	distutils-r1_src_install
-	domenu extra/desktop/mopidy.desktop || die
 
+	dobin extra/mopidyctl/mopidyctl
+	doman extra/mopidyctl/mopidyctl.8
+
+	newinitd "${FILESDIR}"/${PN}.initd ${PN}
+	systemd_dounit extra/systemd/mopidy.service
+	domenu extra/desktop/mopidy.desktop || die
 }
 
 python_test() {


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-02 13:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-02 13:41 [gentoo-commits] dev/mrueg:master commit in: media-sound/mopidy/, media-sound/mopidy/files/ Manuel Rüger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox