1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PERL_EXPORT_PHASE_FUNCTIONS=no
7 inherit eutils multilib user perl-module
9 DESCRIPTION="A streaming server for MP3, OGG vorbis and other streamable files"
10 HOMEPAGE="https://www.gnu.org/software/gnump3d/"
11 SRC_URI="https://savannah.gnu.org/download/${PN}/${P}.tar.bz2"
15 KEYWORDS="~alpha amd64 ~ppc ppc64 sparc x86"
18 RDEPEND="sox? ( media-sound/sox )"
24 enewuser gnump3d '' '' '' nogroup
25 LIBDIR=/usr/$(get_libdir)
33 insinto "${VENDOR_LIB}"/gnump3d
34 doins lib/gnump3d/*.pm
35 insinto "${VENDOR_LIB}"/gnump3d/plugins
36 doins lib/gnump3d/plugins/*.pm
37 insinto "${VENDOR_LIB}"/gnump3d/lang
38 doins lib/gnump3d/lang/*.pm
40 dobin bin/gnump3d2 bin/gnump3d-top bin/gnump3d-index
41 dosym /usr/bin/gnump3d2 /usr/bin/gnump3d
44 insinto /usr/share/gnump3d
48 doins etc/gnump3d.conf etc/mime.types etc/file.types
49 sed -e "s,PLUGINDIR,${VENDOR_LIB},g" -i "${ED}/etc/gnump3d/gnump3d.conf" || die
50 sed -e 's,^user *= *\(.*\)$,user = gnump3d,g' -i "${ED}/etc/gnump3d/gnump3d.conf" || die
52 dodoc AUTHORS ChangeLog DOWNSAMPLING PLUGINS README SUPPORT TODO
54 newinitd "${FILESDIR}"/${PN}.init.d gnump3d
55 newconfd "${FILESDIR}"/${PN}.conf.d gnump3d
57 keepdir /var/log/gnump3d
58 keepdir /var/cache/gnump3d/serving
60 fowners gnump3d:nogroup /var/log/gnump3d /var/cache/gnump3d
64 elog "Please edit your /etc/gnump3d/gnump3d.conf before running"
65 elog "/etc/init.d/gnump3d start"
67 elog "At the very least, you will need to change the root directory"
68 elog "where music is found. By default, gnump3d will also listen"
69 elog "to any address on port 8888"
71 elog "You can optionally use sox to downmix the quality of streamed"
72 elog "music in realtime for slow connections."