| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/media-video/ushare/ushare-1.1a-r3.ebuild,v 1.4 2012/07/04 03:17:03 jdhore Exp $ |
| 4 |
|
| 5 |
EAPI=4 |
| 6 |
inherit eutils multilib 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 |
|
| 27 |
src_configure() { |
| 28 |
local myconf |
| 29 |
myconf="--prefix=/usr --disable-sysconf --disable-strip $(use_enable dlna)" |
| 30 |
# nls can only be disabled, on by default. |
| 31 |
use nls || myconf="${myconf} --disable-nls" |
| 32 |
|
| 33 |
# I can't use econf |
| 34 |
# --host is not implemented in ./configure file |
| 35 |
./configure ${myconf} || die "./configure failed" |
| 36 |
} |
| 37 |
|
| 38 |
src_install() { |
| 39 |
emake DESTDIR="${D}" install |
| 40 |
doman src/ushare.1 |
| 41 |
newconfd "${FILESDIR}"/ushare.conf.d ushare |
| 42 |
newinitd "${FILESDIR}"/ushare.init.d ushare |
| 43 |
dodoc NEWS README TODO THANKS AUTHORS |
| 44 |
} |
| 45 |
|
| 46 |
pkg_postinst() { |
| 47 |
enewuser ushare |
| 48 |
elog "Please edit /etc/conf.d/ushare to set the shared directories" |
| 49 |
elog "and other important settings. Check system log if ushare is" |
| 50 |
elog "not booting." |
| 51 |
} |