From 9d004d5431ce7166473938ab9fea5163617de764 Mon Sep 17 00:00:00 2001 From: Micha Glave Date: Wed, 6 Jul 2011 08:22:05 +0200 Subject: [PATCH] first rough-cut of a shairtunes ebuild. --- media-sound/shairport/Manifest | 3 ++ media-sound/shairport/files/shairport.initd | 30 +++++++++++++ .../shairport/shairport-20110605.ebuild | 42 +++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 media-sound/shairport/Manifest create mode 100644 media-sound/shairport/files/shairport.initd create mode 100644 media-sound/shairport/shairport-20110605.ebuild diff --git a/media-sound/shairport/Manifest b/media-sound/shairport/Manifest new file mode 100644 index 0000000..4285c18 --- /dev/null +++ b/media-sound/shairport/Manifest @@ -0,0 +1,3 @@ +AUX shairport.initd 605 RMD160 732a69f8b370955d11e3e5606844466b6e0e0c64 SHA1 a343fdb9efdcb66f1055848556253049a699cb65 SHA256 41dae67e8040d61d2ce5b4e649268f10a8514f4aa3b1b43c318f99aac4891eae +DIST albertz-shairport-587f217.tar.gz 38478 RMD160 662b7aff8d9f5f0dc75d9b8ddc3437b1bde1021d SHA1 7e8965b4b90e39d592d99a119c55b60e2a21ff89 SHA256 a9458b11c27f800442fa4753cca9f6b5673709dd78311e217d23fdb1f36e5c24 +EBUILD shairport-20110605.ebuild 827 RMD160 0dc83f712969486f9f972bcbf49ace17a4d32e0b SHA1 1f70a51c79e1a0340dff72de1bd030e5cf0f1896 SHA256 8c0f5118a2cc5fb9c02a34bb534f4261db28303fea3d4366f025ba959832e4b3 diff --git a/media-sound/shairport/files/shairport.initd b/media-sound/shairport/files/shairport.initd new file mode 100644 index 0000000..f564e8b --- /dev/null +++ b/media-sound/shairport/files/shairport.initd @@ -0,0 +1,30 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +NAME="shairport" +DAEMON="/usr/bin/shairport.pl" +DAEMON_ARGS="" +PIDFILE="/var/run/${NAME}.pid" + + +depend() { + need net + use avahi-daemon +} + +start() { + ebegin "Starting shairport" + start-stop-daemon --start --quiet --pidfile "$PIDFILE" \ + --user audio --exec "$DAEMON" -b --oknodo -- $DAEMON_ARGS + eend $* +} + +stop() { + ebegin "Shutting down shairport" + start-stop-daemon --stop --quiet --pidfile "$PIDFILE" \ + --retry 1 --oknodo + eend $* +} + diff --git a/media-sound/shairport/shairport-20110605.ebuild b/media-sound/shairport/shairport-20110605.ebuild new file mode 100644 index 0000000..819e9bf --- /dev/null +++ b/media-sound/shairport/shairport-20110605.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3 + +inherit eutils + +DESCRIPTION="emulates an AirPort Express for the purpose of streaming music +from iTunes and compatible iPods" +HOMEPAGE="http://www.mafipulation.org" +MY_P="albertz-shairport-587f217" +SRC_URI="https://download.github.com/${MY_P}.tar.gz" +S=${WORKDIR}/${MY_P} + +LICENSE="CC" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND="dev-libs/openssl + media-libs/libao + >=dev-lang/perl-5.10 + net-dns/avahi" +RDEPEND="${DEPEND} + dev-perl/HTTP-Message + dev-perl/libwww-perl + dev-perl/Crypt-OpenSSL-RSA + dev-perl/IO-Socket-INET6 + " + +pkg_setup() { + enewgroup audio + enewuser audio -1 -1 -1 audio +} + + +src_install() { + cd ${S} + dobin hairtunes shairport.pl shairport + newinitd ${FILESDIR}/${PN}.initd ${PN} +}