View | Details | Raw Unified | Return to bug 191646 | Differences between
and this patch

Collapse All | Expand All

(-)ports/GIDs (+1 lines)
Lines 282-286 Link Here
282
radicale:*:974:
282
radicale:*:974:
283
unifi:*:975:
283
unifi:*:975:
284
minetest:*:976:
284
minetest:*:976:
285
ums:*:979:
285
nogroup:*:65533:
286
nogroup:*:65533:
286
nobody:*:65534:
287
nobody:*:65534:
(-)ports/UIDs (+1 lines)
Lines 288-291 Link Here
288
minetest:*:976:976::0:0:& server:/nonexistent:/usr/sbin/nologin
288
minetest:*:976:976::0:0:& server:/nonexistent:/usr/sbin/nologin
289
tests:*:977:65534::0:0:Unprivileged user for tests:/nonexistent:/usr/sbin/nologin
289
tests:*:977:65534::0:0:Unprivileged user for tests:/nonexistent:/usr/sbin/nologin
290
_dnscrypt-proxy:*:978:65534::0:0:dnscrypt-proxy user:/var/empty:/usr/sbin/nologin
290
_dnscrypt-proxy:*:978:65534::0:0:dnscrypt-proxy user:/var/empty:/usr/sbin/nologin
291
ums:*:979:979::0:0:Universal Media Server:/nonexistent:/usr/sbin/nologin
291
nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin
292
nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin
(-)ports/multimedia/Makefile (+1 lines)
Lines 346-351 Link Here
346
    SUBDIR += umph
346
    SUBDIR += umph
347
    SUBDIR += umplayer
347
    SUBDIR += umplayer
348
    SUBDIR += umr
348
    SUBDIR += umr
349
    SUBDIR += universal-media-server
349
    SUBDIR += v4l-utils
350
    SUBDIR += v4l-utils
350
    SUBDIR += v4l_compat
351
    SUBDIR += v4l_compat
351
    SUBDIR += vamps
352
    SUBDIR += vamps
(-)ports/multimedia/universal-media-server/Makefile (+81 lines)
Line 0 Link Here
1
# Created by: Dreamcat4 <dreamcat4@gmail.com>
2
# $FreeBSD$
3
4
PORTNAME=	universal-media-server
5
DISTVERSION=	4.0.0-a1
6
CATEGORIES=	multimedia
7
MASTER_SITES=	SF/unimediaserver/Official%20Releases/Linux
8
DISTFILES=	UMS-${DISTVERSION}.tgz
9
10
MAINTAINER=	dreamcat4@gmail.com
11
COMMENT=	Universal Media Server
12
13
LICENSE=	GPLv2
14
15
USE_JAVA=	yes
16
JAVA_VERSION=	1.7+
17
JAVA_VENDOR=	openjdk
18
JAVA_RUN=	true
19
20
OPTIONS_DEFINE=		MEDIAINFO FLAC DCRAW TSMUXER FFMPEG MPLAYER VLC MENCODER
21
OPTIONS_DEFAULT=	MEDIAINFO FLAC DCRAW TSMUXER
22
23
MEDIAINFO_DESC=		Metadata information about video & audio files
24
MEDIAINFO_LIB_DEPENDS=	libmediainfo.so:${PORTSDIR}/multimedia/mediainfo
25
26
#FFMPEG_DESC=		# Transcoder. Use default description
27
FFMPEG_RUN_DEPENDS=	${LOCALBASE}/bin/ffmpeg:${PORTSDIR}/multimedia/ffmpeg
28
29
MPLAYER_DESC=		Transcoder. Pulls in X11 libs
30
MPLAYER_RUN_DEPENDS=	${LOCALBASE}/bin/mplayer:${PORTSDIR}/multimedia/mplayer
31
32
VLC_DESC=		Videolan.org binary 'vlc'. For live web streaming
33
VLC_RUN_DEPENDS=	${LOCALBASE}/bin/vlc:${PORTSDIR}/multimedia/vlc
34
35
MENCODER_DESC=		Transcoder (license Restricted). Not in pkgng
36
MENCODER_RUN_DEPENDS=	${LOCALBASE}/bin/mencoder:${PORTSDIR}/multimedia/mencoder
37
38
TSMUXER_DESC=		To remux streams as TS/M2TS. Requires linux_base
39
TSMUXER_RUN_DEPENDS=	${LOCALBASE}/bin/tsMuxeR:${PORTSDIR}/multimedia/linux-tsmuxer
40
41
#FLAC_DESC=		# Audio file format. Use default description
42
FLAC_RUN_DEPENDS=	${LOCALBASE}/bin/flac:${PORTSDIR}/audio/flac
43
44
DCRAW_DESC=		Better support when viewing photos / still images
45
DCRAW_RUN_DEPENDS=	${LOCALBASE}/bin/dcraw:${PORTSDIR}/graphics/dcraw
46
47
NO_BUILD=		yes
48
WRKSRC=			${WRKDIR}/ums-${DISTVERSION}
49
DATADIR=		${JAVASHAREDIR}/${PORTNAME}
50
USERS=			ums
51
GROUPS=			ums
52
UMS_PROFILE_PATH=	/var/db/${PORTNAME}
53
UMS_LOG_DIR=		/var/log/${PORTNAME}
54
UMS_PID_DIR=		/var/run/${PORTNAME}
55
56
SUB_LIST=	RCNAME=${USE_RC_SUBR} JAVA_HOME=${JAVA_HOME} JAVA=${JAVA} \
57
		UMS_PROFILE_PATH=${UMS_PROFILE_PATH} UMS_LOG_DIR=${UMS_LOG_DIR} UMS_PID_DIR=${UMS_PID_DIR}
