From bf954d7cfb3b1eb923a9dd1b618fc300bdca3c21 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 2 Oct 2012 03:32:15 +0000 Subject: Use system libuuid from util-linux #270830 by Diego Elio Pettenò. Make mysql init script optional all the time to support external services #368409 by David Carlos Manuelda. Update to EAPI=4 and split up USE flags to make things more explicit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Portage version: 2.2.0_alpha131/cvs/Linux x86_64) --- net-misc/mediatomb/ChangeLog | 13 ++- .../files/mediatomb-0.12.1-system-uuid.patch | 36 ++++++ net-misc/mediatomb/files/mediatomb-0.12.1.initd | 29 +++++ net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild | 130 +++++++++++++++++++++ net-misc/mediatomb/metadata.xml | 25 ++-- 5 files changed, 217 insertions(+), 16 deletions(-) create mode 100644 net-misc/mediatomb/files/mediatomb-0.12.1-system-uuid.patch create mode 100644 net-misc/mediatomb/files/mediatomb-0.12.1.initd create mode 100644 net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild (limited to 'net-misc/mediatomb') diff --git a/net-misc/mediatomb/ChangeLog b/net-misc/mediatomb/ChangeLog index 728251498ac9..fd3a4635f845 100644 --- a/net-misc/mediatomb/ChangeLog +++ b/net-misc/mediatomb/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for net-misc/mediatomb # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/mediatomb/ChangeLog,v 1.34 2012/07/02 07:57:43 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/mediatomb/ChangeLog,v 1.35 2012/10/02 03:32:15 vapier Exp $ + +*mediatomb-0.12.1-r3 (02 Oct 2012) + + 02 Oct 2012; Mike Frysinger + +files/mediatomb-0.12.1-system-uuid.patch, +files/mediatomb-0.12.1.initd, + +mediatomb-0.12.1-r3.ebuild, metadata.xml: + Use system libuuid from util-linux #270830 by Diego Elio Pettenò. Make mysql + init script optional all the time to support external services #368409 by + David Carlos Manuelda. Update to EAPI=4 and split up USE flags to make things + more explicit. 02 Jul 2012; Jeff Horelick mediatomb-0.12.1-r2.ebuild: marked x86 per bug 422919 @@ -150,4 +160,3 @@ +mediatomb-0.11.0.ebuild: Initial import of mediatomb, an UPnP media server compatible with Sony PlayStation 3. Thanks to BT in bug #172799 for the ebuild. - diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1-system-uuid.patch b/net-misc/mediatomb/files/mediatomb-0.12.1-system-uuid.patch new file mode 100644 index 000000000000..e398580c0078 --- /dev/null +++ b/net-misc/mediatomb/files/mediatomb-0.12.1-system-uuid.patch @@ -0,0 +1,36 @@ +diff --git a/build/Makefile.am b/build/Makefile.am +index 6cdfc16..64a965a 100644 +--- a/build/Makefile.am ++++ b/build/Makefile.am +@@ -58,6 +58,7 @@ mediatomb_CXXFLAGS = -I$(top_srcdir)/src \ + mediatomb_LDADD = \ + libmediatomb.a \ + $(top_srcdir)/tombupnp/build/libtombupnp.a \ ++ -luuid \ + $(LIBEXIF_LDFLAGS) \ + $(ZLIB_LDFLAGS) \ + $(EXPAT_LDFLAGS) \ +diff --git a/build/libmediatomb_src b/build/libmediatomb_src +index 1173942..9d4f7fd 100644 +--- a/build/libmediatomb_src ++++ b/build/libmediatomb_src +@@ -231,19 +231,6 @@ libmediatomb_a_SOURCES = \ + ../src/url.h \ + ../src/url_request_handler.cc \ + ../src/url_request_handler.h \ +-../src/uuid/clear.c \ +-../src/uuid/compare.c \ +-../src/uuid/copy.c \ +-../src/uuid/gen_uuid.c \ +-../src/uuid/isnull.c \ +-../src/uuid/pack.c \ +-../src/uuid/parse.c \ +-../src/uuid/unpack.c \ +-../src/uuid/unparse.c \ +-../src/uuid/uuid.h \ +-../src/uuid/uuidP.h \ +-../src/uuid/uuid_time.c \ +-../src/uuid/uuid_types.h \ + ../src/web/action.cc \ + ../src/web/add.cc \ + ../src/web/add_object.cc \ diff --git a/net-misc/mediatomb/files/mediatomb-0.12.1.initd b/net-misc/mediatomb/files/mediatomb-0.12.1.initd new file mode 100644 index 000000000000..02a19d22dd1b --- /dev/null +++ b/net-misc/mediatomb/files/mediatomb-0.12.1.initd @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/mediatomb/files/mediatomb-0.12.1.initd,v 1.1 2012/10/02 03:32:15 vapier Exp $ + +depend() { + need net + # In order to properly support this (need vs use), we would have to + # parse ${MEDIATOMB_CONFIG} and see if mysql is enabled and if it is + # pointing to the local system. #368409 + use mysql +} + +start() { + ebegin "Starting MediaTomb" + start-stop-daemon --start --quiet --exec /usr/bin/mediatomb \ + --pidfile ${MEDIATOMB_PIDFILE} -- --daemon \ + --pidfile ${MEDIATOMB_PIDFILE} --user ${MEDIATOMB_USER} \ + --group ${MEDIATOMB_GROUP} --logfile ${MEDIATOMB_LOGFILE} \ + --config ${MEDIATOMB_CONFIG} --port ${MEDIATOMB_PORT} \ + ${MEDIATOMB_OPTIONS} + eend $? +} + +stop () { + ebegin "Stopping MediaTomb" + start-stop-daemon --stop --retry 10 --quiet --pidfile ${MEDIATOMB_PIDFILE} + eend $? +} diff --git a/net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild b/net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild new file mode 100644 index 000000000000..c2d3fb87007c --- /dev/null +++ b/net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild @@ -0,0 +1,130 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/mediatomb/mediatomb-0.12.1-r3.ebuild,v 1.1 2012/10/02 03:32:15 vapier Exp $ + +EAPI="4" +inherit autotools eutils linux-info user + +DEB_VER="4" +DESCRIPTION="MediaTomb is an open source UPnP MediaServer" +HOMEPAGE="http://www.mediatomb.cc/" +SRC_URI="mirror://sourceforge/mediatomb/${P}.tar.gz + mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}-${DEB_VER}.debian.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~x86" +IUSE="+curl debug +exif +ffmpeg id3tag inotify +javascript lastfm libextractor +magic +mp4 mysql +sqlite +taglib thumbnail +zlib" +REQUIRED_USE="|| ( mysql sqlite ) ^^ ( taglib id3tag )" + +DEPEND="mysql? ( virtual/mysql ) + id3tag? ( media-libs/id3lib ) + javascript? ( dev-lang/spidermonkey ) + dev-libs/expat + taglib? ( media-libs/taglib ) + sqlite? ( >=dev-db/sqlite-3 ) + lastfm? ( >=media-libs/lastfmlib-0.4 ) + exif? ( media-libs/libexif ) + libextractor? ( media-libs/libextractor ) + mp4? ( >=media-libs/libmp4v2-1.9.1_p479:0 ) + ffmpeg? ( virtual/ffmpeg ) + thumbnail? ( media-video/ffmpegthumbnailer[jpeg] ) + curl? ( net-misc/curl ) + magic? ( sys-apps/file ) + sys-apps/util-linux + zlib? ( sys-libs/zlib ) + virtual/libiconv" +RDEPEND="${DEPEND}" + +pkg_setup() { + if use inotify ; then + if ! linux_config_exists || ! linux_chkconfig_present INOTIFY_USER ; then + ewarn "Please enable Inotify support in your kernel:" + ewarn " File systems --->" + ewarn " [*] Inotify support for userspace" + fi + fi + enewgroup mediatomb + enewuser mediatomb -1 -1 /dev/null mediatomb +} + +src_prepare() { + local p dd="${WORKDIR}"/debian/patches + sed -i -r '/^[-+]{3} /s:[.][.]/::' "${dd}"/* || die + for p in $(<"${dd}"/series) ; do + epatch "${dd}"/${p} + done + epatch "${FILESDIR}"/${P}-libmp4v2.patch + epatch "${FILESDIR}"/${P}-system-uuid.patch #270830 + if has_version ">=dev-lang/spidermonkey-1.8.7" ; then + sed -i 's:mozjs185:mozjs187:g' configure.ac || die #423991 + fi + eautoreconf +} + +src_configure() { + local myconf=() + if use thumbnail ; then + elog "libextrator does not work with thumbnail, disabling libextrator" + myconf+=( --enable-ffmpegthumbnailer --enable-ffmpeg --disable-libextractor ) + elif ! use thumbnail && use ffmpeg && use libextractor ; then + elog "libextrator does not work with ffmpeg, disabling libextrator" + myconf+=( --disable-ffmpegthumbnailer --enable-ffmpeg --disable-libextractor ) + else + myconf+=( + $(use_enable thumbnail ffmpegthumbnailer) + $(use_enable ffmpeg) + $(use_enable libextractor) + ) + fi + + econf \ + $(use_enable curl) $(use_enable curl youtube) \ + $(use_enable debug tombdebug) \ + $(use_enable exif libexif) \ + $(use_enable id3tag id3lib) \ + $(use_enable inotify) \ + $(use_enable javascript libjs) \ + $(use_enable lastfm lastfmlib) \ + $(use_enable magic libmagic) \ + $(use_enable mp4 libmp4v2) \ + $(use_enable mysql) \ + $(use_enable sqlite sqlite3) \ + $(use_enable taglib) \ + $(use_enable zlib) \ + --enable-external-transcoding \ + --enable-protocolinfo-extension \ + "${myconf[@]}" +} + +src_install() { + default + + newinitd "${FILESDIR}"/${PN}-0.12.1.initd ${PN} + use mysql || sed -i -e "/use mysql/d" "${ED}"/etc/init.d/${PN} + newconfd "${FILESDIR}"/${PN}-0.12.0.confd ${PN} + + insinto /etc/mediatomb + newins "${FILESDIR}/${PN}-0.12.0.config" config.xml + fperms 0600 /etc/mediatomb/config.xml + fowners mediatomb:mediatomb /etc/mediatomb/config.xml + + keepdir /var/lib/mediatomb + fowners mediatomb:mediatomb /var/lib/mediatomb +} + +pkg_postinst() { + if use mysql ; then + elog "MediaTomb has been built with MySQL support and needs" + elog "to be configured before being started." + elog "For more information, please consult the MediaTomb" + elog "documentation: http://mediatomb.cc/pages/documentation" + elog + fi + + elog "To configure MediaTomb edit:" + elog "/etc/mediatomb/config.xml" + elog + elog "The MediaTomb web interface can be reached at (after the service is started):" + elog "http://localhost:49152/" +} diff --git a/net-misc/mediatomb/metadata.xml b/net-misc/mediatomb/metadata.xml index 9bd970639e88..443d571ac35d 100644 --- a/net-misc/mediatomb/metadata.xml +++ b/net-misc/mediatomb/metadata.xml @@ -1,18 +1,15 @@ - video - - Enable inotify filesystem monitoring support - Enable last.fm support - Use libextractor to gather files' metadata. - Use dev-db/mysql as backend rather than - SQLite3. If this USE flag is disabled, dev-db/sqlite is used - instead. - Use media-libs/taglib for reading files' - metadata rather than id3lib. If this USE flag is disabled - media-libs/id3lib is used instead. - Enables video thumbnails generation through - media-video/ffmpegthumbnailer - + video + + Use media-libs/libid3tag for reading files' metadata rather than taglib + Enable inotify filesystem monitoring support + Enable last.fm support + Use libextractor to gather files' metadata + Use libmagic to determine file types + Use dev-db/mysql as backend rather than SQLite3 + Use media-libs/taglib for reading files' metadata rather than id3lib + Enables video thumbnails generation throughmedia-video/ffmpegthumbnailer + -- cgit v1.2.3-65-gdbad