/[gentoo-x86]/net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild
Gentoo

Contents of /net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sun Jan 20 20:35:16 2013 UTC (6 years, 10 months ago) by thev00d00
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Update to use REQUIRED_USE, Thanks to BT in #448484, Drop old

(Portage version: 2.2.0_alpha157/cvs/Linux x86_64, unsigned Manifest commit)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild,v 1.4 2012/10/04 03:52:25 vapier Exp $
4
5 EAPI="4"
6 inherit autotools eutils linux-info user
7
8 DEB_VER="4"
9 DESCRIPTION="MediaTomb is an open source UPnP MediaServer"
10 HOMEPAGE="http://www.mediatomb.cc/"
11 SRC_URI="mirror://sourceforge/mediatomb/${P}.tar.gz
12 mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}-${DEB_VER}.debian.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~arm ~ppc ~x86"
17 IUSE="+curl debug +exif +ffmpeg id3tag inotify +javascript lastfm libextractor +magic +mp4 mysql +sqlite +taglib thumbnail +zlib"
18 REQUIRED_USE="
19 || ( mysql sqlite )
20 taglib? ( !id3tag ) id3tag? ( !taglib )
21 "
22
23 DEPEND="mysql? ( virtual/mysql )
24 id3tag? ( media-libs/id3lib )
25 javascript? ( >=dev-lang/spidermonkey-1.8.5 )
26 dev-libs/expat
27 taglib? ( media-libs/taglib )
28 sqlite? ( >=dev-db/sqlite-3 )
29 lastfm? ( >=media-libs/lastfmlib-0.4 )
30 exif? ( media-libs/libexif )
31 libextractor? ( media-libs/libextractor )
32 mp4? ( >=media-libs/libmp4v2-1.9.1_p479:0 )
33 ffmpeg? ( virtual/ffmpeg )
34 thumbnail? ( media-video/ffmpegthumbnailer[jpeg] )
35 curl? ( net-misc/curl )
36 magic? ( sys-apps/file )
37 sys-apps/util-linux
38 zlib? ( sys-libs/zlib )
39 virtual/libiconv"
40 RDEPEND="${DEPEND}"
41
42 pkg_setup() {
43 if use inotify ; then
44 if ! linux_config_exists || ! linux_chkconfig_present INOTIFY_USER ; then
45 ewarn "Please enable Inotify support in your kernel:"
46 ewarn " File systems --->"
47 ewarn " [*] Inotify support for userspace"
48 fi
49 fi
50 enewgroup mediatomb
51 enewuser mediatomb -1 -1 /dev/null mediatomb
52 }
53
54 src_prepare() {
55 local p dd="${WORKDIR}"/debian/patches
56 sed -i -r '/^[-+]{3} /s:[.][.]/::' "${dd}"/* || die
57 for p in $(<"${dd}"/series) ; do
58 epatch "${dd}"/${p}
59 done
60 epatch "${FILESDIR}"/${P}-libmp4v2.patch
61 epatch "${FILESDIR}"/${P}-system-uuid.patch #270830
62 if has_version ">=dev-lang/spidermonkey-1.8.7" ; then
63 epatch "${FILESDIR}"/${P}-mozjs187.patch #435394
64 fi
65 epatch "${FILESDIR}"/${P}-libextractor.patch #435394
66 eautoreconf
67 }
68
69 src_configure() {
70 local myconf=()
71 if use thumbnail ; then
72 elog "libextrator does not work with thumbnail, disabling libextrator"
73 myconf+=( --enable-ffmpegthumbnailer --enable-ffmpeg --disable-libextractor )
74 elif ! use thumbnail && use ffmpeg && use libextractor ; then
75 elog "libextrator does not work with ffmpeg, disabling libextrator"
76 myconf+=( --disable-ffmpegthumbnailer --enable-ffmpeg --disable-libextractor )
77 else
78 myconf+=(
79 $(use_enable thumbnail ffmpegthumbnailer)
80 $(use_enable ffmpeg)
81 $(use_enable libextractor)
82 )
83 fi
84
85 econf \
86 $(use_enable curl) $(use_enable curl youtube) \
87 $(use_enable debug tombdebug) \
88 $(use_enable exif libexif) \
89 $(use_enable id3tag id3lib) \
90 $(use_enable inotify) \
91 $(use_enable javascript libjs) \
92 $(use_enable lastfm lastfmlib) \
93 $(use_enable magic libmagic) \
94 $(use_enable mp4 libmp4v2) \
95 $(use_enable mysql) \
96 $(use_enable sqlite sqlite3) \
97 $(use_enable taglib) \
98 $(use_enable zlib) \
99 --enable-external-transcoding \
100 --enable-protocolinfo-extension \
101 "${myconf[@]}"
102 }
103
104 src_install() {
105 default
106
107 newinitd "${FILESDIR}"/${PN}-0.12.1.initd ${PN}
108 use mysql || sed -i -e "/use mysql/d" "${ED}"/etc/init.d/${PN}
109 newconfd "${FILESDIR}"/${PN}-0.12.0.confd ${PN}
110
111 insinto /etc/mediatomb
112 newins "${FILESDIR}/${PN}-0.12.0.config" config.xml
113 fperms 0600 /etc/mediatomb/config.xml
114 fowners mediatomb:mediatomb /etc/mediatomb/config.xml
115
116 keepdir /var/lib/mediatomb
117 fowners mediatomb:mediatomb /var/lib/mediatomb
118 }
119
120 pkg_postinst() {
121 if use mysql ; then
122 elog "MediaTomb has been built with MySQL support and needs"
123 elog "to be configured before being started."
124 elog "For more information, please consult the MediaTomb"
125 elog "documentation: http://mediatomb.cc/pages/documentation"
126 elog
127 fi
128
129 elog "To configure MediaTomb edit:"
130 elog "/etc/mediatomb/config.xml"
131 elog
132 elog "The MediaTomb web interface can be reached at (after the service is started):"
133 elog "http://localhost:49152/"
134 }

  ViewVC Help
Powered by ViewVC 1.1.20