summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2010-01-29 18:08:16 +0000
committerMichał Górny <mgorny@gentoo.org>2010-01-29 18:08:16 +0000
commitaa8ff3a582abefd2935b2be69487af91170bf45b (patch)
tree96994e5d8104fde37f693594f441350511792110
parentLicenses not referenced by any package. (diff)
downloadsunrise-aa8ff3a582abefd2935b2be69487af91170bf45b.tar.gz
sunrise-aa8ff3a582abefd2935b2be69487af91170bf45b.tar.bz2
sunrise-aa8ff3a582abefd2935b2be69487af91170bf45b.zip
media-sound/davemp: Cleanup, fixes and new init.d script. Changing LICENSE to match gentoo-x86 name. Dropping mpd RDEPEND as it can be used with remote mpd.
svn path=/sunrise/; revision=9926
-rw-r--r--media-sound/davemp/ChangeLog9
-rw-r--r--media-sound/davemp/Manifest8
-rw-r--r--media-sound/davemp/davemp-1.23-r1.ebuild44
-rw-r--r--media-sound/davemp/davemp-1.23.ebuild40
-rw-r--r--media-sound/davemp/files/davemp18
-rw-r--r--media-sound/davemp/files/davemp-1.23-json-fix.diff14
-rw-r--r--media-sound/davemp/files/davemp-1.23-run-in-foreground.diff14
7 files changed, 97 insertions, 50 deletions
diff --git a/media-sound/davemp/ChangeLog b/media-sound/davemp/ChangeLog
index e30767726..b3b3add84 100644
--- a/media-sound/davemp/ChangeLog
+++ b/media-sound/davemp/ChangeLog
@@ -1,7 +1,14 @@
# ChangeLog for media-sound/davemp
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 29 Jan 2010; Michał Górny (sedzimir) <gentoo@mgorny.alt.pl>
+ -davemp-1.23.ebuild, +davemp-1.23-r1.ebuild,
+ +files/davemp-1.23-json-fix.diff,
+ +files/davemp-1.23-run-in-foreground.diff, files/davemp:
+ Cleanup, fixes and new init.d script. Changing LICENSE to match gentoo-x86
+ name. Dropping mpd RDEPEND as it can be used with remote mpd.
+
29 Jun 2008; Thomas Sachau (Tommy[D]) <tommy@gentoo.org>
davemp-1.23.ebuild:
Add IUSE
diff --git a/media-sound/davemp/Manifest b/media-sound/davemp/Manifest
index 9f97cf900..34e730e47 100644
--- a/media-sound/davemp/Manifest
+++ b/media-sound/davemp/Manifest
@@ -1,5 +1,7 @@
-AUX davemp 199 RMD160 d240d4ca7c69e35596f561e1ecbbc95de09c08b4 SHA1 364e7ca6c5461cda331296a73ea96d45c148a189 SHA256 2de7e27e204b5af67305275fd92d78f5f5d8470ef1751ae54e1af87752969924
+AUX davemp 463 RMD160 82b18da7d74f004d4b3331bdf0d52156b95a6312 SHA1 7bde8f79e97c8a30526ec1734b49cea443f6d319 SHA256 75e3e4f0466fa5095a8134c0faf05e40e996a933f987983872f88dfdb3993001
+AUX davemp-1.23-json-fix.diff 710 RMD160 babe297330f8ff237ca2b03863f7720b54fefc83 SHA1 a611891fc31ce0b06b98b1529fc0e2655299b4f0 SHA256 909b095f628a5d489fcb6d9f0bc48273f8d3a35bfb3e2611ed6db0c0bdde16dd
+AUX davemp-1.23-run-in-foreground.diff 475 RMD160 1b26e6dd6db8db8cb0c7f31b1394f9c2e3aed4c7 SHA1 4a6befc65e2154d627d17d59533cae3ccf92c74a SHA256 496c1769a41651e9d0909e29709f716c16e8bd5f4e7ec836a7d0a08ddf44422c
DIST davemp-1.23.tar.gz 134675 RMD160 656e8074dac08affb887e8762396ddb23a5705c9 SHA1 68b0a0e2ae0117cdf4504a48ddfe6d54e94b8a19 SHA256 94bfdc062fe636e16724d8da3ade618354486a135e0b6dbda243d73da710a54a
-EBUILD davemp-1.23.ebuild 983 RMD160 27b3c5ac6e8715839d579da7e8be17d46109350c SHA1 6c60b43cc7fe0d028c64a12dc09a89126eddf8ed SHA256 a34ff5262cb5a0daedc136ed14ada7d8170f931901cd646981df44d293274f41
-MISC ChangeLog 997 RMD160 be4adbe8cdaf0a7f5f8d9a8a0acd91b6de031de9 SHA1 bb1cbd8a5ff4bd1399c7209b23bd22ed0c2b87e7 SHA256 e0ab49aca975144f86ca2d4a7c4c27be5911a3aaca0eb198c6db7db3de73c929
+EBUILD davemp-1.23-r1.ebuild 1100 RMD160 4f7067ee937ece152aafe1f11e5ad32e9a8fb802 SHA1 dc5fd49f8df5e0f46c8cfdead360a5fae5388cd4 SHA256 f83bf0653d1679e7d50291e871a680b5755bb1d3de2af491f095eb769eca0d26
+MISC ChangeLog 1345 RMD160 e3cd7bc66151ab3d145b8f68c43f792c416d1b3e SHA1 13736805ded76fe647b23c99cc35c33b6bdf9302 SHA256 6790524273db729c48eadaf2ec2eefd8301e4f209495b62bed8db6a7fd3b938e
MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42
diff --git a/media-sound/davemp/davemp-1.23-r1.ebuild b/media-sound/davemp/davemp-1.23-r1.ebuild
new file mode 100644
index 000000000..a4d9b3f0b
--- /dev/null
+++ b/media-sound/davemp/davemp-1.23-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=2
+
+inherit eutils multilib
+
+DESCRIPTION="Lightweight low-dependency web interface to mpd"
+HOMEPAGE="http://ion0.com/davemp/"
+SRC_URI="http://ion0.com/davemp/downloads/files/${P}.tar.gz"
+
+LICENSE="CCPL-Attribution-ShareAlike-NonCommercial-2.5"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-perl/JSON-XS
+ dev-perl/HTTP-Server-Simple
+ dev-perl/Class-Accessor"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-run-in-foreground.diff
+ epatch "${FILESDIR}"/${P}-json-fix.diff
+ sed -i -e 's@themeroot = ./themes@themeroot=/usr/share/davemp/themes@' davemp.conf || die
+ sed -i -e "s@use lib './lib'@use lib '/usr/$(get_libdir)/davemp/'@" davempd.pl || die
+}
+
+src_install() {
+ dobin davempd.pl || die
+ doinitd "${FILESDIR}"/davemp || die
+ dodoc README Changelog || die
+
+ insinto /usr/share/${PN}
+ doins -r themes || die
+ insinto /usr/$(get_libdir)/${PN}
+ doins -r lib/* || die
+ insinto /etc
+ doins davemp.conf || die
+}
+
+pkg_postinst() {
+ enewuser mpd "" "" "/var/lib/mpd" audio
+}
diff --git a/media-sound/davemp/davemp-1.23.ebuild b/media-sound/davemp/davemp-1.23.ebuild
deleted file mode 100644
index 432312bb4..000000000
--- a/media-sound/davemp/davemp-1.23.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-inherit eutils multilib
-
-DESCRIPTION="lightweight low-dependency web interface to mpd"
-HOMEPAGE="http://ion0.com/davemp/"
-SRC_URI="http://ion0.com/davemp/downloads/files/${P}.tar.gz"
-
-LICENSE="CCPL-Attribution-NonCommercial-ShareAlike-2.5"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="dev-perl/JSON-XS
- dev-perl/HTTP-Server-Simple
- dev-perl/Class-Accessor
- media-sound/mpd"
-
-RDEPEND="${DEPEND}"
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- sed -i -e 's@themeroot = ./themes@themeroot=/usr/share/davemp/themes@' davemp.conf || die "sed failed"
- sed -i -e "s@use lib './lib'@use lib '/usr/$(get_libdir)/davemp/'@" davempd.pl || die "sed failed"
-}
-
-src_install() {
- doinitd "${FILESDIR}"/davemp
- insinto /usr/share/${PN}
- doins -r themes
- insinto /usr/$(get_libdir)/${PN}
- doins -r lib/*
- insinto /etc
- doins davemp.conf
- dobin davempd.pl
- dodoc README Changelog
-}
diff --git a/media-sound/davemp/files/davemp b/media-sound/davemp/files/davemp
index 9ded7872e..764b0d96a 100644
--- a/media-sound/davemp/files/davemp
+++ b/media-sound/davemp/files/davemp
@@ -1,16 +1,22 @@
#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
depend() {
- need mpd
+ use mpd
}
start() {
- start-stop-daemon --start -c mpd --quiet --exec /usr/bin/davempd.pl /etc/davemp.conf
- eend $?
+ ebegin "Starting davemp"
+ start-stop-daemon --start --user mpd --background \
+ --make-pidfile --pidfile /var/run/davemp.pid \
+ --exec /usr/bin/davempd.pl -- /etc/davemp.conf
+ eend $?
}
stop() {
- killall davempd.pl
- eend $?
+ ebegin "Stopping davemp"
+ start-stop-daemon --stop --pidfile /var/run/davemp.pid
+ eend $?
}
-
diff --git a/media-sound/davemp/files/davemp-1.23-json-fix.diff b/media-sound/davemp/files/davemp-1.23-json-fix.diff
new file mode 100644
index 000000000..ed4c18d45
--- /dev/null
+++ b/media-sound/davemp/files/davemp-1.23-json-fix.diff
@@ -0,0 +1,14 @@
+JSON::XS::to_json has been renamed to encode_json
+
+diff -dupr davemp-1.23.orig/lib/Davemp.pm davemp-1.23/lib/Davemp.pm
+--- davemp-1.23.orig/lib/Davemp.pm 2010-01-29 18:37:51.652969294 +0100
++++ davemp-1.23/lib/Davemp.pm 2010-01-29 18:38:38.669968654 +0100
+@@ -68,7 +68,7 @@ sub handle_request {
+ my $vars = $cgi->Vars;
+ map { $vars->{$_} =~ s/\%([A-Fa-f0-9]{2})/pack('C', hex($1))/seg; } keys %$vars;
+ my $result = $self->sendCommand($command, $vars);
+- my $jsonstring = to_json($result);
++ my $jsonstring = encode_json($result);
+
+ print "HTTP/1.1 200 OK\n";
+ #print "Content-type: application/json\n";
diff --git a/media-sound/davemp/files/davemp-1.23-run-in-foreground.diff b/media-sound/davemp/files/davemp-1.23-run-in-foreground.diff
new file mode 100644
index 000000000..e799b0c95
--- /dev/null
+++ b/media-sound/davemp/files/davemp-1.23-run-in-foreground.diff
@@ -0,0 +1,14 @@
+Disable background davemp to simplify killing it with start-stop-daemon.
+It is just simpler than implementing pidfile support.
+
+diff -dupr davemp-1.23.orig/davempd.pl davemp-1.23/davempd.pl
+--- davemp-1.23.orig/davempd.pl 2010-01-28 19:49:52.423815302 +0100
++++ davemp-1.23/davempd.pl 2010-01-28 19:51:44.745814314 +0100
+@@ -63,6 +63,6 @@
+ $server->port('4691');
+ }
+ print "Server started on port " . $server->port . "\n";
+-$server->background;
++$server->run;
+
+ exit 0;