# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_P="DarwinStreamingSrvr5.5-Source" S="${WORKDIR}/${MY_P}" DESCRIPTION="Darwin Streaming Server allows you to send streaming media across the internet using the industry standard RTP and RTSP protocols." HOMEPAGE="http://developer.apple.com/darwin/projects/streaming/" SRC_URI="http://www.opensource.apple.com/projects/streaming/release/${MY_P}.tar" DISTDIR="/usr/portage/distfiles" RESTRICT="fetch" LICENSE="APSL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="ssl" DEPEND="virtual/libc" RDEPEND="${DEPEND} dev-lang/perl ssl? ( dev-perl/Net-SSLeay )" DEPEND="${DEPEND} app-arch/unzip" src_unpack() { unpack ${A} #Apply the patch to set proper FHS paths cd ${WORKDIR} epatch ${FILESDIR}/${P}-gentoo.patch } src_compile() { # run the included build script ./Buildit || die "Darwin build script failed" } src_install() { # NOTE: Apple's custom build scripts makes it a real PITA # to install to useful and expected locations. Consequently, # the built binaries and configuration files are to be moved # manually into their respective directories which correspond to # the changed locations in the -gentoo.patch. # binaries go in here ( into /usr dosbin DarwinStreamingServer dobin PlaylistBroadcaster.tproj/PlaylistBroadcaster dobin MP3Broadcaster/MP3Broadcaster dobin qtpasswd.tproj/qtpasswd dobin WebAdmin/src/streamingadminserver.pl dobin StreamingProxy.tproj/StreamingProxy ) || die "failure!" # streaming server modules go in here keepdir /usr/lib/dss # configuration files go in here dodir /etc/dss insinto /etc/dss newins streamingserver.xml-POSIX streamingserver.xml-sample doins relayconfig.xml-Sample doins qtusers doins qtgroups doins qtaccess doins WebAdmin/streamingadminserver.conf doins StreamingProxy.tproj/streamingproxy.conf newins WebAdmin/streamingadminserver.pem streamingadminserver.pem-sample # server rc scripts go in here insinto /etc/init.d newins ${FILESDIR}/dss.rc dss newins ${FILESDIR}/dss-admin.rc dss-admin fperms +x /etc/init.d/dss fperms +x /etc/init.d/dss-admin # log files are generated in here keepdir /var/log/dss fowners nobody:nogroup /var/log/dss # admin web application goes in here dodir /var/lib/dss/admin cp -ax WebAdmin/WebAdminHtml/* ${D}/var/lib/dss/admin dodir /var/lib/dss/media cp -ax sample* ${D}/var/lib/dss/media keepdir /var/lib/dss/media/http keepdir /var/lib/dss/media/playlists fowners nobody:nogroup /var/lib/dss/media/playlists #Documentation goes in here dodoc ReleaseNotes.txt dodoc StreamingProxy.tproj/StreamingProxy.html } pkg_setup() { einfo "creating qtss group and user" enewgroup qtss enewuser qtss -1 /dev/null /bin/false "qtss" } pkg_nofetch() { einfo "Please register with Apple and download" einfo "the Darwin Streaming Server 5.5.1 source code." einfo "Place the downloaded file into /usr/portage/distfiles" einfo "before continuing." } pkg_postinst() { # alert user that they need to create an user in the admin group # before starting up the server. einfo "If you intend on using the web-based admin interface you" einfo "need to run 'qtpasswd -A admin ' before" einfo "starting up the admin server. If you do not plan on" einfo "using the admin interface you can just start the Darwin" einfo "Streaming Server." }