# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="uShare is a UPnP (TM) A/V & DLNA Media Server" HOMEPAGE="http://ushare.geexbox.org/" SRC_URI="http://ushare.geexbox.org/releases/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="dlna nls" DEPEND="dev-util/pkgconfig >=net-libs/libupnp-1.4.2 dlna? ( >=media-libs/libdlna-0.2.1 )" pkg_preinst() { enewuser ushare } src_compile() { local myconf # Configure need some tips myconf="--prefix=/ \ $(use_enable dlna ) \ --bindir=usr/bin \ --sysconfdir=etc/ushare \ --localedir=usr/share/locale \ --disable-strip" # enable-nls is implied by default, only --disable-nls is needed use nls || myconf="${myconf} --disable-nls" # remove original init.d sed -i \ -e '/(INSTALL) -d $(sysconfdir)\/init\.d/d' \ -e '/$(INSTALL) -m 755 $(INITD_FILE) $(sysconfdir)\/init.d/d' \ scripts/Makefile # note: no autoconf configure ./configure ${myconf} || die "Configure failed" emake || die "Make failed" } src_install() { make DESTDIR="${D}" install || die "make install failed" doman src/ushare.1 newconfd "${FILESDIR}"/ushare.conf.d ushare newinitd "${FILESDIR}"/ushare.init.d ushare dodoc NEWS README TODO THANKS AUTHORS } pkg_postinst() { elog "Please edit /etc/conf.d/ushare to set the shared directories" elog "and other important settings. Check system log if ushare is" elog "not booting." }