58
PLIST_SUB=	${SUB_LIST}
59
SUB_FILES=	pkg-message
60
USE_RC_SUBR=	universal_media_server
61
62
.include <bsd.port.pre.mk>
63
64
do-install:
65
		@${MKDIR} ${STAGEDIR}${UMS_PROFILE_PATH}
66
		@${CP} ${WRKSRC}/UMS.conf ${STAGEDIR}${UMS_PROFILE_PATH}/UMS.conf.sample
67
		@${CP} ${WRKSRC}/WEB.conf ${STAGEDIR}${UMS_PROFILE_PATH}/WEB.conf.sample
68
		@${MKDIR} ${STAGEDIR}${UMS_PID_DIR}
69
		@${MKDIR} ${STAGEDIR}${UMS_LOG_DIR}
70
71
		@${MKDIR} ${STAGEDIR}${DOCSDIR}
72
		@(cd ${WRKSRC}/documentation && ${COPYTREE_SHARE} \* ${STAGEDIR}${DOCSDIR})
73
		@(cd ${WRKSRC} && ${RM} -rf documentation)
74
75
		@(cd ${WRKSRC}/linux && ${RM} -rf *)
76
		@(cd ${WRKSRC}/linux && ${LN} -sf ${PREFIX}/bin/tsMuxeR tsMuxeR-new)
77
78
		@${MKDIR} ${STAGEDIR}${DATADIR}
79
		@(cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR})
80
81
.include <bsd.port.post.mk>
(-)ports/multimedia/universal-media-server/distinfo (+2 lines)
Line 0 Link Here
1
SHA256 (UMS-4.0.0-a1.tgz) = 054988dd3ceb98d2ef93a1214f31b3834d1a69e12ad37b41a46294afccad61fe
2
SIZE (UMS-4.0.0-a1.tgz) = 31503844
(-)ports/multimedia/universal-media-server/files/pkg-message.in (+36 lines)
Line 0 Link Here
1
2
Universal Media Server (UMS) can be enabled with the following way:
3
4
  sysrc   %%RCNAME%%_enable=YES
5
  service %%RCNAME%% start
6
7
For more configuration options, see the file:
8
9
  /usr/local/etc/rc.d/%%RCNAME%%
10
11
The UMS profile directory, where exists UMS.conf, is located at:
12
13
  %%UMS_PROFILE_PATH%%/
14
15
Log files are located at:
16
17
  %%UMS_LOG_DIR%%/UMS.log
18
  %%UMS_PROFILE_PATH%%/debug.log
