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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Tue Dec 17 23:39:27 2013 UTC (6 months, 3 weeks ago) by thev00d00
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Bump to -r7, tidy up ebuild, remove old, add flac and youtube patches, epatch_user #467110 #494398

(Portage version: 2.2.7/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-r2.ebuild,v 1.5 2012/07/02 07:57:43 jdhore 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-1.9.1_p479: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}-gcc47.patch"
54 epatch "${FILESDIR}/${P}-libav7.patch"
55 epatch "${FILESDIR}/${P}-libmp4v2.patch"
56 if use javascript && has_version ">=dev-lang/spidermonkey-1.8.5" ; then
57 epatch "${FILESDIR}"/${P}-mozjs185.patch
58 eautoreconf
59 fi
60 }
61
62 src_configure() {
63 if use thumbnail; then
64 elog "libextrator does not work with thumbnail, disabling libextrator"
65 myconf="${myconf} --enable-ffmpegthumbnailer --enable-ffmpeg --disable-libextractor"
66 elif ! use thumbnail && use ffmpeg && use libextractor; then
67 elog "libextrator does not work with ffmpeg, disabling libextrator"
68 myconf="${myconf} --disable-ffmpegthumbnailer --enable-ffmpeg --disable-libextractor"
69 else
70 myconf="${myconf} $(use_enable thumbnail ffmpegthumbnailer) $(use_enable ffmpeg) $(use_enable libextractor)"
71 fi
72
73 econf \
74 $(use_enable debug tombdebug) \
75 $(use_enable exif libexif) \
76 $(use_enable inotify) \
77 $(use_enable javascript libjs) \
78 $(use_enable lastfm lastfmlib) \
79 $(use_enable mp4 libmp4v2) \
80 $(use_enable mysql) $(use_enable !mysql sqlite3) \
81 $(use_enable taglib) $(use_enable !taglib id3lib) \
82 --enable-curl \
83 --enable-external-transcoding \
84 --enable-libmagic \
85 --enable-protocolinfo-extension \
86 --enable-youtube \
87 --enable-zlib \
88 ${myconf}
89 }
90
91 src_install() {
92 emake DESTDIR="${D}" install || die "Install failed!"
93
94 dodoc AUTHORS ChangeLog NEWS README TODO
95
96 sed -e "s:#MYSQL#:$(use mysql && has_version dev-db/mysql[-minimal] && echo "mysql"):" \
97 "${FILESDIR}/${PN}-0.12.0.initd" > "${T}/mediatomb.initd" || die
98 newinitd "${T}/mediatomb.initd" mediatomb || die
99 newconfd "${FILESDIR}/${PN}-0.12.0.confd" mediatomb || die
100
101 insinto /etc/mediatomb
102 newins "${FILESDIR}/${PN}-0.12.0.config" config.xml || die
103 fperms 0600 /etc/mediatomb/config.xml
104 fowners mediatomb:mediatomb /etc/mediatomb/config.xml
105
106 keepdir /var/lib/mediatomb
107 fowners mediatomb:mediatomb /var/lib/mediatomb
108 }
109
110 pkg_postinst() {
111 if use mysql; then
112 elog "MediaTomb has been built with MySQL support and needs"
113 elog "to be configured before being started."
114 elog "For more information, please consult the MediaTomb"
115 elog "documentation: http://mediatomb.cc/pages/documentation"
116 elog
117 fi
118
119 elog "To configure MediaTomb edit:"
120 elog "/etc/mediatomb/config.xml"
121 elog
122 elog "The MediaTomb web interface can be reached at (after the service is started):"
123 elog "http://localhost:49152/"
124 }

  ViewVC Help
Powered by ViewVC 1.1.20