proj/gentoo: Initial commit
[gentoo.git] / media-video / ushare / ushare-1.1a-r5.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=4
6 inherit eutils multilib readme.gentoo toolchain-funcs user
7
8 DESCRIPTION="uShare is a UPnP (TM) A/V & DLNA Media Server"
9 HOMEPAGE="http://ushare.geexbox.org/"
10 SRC_URI="http://ushare.geexbox.org/releases/${P}.tar.bz2"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="amd64 x86"
15 IUSE="dlna nls"
16
17 RDEPEND=">=net-libs/libupnp-1.6.14
18         dlna? ( >=media-libs/libdlna-0.2.4 )"
19 DEPEND="${RDEPEND}
20         virtual/pkgconfig"
21
22 src_prepare() {
23         EPATCH_SOURCE="${FILESDIR}" EPATCH_SUFFIX="patch" \
24                 EPATCH_OPTS="-p1" epatch
25
26         DOC_CONTENTS="Please edit /etc/conf.d/ushare to set the shared directories
27                 and other important settings. Check system log if ushare is
28                 not booting."
29 }
30
31 src_configure() {
32         local myconf
33         myconf="--prefix=/usr --disable-sysconf --disable-strip $(use_enable dlna)"
34         # nls can only be disabled, on by default.
35         use nls || myconf="${myconf} --disable-nls"
36
37         # I can't use econf
38         # --host is not implemented in ./configure file
39         tc-export CC CXX
40
41         ./configure ${myconf} || die "./configure failed"
42 }
43
44 src_install() {
45         emake DESTDIR="${D}" install
46         doman src/ushare.1
47         newconfd "${FILESDIR}"/ushare.conf.d ushare
48         newinitd "${FILESDIR}"/ushare.init.d ushare
49         dodoc NEWS README TODO THANKS AUTHORS
50         readme.gentoo_create_doc
51 }
52
53 pkg_postinst() {
54         enewuser ushare
55         readme.gentoo_print_elog
56 }