diff options
author | pi <pi@FreeBSD.org> | 2015-09-25 03:49:17 +0800 |
---|---|---|
committer | pi <pi@FreeBSD.org> | 2015-09-25 03:49:17 +0800 |
commit | 51c3dad616d4190949fdc9064f7502d1791513df (patch) | |
tree | 76c955839595bdf64e9211e88a3cec6d6f9e505b /net | |
parent | e13babfc06d8fef73823dff537e6d79aa8dffab9 (diff) | |
download | freebsd-ports-gnome-51c3dad616d4190949fdc9064f7502d1791513df.tar.gz freebsd-ports-gnome-51c3dad616d4190949fdc9064f7502d1791513df.tar.zst freebsd-ports-gnome-51c3dad616d4190949fdc9064f7502d1791513df.zip |
net/mediatomb: remove BROKEN, fix build
- now uses UIDs/GIDs
- fix build in certain cases
PR: 198436, 202467
Submitted by: Pavel Nedoshivkin <nedoshivkin@gmail.com>, dim
Approved by: maintainer (timeout)
Diffstat (limited to 'net')
-rw-r--r-- | net/mediatomb/Makefile | 34 | ||||
-rw-r--r-- | net/mediatomb/files/config.xml.dist.in | 12 | ||||
-rw-r--r-- | net/mediatomb/files/mediatomb.in | 8 | ||||
-rw-r--r-- | net/mediatomb/files/patch-timer.cc | 20 | ||||
-rw-r--r-- | net/mediatomb/files/pkg-install.in | 51 | ||||
-rw-r--r-- | net/mediatomb/pkg-plist | 33 |
6 files changed, 83 insertions, 75 deletions
diff --git a/net/mediatomb/Makefile b/net/mediatomb/Makefile index 447ac10112ce..00b615371243 100644 --- a/net/mediatomb/Makefile +++ b/net/mediatomb/Makefile @@ -10,39 +10,30 @@ MASTER_SITES= SF/${PORTNAME}/MediaTomb/${PORTVERSION} MAINTAINER= leo@mediatomb.cc COMMENT= UPnP AV MediaServer -BROKEN= Fails to configure, does not use USERS/GROUPS +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2 GNU_CONFIGURE= yes CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -lpthread +LDFLAGS+= -lpthread -L${LOCALBASE}/lib ${ICONV_LIB} CONFIGURE_ARGS= --with-search="${LOCALBASE}" \ --disable-inotify CONFIGURE_ENV= PTHREAD_LIBS="-lpthread" -USES= iconv +USES= compiler:gcc-c++11-lib iconv USE_RC_SUBR= mediatomb -# --- configurable variables --- -MEDIATOMB_USER?= mediatomb -MEDIATOMB_GROUP?= mediatomb -MEDIATOMB_DIR?= /var/mediatomb -MEDIATOMB_MASK?= 750 -# --- +USERS= mediatomb +GROUPS= ${USERS} SUB_FILES= config.xml.dist \ pkg-install \ pkg-deinstall -SUB_LIST= MEDIATOMB_USER=${MEDIATOMB_USER} \ - MEDIATOMB_GROUP=${MEDIATOMB_GROUP} \ - MEDIATOMB_DIR=${MEDIATOMB_DIR} \ - MEDIATOMB_MASK=${MEDIATOMB_MASK} - -PLIST_SUB= MEDIATOMB_USER=${MEDIATOMB_USER} \ - MEDIATOMB_GROUP=${MEDIATOMB_GROUP} \ - MEDIATOMB_DIR=${MEDIATOMB_DIR} \ - MEDIATOMB_MASK=${MEDIATOMB_MASK} \ +SUB_LIST= MEDIATOMB_USER=${USERS} \ + MEDIATOMB_GROUP=${GROUPS} \ + MEDIATOMB_DIR=${DESTDIR}/var/db/mediatomb OPTIONS_DEFINE= JS LIBEXIF FFMPEGTHUMBNAILER \ EXTERNAL_TRANSCODING CURL DEBUG @@ -164,11 +155,10 @@ CONFIGURE_ARGS+= --enable-tombdebug CONFIGURE_ARGS+= --disable-tombdebug .endif -pre-install: - PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: - @${MKDIR} -m ${MEDIATOMB_MASK} -p ${STAGEDIR}${PREFIX}/etc/mediatomb + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/mediatomb + ${MKDIR} ${STAGEDIR}/var/log/mediatomb + ${MKDIR} ${STAGEDIR}/var/db/mediatomb @${INSTALL} ${COPY} ${WRKDIR}/config.xml.dist ${STAGEDIR}${PREFIX}/etc/mediatomb/config.xml.dist .include <bsd.port.post.mk> diff --git a/net/mediatomb/files/config.xml.dist.in b/net/mediatomb/files/config.xml.dist.in index 02658bf30479..73d6dd23d049 100644 --- a/net/mediatomb/files/config.xml.dist.in +++ b/net/mediatomb/files/config.xml.dist.in @@ -29,7 +29,6 @@ <custom-http-headers> <add header="X-User-Agent: redsonic"/> </custom-http-headers> - <manufacturerURL>redsonic.com</manufacturerURL> <modelNumber>105</modelNumber> --> @@ -37,8 +36,17 @@ <!-- <upnp-string-limit>101</upnp-string-limit> --> + <!-- + <custom-http-headers> + <add header="transferMode.dlna.org: Streaming"/> + <add header="contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000"/> + </custom-http-headers> + --> </server> <import hidden-files="no"> + <filesystem-charset>UTF-8</filesystem-charset> + <metadata-charset>UTF-8</metadata-charset> + <playlist-charset>UTF-8</playlist-charset> <scripting script-charset="UTF-8"> <common-script>%%DATADIR%%/js/common.js</common-script> <playlist-script>%%DATADIR%%/js/playlists.js</playlist-script> @@ -67,6 +75,8 @@ <map from="m3u" to="audio/x-mpegurl"/> <map from="pls" to="audio/x-scpls"/> <map from="flv" to="video/x-flv"/> + <map from="mkv" to="video/x-mkv"/> + <map from="avi" to="video/x-msvideo"/> <!-- Uncomment the line below for PS3 divx support --> <!-- <map from="avi" to="video/divx"/> --> <!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 --> diff --git a/net/mediatomb/files/mediatomb.in b/net/mediatomb/files/mediatomb.in index 557fcd3dfcc1..03b1b51da79f 100644 --- a/net/mediatomb/files/mediatomb.in +++ b/net/mediatomb/files/mediatomb.in @@ -18,11 +18,11 @@ mediatomb_enable=${mediatomb_enable-"NO"} # mediatomb_flags="<set as needed>" # mediatomb_interface="<set as needed>" -mediatomb_mtuser=${mediatomb_mtuser-"%%MEDIATOMB_USER%%"} -mediatomb_mtgroup=${mediatomb_mtgroup-"%%MEDIATOMB_GROUP%%"} +mediatomb_mtuser=${mediatomb_mtuser-"mediatomb"} +mediatomb_mtgroup=${mediatomb_mtgroup-"mediatomb"} mediatomb_config=${mediatomb_config-"%%PREFIX%%/etc/mediatomb/config.xml"} -mediatomb_logfile=${mediatomb_logfile-"%%MEDIATOMB_DIR%%/mediatomb.log"} -mediatomb_pidfile=${mediatomb_pidfile-"%%MEDIATOMB_DIR%%/mediatomb.pid"} +mediatomb_logfile=${mediatomb_logfile-"/var/log/mediatomb/mediatomb.log"} +mediatomb_pidfile=${mediatomb_pidfile-"/var/run/mediatomb.pid"} name="mediatomb" rcvar=mediatomb_enable diff --git a/net/mediatomb/files/patch-timer.cc b/net/mediatomb/files/patch-timer.cc new file mode 100644 index 000000000000..66e655eba488 --- /dev/null +++ b/net/mediatomb/files/patch-timer.cc @@ -0,0 +1,20 @@ +--- src/timer.cc.orig 2010-03-25 15:58:11.000000000 +0100 ++++ src/timer.cc 2015-03-08 22:18:05.760740000 +0100 +@@ -33,12 +33,15 @@ + #include "autoconfig.h" + #endif + ++#include "singleton.h" ++ ++class Timer; ++SINGLETON_MUTEX(Timer, true); ++ + #include "timer.h" + + using namespace zmm; + +-SINGLETON_MUTEX(Timer, true); +- + template <> + Ref<Array<Timer::TimerSubscriberElement<TimerSubscriberSingleton<Object> > > > Timer::getAppropriateSubscribers<TimerSubscriberSingleton<Object> >() + { diff --git a/net/mediatomb/files/pkg-install.in b/net/mediatomb/files/pkg-install.in index 18dd5818542f..d8881c235edf 100644 --- a/net/mediatomb/files/pkg-install.in +++ b/net/mediatomb/files/pkg-install.in @@ -6,35 +6,34 @@ if [ "$2" != "PRE-INSTALL" ]; then exit 0 fi -PREFIX=${PKG_PREFIX:-%%PREFIX%%} +#PREFIX=${PKG_PREFIX:-%%PREFIX%%} -USER=%%MEDIATOMB_USER%% -GROUP=%%MEDIATOMB_GROUP%% +#USER=%%MEDIATOMB_USER%% +#GROUP=%%MEDIATOMB_GROUP%% -PW="pw" -INSTALL=%%INSTALL%% -DIR=%%MEDIATOMB_DIR%% -MASK=%%MEDIATOMB_MASK%% +#INSTALL=%%INSTALL%% +#DIR=%%MEDIATOMB_DIR%% +#MASK=%%MEDIATOMB_MASK%% -if ! ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then - if ${PW} groupadd ${GROUP}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi -fi +#if ! ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then +# if ${PW} groupadd ${GROUP}; then +# echo "Added group \"${GROUP}\"." +# else +# echo "Adding group \"${GROUP}\" failed..." +# exit 1 +# fi +#fi -if ! ${PW} usershow "${USER}" 2>/dev/null 1>&2; then - if ${PW} useradd ${USER} -g ${GROUP} -h - \ - -s "/sbin/nologin" -d "/nonexistent" \ - -c "MediaTomb"; \ - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi -fi +#if ! ${PW} usershow "${USER}" 2>/dev/null 1>&2; then +# if ${PW} useradd ${USER} -g ${GROUP} -h - \ +# -s "/sbin/nologin" -d "/nonexistent" \ +# -c "MediaTomb"; \ +# then +# echo "Added user \"${USER}\"." +# else +# echo "Adding user \"${USER}\" failed..." +# exit 1 +# fi +#fi exit 0 diff --git a/net/mediatomb/pkg-plist b/net/mediatomb/pkg-plist index 0b2b59a1cd42..0f8990653d68 100644 --- a/net/mediatomb/pkg-plist +++ b/net/mediatomb/pkg-plist @@ -1,7 +1,4 @@ bin/mediatomb -@exec chgrp %%MEDIATOMB_GROUP%% %D/bin/mediatomb -@exec chmod a-x %D/bin/mediatomb -@exec chmod g+x %D/bin/mediatomb man/man1/mediatomb.1.gz %%DATADIR%%/js/import.js %%DATADIR%%/js/playlists.js @@ -90,23 +87,15 @@ man/man1/mediatomb.1.gz %%DATADIR%%/web/top.html %%DATADIR%%/web/topleft.html %%DATADIR%%/web/topright.html -@owner %%MEDIATOMB_USER%% -@group %%MEDIATOMB_GROUP%% -@unexec if cmp -s %D/etc/mediatomb/config.xml.dist %D/etc/mediatomb/config.xml; then rm -f %D/etc/mediatomb/config.xml; fi -@dirrmtry etc/mediatomb +@unexec if cmp -s %D/etc/mediatomb/config.xml.dist %D/%%DATADIR%%/etc/mediatomb/config.xml; then rm -f %D/etc/mediatomb/config.xml; fi +@dir(mediatomb,mediatomb,750) etc/mediatomb etc/mediatomb/config.xml.dist -@exec mkdir -m %%MEDIATOMB_MASK%% -p %D/etc/mediatomb -@exec chown %%MEDIATOMB_USER%%:%%MEDIATOMB_GROUP%% %D/etc/mediatomb -@exec chown %%MEDIATOMB_USER%%:%%MEDIATOMB_GROUP%% %D/etc/mediatomb/config.xml.dist -@exec chmod 640 %D/etc/mediatomb/config.xml.dist -@exec [ -f %B/config.xml ] || cp -p %B/%f %B/config.xml -@unexec rmdir %%MEDIATOMB_DIR%% 2>/dev/null 1>&2 || true -@exec mkdir -m %%MEDIATOMB_MASK%% -p %%MEDIATOMB_DIR%% -@exec chown %%MEDIATOMB_USER%%:%%MEDIATOMB_GROUP%% %%MEDIATOMB_DIR%% -@dirrm %%DATADIR%%/js -@dirrm %%DATADIR%%/web/icons/nanotree/images -@dirrm %%DATADIR%%/web/icons/nanotree -@dirrm %%DATADIR%%/web/icons -@dirrm %%DATADIR%%/web/js -@dirrm %%DATADIR%%/web -@dirrm %%DATADIR%% +@dir %%DATADIR%%/js +@dir %%DATADIR%%/web/icons/nanotree/images +@dir %%DATADIR%%/web/icons/nanotree +@dir %%DATADIR%%/web/icons +@dir %%DATADIR%%/web/js +@dir %%DATADIR%%/web +@dir %%DATADIR%% +@dir(mediatomb,mediatomb,750) /var/log/mediatomb +@dir(mediatomb,mediatomb,750) /var/db/mediatomb |