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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Sat May 19 09:09:12 2012 UTC (7 years, 6 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
old

(Portage version: 2.2.0_alpha107/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20