Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/mrueg:master commit in: media-sound/mopidy/, media-sound/mopidy/files/
Date: Thu, 02 Jul 2015 13:41:12
Message-Id: 1435844452.36373359ecce4a3ec54dd5338e578e3267b828f0.mrueg@gentoo
1 commit: 36373359ecce4a3ec54dd5338e578e3267b828f0
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 2 13:40:52 2015 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 2 13:40:52 2015 +0000
6 URL: https://gitweb.gentoo.org/dev/mrueg.git/commit/?id=36373359
7
8 [media-sound/mopidy] Install init script, systemd unit file and mopidyctl
9
10 Package-Manager: portage-2.2.20
11
12 media-sound/mopidy/files/mopidy.initd | 24 ++++++++++++++++++++++
13 ...{mopidy-1.0.7.ebuild => mopidy-1.0.7-r1.ebuild} | 15 ++++++++++++--
14 2 files changed, 37 insertions(+), 2 deletions(-)
15
16 diff --git a/media-sound/mopidy/files/mopidy.initd b/media-sound/mopidy/files/mopidy.initd
17 new file mode 100644
18 index 0000000..bf6cc10
19 --- /dev/null
20 +++ b/media-sound/mopidy/files/mopidy.initd
21 @@ -0,0 +1,24 @@
22 +#!/sbin/runscript
23 +# Copyright 1999-2015 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +# $Header: $
26 +
27 +PIDFILE=/run/mopidy.pid
28 +
29 +start() {
30 + ebegin "Starting mopidy"
31 + start-stop-daemon --start --quiet --background \
32 + --user mopidy \
33 + --pidfile ${PIDFILE} --make-pidfile \
34 + --exec /usr/bin/mopidy \
35 + --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf\
36 + -- --foreground
37 + eend $?
38 +}
39 +
40 +stop() {
41 + ebegin "Stopping mopidy"
42 + start-stop-daemon --stop --quiet \
43 + --pidfile ${PIDFILE}
44 + eend $?
45 +}
46
47 diff --git a/media-sound/mopidy/mopidy-1.0.7.ebuild b/media-sound/mopidy/mopidy-1.0.7-r1.ebuild
48 similarity index 76%
49 rename from media-sound/mopidy/mopidy-1.0.7.ebuild
50 rename to media-sound/mopidy/mopidy-1.0.7-r1.ebuild
51 index c1090bf..90b730c 100644
52 --- a/media-sound/mopidy/mopidy-1.0.7.ebuild
53 +++ b/media-sound/mopidy/mopidy-1.0.7-r1.ebuild
54 @@ -5,7 +5,7 @@
55 EAPI=5
56 PYTHON_COMPAT=(python2_7)
57
58 -inherit eutils distutils-r1
59 +inherit eutils systemd distutils-r1
60
61 DESCRIPTION="An extensible music server that plays music from local disk and more"
62 HOMEPAGE="http://mopidy.com https://github.com/mopidy/mopidy"
63 @@ -30,10 +30,21 @@ DEPEND="test? ( ${RDEPEND}
64
65 S=${WORKDIR}/Mopidy-${PV}
66
67 +pkg_setup() {
68 + enewuser mopidy -1 -1 "/etc/mopidy" mopidy
69 + enewgroup mopidy
70 + distutils-r1_pkg_setup
71 +}
72 +
73 src_install() {
74 distutils-r1_src_install
75 - domenu extra/desktop/mopidy.desktop || die
76
77 + dobin extra/mopidyctl/mopidyctl
78 + doman extra/mopidyctl/mopidyctl.8
79 +
80 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
81 + systemd_dounit extra/systemd/mopidy.service
82 + domenu extra/desktop/mopidy.desktop || die
83 }
84
85 python_test() {