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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sun Jan 20 20:35:16 2013 UTC (17 months, 3 weeks 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-r1.ebuild,v 1.4 2012/06/28 17:23:51 axs Exp $
4
5 EAPI=2
6 inherit autotools eutils linux-info
7
8 DESCRIPTION="MediaTomb is an open source UPnP MediaServer"
9 HOMEPAGE="http://www.mediatomb.cc/"
10 SRC_URI="mirror://sourceforge/mediatomb/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="amd64 ~arm ~ppc x86"
15 IUSE="debug +exif +ffmpeg inotify +javascript lastfm libextractor +mp4 mysql +taglib thumbnail"
16
17 DEPEND="
18 mysql? ( virtual/mysql )
19 !mysql? ( >=dev-db/sqlite-3 )
20 javascript? ( <dev-lang/spidermonkey-1.8.6 )
21 dev-libs/expat
22 taglib? ( media-libs/taglib )
23 !taglib? ( media-libs/id3lib )
24 lastfm? ( >=media-libs/lastfmlib-0.4 )
25 exif? ( media-libs/libexif )
26 libextractor? ( media-libs/libextractor )
27 mp4? ( media-libs/libmp4v2:0 )
28 ffmpeg? ( virtual/ffmpeg )
29 thumbnail? ( media-video/ffmpegthumbnailer[jpeg] )
30 net-misc/curl
31 sys-apps/file
32 sys-libs/zlib
33 virtual/libiconv"
34 RDEPEND="${DEPEND}"
35
36 pkg_setup() {
37 if use inotify; then
38 if ! linux_config_exists \
39 || ! linux_chkconfig_present INOTIFY_USER; then
40 ewarn "Please enable Inotify support in your kernel:"
41 ewarn
42 ewarn " File systems --->"
43 ewarn " [*] Inotify support for userspace"
44 ewarn
45 fi
46 fi
47 enewgroup mediatomb
48 enewuser mediatomb -1 -1 /dev/null mediatomb
49 }
50
51 src_prepare() {
52 epatch "${FILESDIR}/${P}-gcc46.patch"
53 epatch "${FILESDIR}/${P}-libav7.patch"
54 if use javascript && has_version ">=dev-lang/spidermonkey-1.8.5" ; then
55 epatch "${FILESDIR}"/${P}-mozjs185.patch
56 eautoreconf
57 fi
58 }
59
60 src_configure() {
61 if use thumbnail; then
62 elog "libextrator does not work with thumbnail, disabling libextrator"
63 myconf="${myconf} --enable-ffmpegthumbnailer --enable-ffmpeg --disable-libextractor"
64 elif ! use thumbnail && use ffmpeg && use libextractor; then
65 elog "libextrator does not work with ffmpeg, disabling libextrator"
66 myconf="${myconf} --disable-ffmpegthumbnailer --enable-ffmpeg --disable-libextractor"
67 else
68 myconf="${myconf} $(use_enable thumbnail ffmpegthumbnailer) $(use_enable ffmpeg) $(use_enable libextractor)"
69 fi
70
71 econf \
72 $(use_enable debug tombdebug) \
73 $(use_enable exif libexif) \
74 $(use_enable inotify) \
75 $(use_enable javascript libjs) \
76 $(use_enable lastfm lastfmlib) \
77 $(use_enable mp4 libmp4v2) \
78 $(use_enable mysql) $(use_enable !mysql sqlite3) \
79 $(use_enable taglib) $(use_enable !taglib id3lib) \
80 --enable-curl \
81 --enable-external-transcoding \
82 --enable-libmagic \
83 --enable-protocolinfo-extension \
84 --enable-youtube \
85 --enable-zlib \
86 ${myconf}
87 }
88
89 src_install() {
90 emake DESTDIR="${D}" install || die "Install failed!"
91
92 dodoc AUTHORS ChangeLog NEWS README TODO
93
94 sed -e "s:#MYSQL#:$(use mysql && has_version dev-db/mysql[-minimal] && echo "mysql"):" \
95 "${FILESDIR}/${PN}-0.12.0.initd" > "${T}/mediatomb.initd" || die
96 newinitd "${T}/mediatomb.initd" mediatomb || die
97 newconfd "${FILESDIR}/${PN}-0.12.0.confd" mediatomb || die
98
99 insinto /etc/mediatomb
100 newins "${FILESDIR}/${PN}-0.12.0.config" config.xml || die
101 fperms 0600 /etc/mediatomb/config.xml
102 fowners mediatomb:mediatomb /etc/mediatomb/config.xml
103
104 keepdir /var/lib/mediatomb
105 fowners mediatomb:mediatomb /var/lib/mediatomb
106 }
107
108 pkg_postinst() {
109 if use mysql; then
110 elog "MediaTomb has been built with MySQL support and needs"
111 elog "to be configured before being started."
112 elog "For more information, please consult the MediaTomb"
113 elog "documentation: http://mediatomb.cc/pages/documentation"
114 elog
115 fi
116
117 elog "To configure MediaTomb edit:"
118 elog "/etc/mediatomb/config.xml"
119 elog
120 elog "The MediaTomb web interface can be reached at (after the service is started):"
121 elog "http://localhost:49152/"
122 }

  ViewVC Help
Powered by ViewVC 1.1.20