19
20
NOTE: None of the following transcoders are installed by default
21
ffmpeg, mplayer, vlc, mencoder
22
23
These missing transcoders each have a lot of dependancies of their 
24
own. That is why they are not included by default with UMS.
25
UMS will automatically detect any missing transcoder once it has
26
been installed. Either from the ports tree or pkgng.
27
28
NOTE: Mencoder is license restricted and therefore NOT available 
29
from pkgng. It can be installed from the ports tree instead.
30
31
To install all missing transcoders: (beware, many dependancies)
32
33
  pkg install ffmpeg mplayer vlc
34
  cd /usr/ports/multimedia/mencoder && BATCH=YES make install
35
  service %%RCNAME%% restart
36
(-)ports/multimedia/universal-media-server/files/universal_media_server.in (+114 lines)
Line 0 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
# Created by: Dreamcat4 <dreamcat4@gmail.com>
5
#
6
# PROVIDE: universal_media_server
7
# REQUIRE: LOGIN DAEMON NETWORKING
8
# KEYWORD: shutdown
9
# 
10
# To enable Universal Media Server, just type:
11
# sysrc universal_media_server_enable=YES
12
# 
13
# Optional settings:
14
# universal_media_server_user=<run UMS program as 'user'>
15
# universal_media_server_profile_path=<full path to UMS profile directory, where exists UMS.conf, cache files, etc.>
16
# universal_media_server_log=<full path to UMS.log>
17
# universal_media_server_jvm_max_heap=<max memory usage - defaults to '768M'>
18
# universal_media_server_java_opts_extra="<extra java options>"
19
# 
20
# Advanced settings, better to leave alone:
21
# universal_media_server_java_class=<java main class to load (program entry point)>
22
# universal_media_server_path=<full path to the directory where ums is installed>
23
# universal_media_server_classpath=<colon-seperated list of all jar files to load, must include ums.jar)>
24
# universal_media_server_jvm_opts="<overides default jvm-related java options with your own set>"
25
# universal_media_server_java_opts="<overide default java options with your own set>"
26
#
27
28
. /etc/rc.subr
29
30
name=universal_media_server
31
rcvar=universal_media_server_enable
32
load_rc_config $name
33
34
: ${universal_media_server_enable=NO}
35
36
# Optional settings
37
: ${universal_media_server_user=ums}
38
: ${universal_media_server_jvm_max_heap=768M}
39
: ${universal_media_server_profile_path=%%UMS_PROFILE_PATH%%}
40
: ${universal_media_server_log=%%UMS_LOG_DIR%%/UMS.log}
41
42
# Advanced settings, better to leave alone
43
: ${universal_media_server_path=%%DATADIR%%}
44
: ${universal_media_server_java_class=net.pms.PMS}
45
: ${universal_media_server_classpath=ums.jar}
46
: ${universal_media_server_jvm_opts=-Xss2048k -XX:+UseParNewGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20}
47
: ${universal_media_server_java_opts=-Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Djna.nosys=true}
48
# End - "Advanced settings"
49
50
JAVA_HOME=%%JAVA_HOME%%
51
JAVA=%%JAVA%%
52
53
pidfile=%%UMS_PID_DIR%%/UMS.pid
54
start_precmd=${name}_prestart
55
start_postcmd=${name}_poststart
56
stop_precmd=${name}_prestop
57
stop_postcmd="rm ${pidfile}"
58
59
universal_media_server_prestart()
60
{
61
  if [ ! -e "${universal_media_server_profile_path}" ]; then
62
    mkdir -p ${universal_media_server_profile_path}
63
    cp "${universal_media_server_path}/UMS.conf" "${universal_media_server_profile_path}/UMS.conf.sample"
64
    cp "${universal_media_server_path}/WEB.conf" "${universal_media_server_profile_path}/WEB.conf.sample"
65
  fi
66
67
  # Make sure UMS has permission to write it's files into the profile directory
68
  chown -R ${universal_media_server_user}:${universal_media_server_user} ${universal_media_server_profile_path}
69
}
70
71
universal_media_server_poststart()
72
{
73
  echo "$(pgrep -n -f "java.*${universal_media_server_classpath}.*${universal_media_server_java_class}")" > ${pidfile}
74
}
75
76
universal_media_server_prestop()
77
{
78
  ppid=$(head -1 ${pidfile})
79
  cpids=$(pgrep -d ' ' -P ${ppid})
80
  
81
  if [ "${cpids}" ]; then
82
    echo "Waiting for PIDS: ${cpids}"
83
    for signal in "TERM" "KILL" "HUP" "INT" "QUIT"       
84
    do
85
      pkill -${signal} -P ${ppid}
86
      cpids=$(pgrep -d ' ' -P ${ppid})
87
      [ "${cpids}" ] || break;
88
      sleep 1;
89
    done
90
  fi
91
}
92
93
_universal_media_server_java_args()
94
{
95
  echo \
96
  -Xmx${universal_media_server_jvm_max_heap} \
97
  ${universal_media_server_jvm_opts} \
98
  ${universal_media_server_java_opts} \
99
  ${universal_media_server_java_opts_extra} \
100
  -Dums.profile.path=${universal_media_server_profile_path} \
101
  -classpath ${universal_media_server_classpath} \
102
  ${universal_media_server_java_class}
103
}
104
105
# UMS looks for transcoder executables on $PATH, so PATH must include %%PREFIX%%/bin
106
PATH=/sbin:/bin:/usr/sbin:/usr/bin:%%PREFIX%%/sbin:%%PREFIX%%/bin
107
108
# UMS will only startup correctly when CWD=/path/to/ums, otherwise a bizarre exception occurs
109
universal_media_server_chdir=${universal_media_server_path}
110
111
command=${JAVA}
112
command_args="$(_universal_media_server_java_args) >> ${universal_media_server_log} 2>&1 &"
113
114
run_rc_command "$1"
(-)ports/multimedia/universal-media-server/pkg-descr (+13 lines)
Line 0 Link Here
1
Universal Media Server (UMS) is a feature-rich DLNA/UPnP home media
2
server good support for client devices.
3
4
A popular fork / successor of PS3 Media Server. UMS is Java-based. 
5
The program streams or transcodes with little or no configuration.
6
7
Powered by MEncoder, FFmpeg, tsMuxeR, AviSynth, MediaInfo and more,
8
which combine to offer support for a wide range of media formats.
9
10
WWW: http://sourceforge.net/projects/unimediaserver/
11
12
NOTE: Missing transcoder dependancies can be installed seperately.
13
See files/pkg-message.in for more information.
(-)ports/multimedia/universal-media-server/pkg-plist (+150 lines)
Line 0 Link Here
1
%%PORTDOCS%%%%DOCSDIR%%/applications.html
2
%%PORTDOCS%%%%DOCSDIR%%/avisynth.html
3
%%PORTDOCS%%%%DOCSDIR%%/coreavc.html
4
%%PORTDOCS%%%%DOCSDIR%%/css/style.css
5
%%PORTDOCS%%%%DOCSDIR%%/general_configuration.html
6
%%PORTDOCS%%%%DOCSDIR%%/images/autonegotiation.jpg
7
%%PORTDOCS%%%%DOCSDIR%%/images/btn_donateCC_LG.gif
8
%%PORTDOCS%%%%DOCSDIR%%/images/coreavc1.jpg
9
%%PORTDOCS%%%%DOCSDIR%%/images/coreavc2.jpg
10
%%PORTDOCS%%%%DOCSDIR%%/images/coreavc3.jpg
11
%%PORTDOCS%%%%DOCSDIR%%/images/netzwerkverbindungen.jpg
12
%%PORTDOCS%%%%DOCSDIR%%/images/pms-eng-general.jpg
13
%%PORTDOCS%%%%DOCSDIR%%/images/pms-eng-general1.jpg
14
%%PORTDOCS%%%%DOCSDIR%%/images/pms-eng-status1.jpg
15
%%PORTDOCS%%%%DOCSDIR%%/images/pms-eng-status2.jpg
16
%%PORTDOCS%%%%DOCSDIR%%/images/pms-engines1.jpg
17
%%PORTDOCS%%%%DOCSDIR%%/images/pms-engines2.jpg
18
%%PORTDOCS%%%%DOCSDIR%%/images/pms-searching.jpg
19
%%PORTDOCS%%%%DOCSDIR%%/images/ps3-browsing.jpg
20
%%PORTDOCS%%%%DOCSDIR%%/images/ps3-server.jpg
21
%%PORTDOCS%%%%DOCSDIR%%/images/ps3screen.jpg
22
%%PORTDOCS%%%%DOCSDIR%%/images/setupwin1.jpg
23
%%PORTDOCS%%%%DOCSDIR%%/images/setupwin2.jpg
24
%%PORTDOCS%%%%DOCSDIR%%/images/setupwin3.jpg
25
%%PORTDOCS%%%%DOCSDIR%%/images/setupwin4.jpg
26
%%PORTDOCS%%%%DOCSDIR%%/images/ssdp.jpg
27
%%PORTDOCS%%%%DOCSDIR%%/images/topology_ps3.jpg
28
%%PORTDOCS%%%%DOCSDIR%%/index.html
29
%%PORTDOCS%%%%DOCSDIR%%/installation.html
30
%%PORTDOCS%%%%DOCSDIR%%/introduction.html
31
%%PORTDOCS%%%%DOCSDIR%%/links.html
32
%%PORTDOCS%%%%DOCSDIR%%/navigation_share.html
33
%%PORTDOCS%%%%DOCSDIR%%/networking.html
34
%%PORTDOCS%%%%DOCSDIR%%/plugins.html
35
%%PORTDOCS%%%%DOCSDIR%%/transcoding.html
36
%%PORTDOCS%%%%DOCSDIR%%/videolan.html
37
%%DATADIR%%/CHANGELOG.txt
38
%%DATADIR%%/DummyInput.ass
39
%%DATADIR%%/INSTALL.txt
40
%%DATADIR%%/LICENSE.txt
41
%%DATADIR%%/README.txt
42
%%DATADIR%%/UMS.conf
43
%%DATADIR%%/UMS.sh
44
%%DATADIR%%/VirtualFolders.conf
45
%%DATADIR%%/WEB.conf
46
%%DATADIR%%/linux/tsMuxeR-new
47
%%DATADIR%%/logback.headless.xml
48
%%DATADIR%%/logback.xml
49
%%DATADIR%%/plugins/README.md
50
%%DATADIR%%/plugins/README.txt
51
%%DATADIR%%/renderers/AirPlayer.conf
52
%%DATADIR%%/renderers/Android.conf
53
%%DATADIR%%/renderers/BlackBerryPlayBook-KalemSoftMP.conf
54
%%DATADIR%%/renderers/Bravia4500.conf
55
%%DATADIR%%/renderers/Bravia5500.conf
56
%%DATADIR%%/renderers/BraviaBX305.conf
57
%%DATADIR%%/renderers/BraviaEX.conf
58
%%DATADIR%%/renderers/BraviaEX620.conf
59
%%DATADIR%%/renderers/BraviaHX.conf
60
%%DATADIR%%/renderers/BraviaW.conf
61
%%DATADIR%%/renderers/CambridgeAudioAzur752BD.conf
62
%%DATADIR%%/renderers/Chromecast.conf
63
%%DATADIR%%/renderers/Chromecast_Avia.conf
64
%%DATADIR%%/renderers/DLinkDSM510.conf
65
%%DATADIR%%/renderers/DirecTVHR.conf
66
%%DATADIR%%/renderers/FreeboxHD.conf
67
%%DATADIR%%/renderers/FreecomMusicPal.conf
68
%%DATADIR%%/renderers/Kuro.conf
69
%%DATADIR%%/renderers/LG-LA6200.conf
70
%%DATADIR%%/renderers/LG-LA644V.conf
71
%%DATADIR%%/renderers/LG-LM620.conf
72
%%DATADIR%%/renderers/LGST600.conf
73
%%DATADIR%%/renderers/N900.conf
74
%%DATADIR%%/renderers/NetgearNeoTV.conf
75
%%DATADIR%%/renderers/OPPOBDP83.conf
76
%%DATADIR%%/renderers/OPPOBDP93.conf
77
%%DATADIR%%/renderers/OnkyoTX-NR717.conf
78
%%DATADIR%%/renderers/PS3.conf
79
%%DATADIR%%/renderers/Panasonic.conf
80
%%DATADIR%%/renderers/PanasonicTX-L32V10E.conf
81
%%DATADIR%%/renderers/Philips.conf
82
%%DATADIR%%/renderers/PhilipsPFL.conf
83
%%DATADIR%%/renderers/PopcornHour.conf
84
%%DATADIR%%/renderers/README.txt
85
%%DATADIR%%/renderers/Realtek.conf
86
%%DATADIR%%/renderers/SMP-N100.conf
87
%%DATADIR%%/renderers/Samsung-SMT-G7400.conf
88
%%DATADIR%%/renderers/SamsungAllShare-D7000.conf
89
%%DATADIR%%/renderers/SamsungAllShare.conf
90
%%DATADIR%%/renderers/SamsungMobile.conf
91
%%DATADIR%%/renderers/SamsungWiseLink.conf
92
%%DATADIR%%/renderers/SharpAquos.conf
93
%%DATADIR%%/renderers/Showtime3.conf
94
%%DATADIR%%/renderers/Showtime4.conf
95
%%DATADIR%%/renderers/SonyBluray.conf
96
%%DATADIR%%/renderers/SonyHomeTheatreSystem.conf
97
%%DATADIR%%/renderers/SonySTR-5800ES.conf
98
%%DATADIR%%/renderers/SonyXperia.conf
99
%%DATADIR%%/renderers/Streamium.conf
100
%%DATADIR%%/renderers/TelstraTbox.conf
101
%%DATADIR%%/renderers/VideoWebTV.conf
102
%%DATADIR%%/renderers/VizioSmartTV.conf
103
%%DATADIR%%/renderers/WDTVLive.conf
104
%%DATADIR%%/renderers/WMP.conf
105
%%DATADIR%%/renderers/XBMC.conf
106
%%DATADIR%%/renderers/XBOX360.conf
107
%%DATADIR%%/renderers/YamahaRXA1010.conf
108
%%DATADIR%%/renderers/YamahaRXV3900.conf
109
%%DATADIR%%/renderers/YamahaRXV671.conf
110
%%DATADIR%%/renderers/iPad-iPhone.conf
111
%%DATADIR%%/ums.jar
112
%%DATADIR%%/web/background-blank.jpg
113
%%DATADIR%%/web/background.jpg
114
%%DATADIR%%/web/download.png
115
%%DATADIR%%/web/favicon.ico
116
%%DATADIR%%/web/flowplayer.min.js
117
%%DATADIR%%/web/functional.css
118
%%DATADIR%%/web/jquery.min.js
119
%%DATADIR%%/web/jquery.ums.js
120
%%DATADIR%%/web/logo.png
121
%%DATADIR%%/web/menu-background-content.png
122
%%DATADIR%%/web/menu-left-content.png
123
%%DATADIR%%/web/reset.css
124
%%DATADIR%%/web/web.css
125
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%/css
126
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%/images
127
%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
128
@dirrmtry %%DATADIR%%/linux
129
@dirrmtry %%DATADIR%%/plugins
130
@dirrmtry %%DATADIR%%/renderers
131
@dirrmtry %%DATADIR%%/web
132
@dirrmtry %%DATADIR%%
133
134
@comment - Added manually
135
@owner ums
136
@group ums
137
138
@exec mkdir -p %%UMS_PROFILE_PATH%%
139
%%UMS_PROFILE_PATH%%/UMS.conf.sample
140
%%UMS_PROFILE_PATH%%/WEB.conf.sample
141
@dirrmtry %%UMS_PROFILE_PATH%%
142
143
@exec mkdir -p %%UMS_PID_DIR%%
144
@dirrmtry %%UMS_PID_DIR%%
145
146
@exec mkdir -p %%UMS_LOG_DIR%%
147
@dirrmtry %%UMS_LOG_DIR%%
148
149
@owner
150
@group

Return to bug 191646