2 # - merge dstreamserv.spec
3 %include /usr/lib/rpm/macros.perl
5 Summary: Darwin Streaming Server
9 License: Apple Public Source License
10 Group: Networking/Daemons
11 Source0: http://dss.macosforge.org/downloads/DarwinStreamingSrvr%{version}-Source.tar
12 # Source0-md5: ca676691db8417d05121699c0ca3d549
14 Source2: %{name}-admin.init
17 Patch1: %{name}-x86_64.patch
18 Patch2: optflags.patch
20 URL: http://dss.macosforge.org/
21 BuildRequires: libstdc++-devel
22 BuildRequires: rpm-perlprov >= 4.1-13
23 BuildRequires: rpmbuild(macros) >= 1.228
24 Requires(post,preun): /sbin/chkconfig
25 Requires(postun): /usr/sbin/groupdel
26 Requires(postun): /usr/sbin/userdel
27 Requires(pre): /bin/id
28 Requires(pre): /usr/bin/getgid
29 Requires(pre): /usr/sbin/groupadd
30 Requires(pre): /usr/sbin/useradd
35 Obsoletes: dstreamserv
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 Darwin Streaming Server lets you stream digital video on the Internet
41 using industry-standard Internet protocols RTP and RTSP.
43 Using Darwin Streaming Server you can serve stored files (video on
44 demand) or reflect live broadcasts to thousands of QuickTime 4 or
45 later users. With its combination of industry-standard streaming
46 protocols and cutting-edge compression technologies, QuickTime
47 delivers perfectly synchronized audio and video streams ideal for
48 Internet video and live events.
50 %description -l pl.UTF-8
51 Serwer strumieni pozwala wysyłać strumienie danych QuickTime do
52 klientów w Internecie przy użyciu protokołów RTP i RTSP.
55 Summary: Apple's Darwin Streaming Proxy
57 Requires: %{name} = %{version}-%{release}
60 The Darwin Streaming Proxy is an application specific proxy which
61 would normally be run in a border zone or perimeter network. It is
62 used to give client machines within a protected network access to
63 streaming servers outside that network, in the case when the firewall
64 blocks RTSP connections or RTP/UDP data flow. The firewall perimeter
65 network is usually configured to allow:
67 - RTSP connections from within the network, as long as the destination
70 - RTSP connections to outside the network, as long as the source is
73 - RTP datagrams to and from the proxy to the inner network
75 - RTP datagrams to and from the proxy to the outside
78 Summary: Apple's Darwin Streaming Server Movie inspection utilities
80 Requires: %{name} = %{version}-%{release}
83 Apple's Darwin Streaming Server Movie inspection utilities.
86 Summary: Darwin Streaming Server - samples
87 Summary(pl.UTF-8): Przykłady do Darwin Streaming Servera
88 Group: Networking/Daemons
89 Requires: %{name} = %{version}-%{release}
90 Obsoletes: dstreamserv-samples
93 Sample files for Streaming Server.
95 %description samples -l pl.UTF-8
96 Przykładowe pliki do Darwin Streaming Servera.
99 %setup -q -n DarwinStreamingSrvr%{version}-Source
106 # patch streamingadminserver.pl
108 s|/''usr/local/movies|/var/lib/%{name}/movies|g
109 s|/''usr/local/sbin/StreamingServerModules|%{_libdir}/%{name}/|g
110 s|/''usr/local/|%{_prefix}/|g
111 s|/''etc/streaming|%{_sysconfdir}/%{name}|g
112 s|/var/streaming/AdminHtml|%{_datadir}/%{name}/AdminHtml|g
113 s|/var/streaming/logs|/var/log/%{name}|g
114 s|/var/streaming/|/var/lib/%{name}/|g
115 s|<PREF NAME="run_user_name"></PREF>|<PREF NAME="run_user_name">qtss</PREF>|
116 s|<PREF NAME="run_group_name"></PREF>|<PREF NAME="run_group_name">qtss</PREF>|
117 ' DSS_MakeRoot streamingserver.xml-POSIX \
118 WebAdmin/src/streamingadminserver.pl \
119 WebAdmin/WebAdminHtml/adminprotocol-lib.pl
123 s|/Library/QuickTimeStreaming/Config/|%{_sysconfdir}/%{name}/|g
124 s|/Library/QuickTimeStreaming/Modules|%{_libdir}/%{name}|g
125 s|/Library/QuickTimeStreaming/Movies|/var/lib/%{name}/movies|g
126 s|/Library/QuickTimeStreaming/Playlists|/var/lib/%{name}/playlists|g
127 s|/Library/QuickTimeStreaming/Logs|/var/log/%{name}|g
128 s|/Library/QuickTimeStreaming/Docs|%{_docdir}/%{name}-%{version}|g
129 s|QuickTimeStreamingServer|DarwinStreamingServer|g
130 ' Documentation/man/qtss/*
132 cat > defaultPaths.h << 'EOF'
133 #define DEFAULTPATHS_DIRECTORY_SEPARATOR "/"
134 #define DEFAULTPATHS_ROOT_DIR "/var/lib/%{name}/"
135 #define DEFAULTPATHS_ETC_DIR "%{_sysconfdir}/%{name}/"
136 #define DEFAULTPATHS_ETC_DIR_OLD "%{_sysconfdir}/"
137 #define DEFAULTPATHS_SSM_DIR "%{_libdir}/%{name}/"
138 #define DEFAULTPATHS_LOG_DIR "/var/log/%{name}/"
139 #define DEFAULTPATHS_PID_DIR "/var/run/"
140 #define DEFAULTPATHS_MOVIES_DIR "/var/lib/%{name}/movies/"
144 export RPM_OPT_FLAGS="%{rpmcflags}"
145 export ARCH="%{_target_cpu}"
147 export CXX="%{__cxx}"
149 jobs=$(echo %{_smp_mflags} | cut -dj -f2)
150 ./Buildit ${jobs:+--jobs=$jobs}
153 rm -rf $RPM_BUILD_ROOT
154 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/lib/%{name},%{_mandir}/man{1,8}}
158 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
159 install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-admin
162 mv $RPM_BUILD_ROOT%{_sbindir}/streamingadminserver{.pl,}
165 install -p QTFileTools/QTBroadcaster.tproj/QTBroadcaster $RPM_BUILD_ROOT%{_bindir}
166 install -p QTFileTools/QTFileInfo.tproj/QTFileInfo $RPM_BUILD_ROOT%{_bindir}
167 install -p QTFileTools/QTFileTest.tproj/QTFileTest $RPM_BUILD_ROOT%{_bindir}
168 install -p QTFileTools/QTRTPFileTest.tproj/QTRTPFileTest $RPM_BUILD_ROOT%{_bindir}
169 install -p QTFileTools/QTRTPGen.tproj/QTRTPGen $RPM_BUILD_ROOT%{_bindir}
170 install -p QTFileTools/QTSampleLister.tproj/QTSampleLister $RPM_BUILD_ROOT%{_bindir}
171 install -p QTFileTools/QTSDPGen.tproj/QTSDPGen $RPM_BUILD_ROOT%{_bindir}
172 install -p QTFileTools/QTTrackInfo.tproj/QTTrackInfo $RPM_BUILD_ROOT%{_bindir}
175 install -p APIModules/QTSSRawFileModule.bproj/QTSSRawFileModule $RPM_BUILD_ROOT%{_libdir}/%{name}
178 cp -a qtaccess $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
180 # Create our default admin user and remove Apple's
181 # Default login is root/pld -- please change it!
183 $RPM_BUILD_ROOT%{_bindir}/qtpasswd \
184 -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/qtusers
185 -g $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/qtgroups"
186 $qtpasswd root -p pld -A admin
187 $qtpasswd -F -d 'aGFja21l'
189 mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/relayconfig.xml{-Sample,}
190 rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/streamingserver.xml-sample
192 # streamingadminserver
193 cp -a WebAdmin/streamingadminserver.pem $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
196 cp -a Documentation/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
197 cp -a Documentation/man/qtss/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
198 cp -a Documentation/man/qtss/createuserstreamingdir.8 $RPM_BUILD_ROOT%{_mandir}/man8
199 cp -a Documentation/man/qtss/QuickTimeStreamingServer.8 $RPM_BUILD_ROOT%{_mandir}/man8/DarwinStreamingServer.8
200 cp -a Documentation/man/qtss/streamingadminserver.pl.8 $RPM_BUILD_ROOT%{_mandir}/man8/streamingadminserver.8
201 rm $RPM_BUILD_ROOT/var/lib/%{name}/3rdPartyAcknowledgements.rtf
202 rm $RPM_BUILD_ROOT/var/lib/%{name}/readme.txt
204 # provide ghost logs...
205 touch $RPM_BUILD_ROOT/var/log/%{name}/Error.log
206 touch $RPM_BUILD_ROOT/var/log/%{name}/StreamingServer.log
207 touch $RPM_BUILD_ROOT/var/log/%{name}/mp3_access.log
208 touch $RPM_BUILD_ROOT/var/log/%{name}/server_status
209 touch $RPM_BUILD_ROOT/var/log/%{name}/streamingadminserver.log
212 rm -rf $RPM_BUILD_ROOT
215 %groupadd -f -g 148 qtss
216 %useradd -g qtss -d /tmp -u 148 -s /bin/false qtss
219 for a in StreamingServer.log mp3_access.log server_status streamingadminserver.log ; do
221 if [ ! -f $log ]; then
222 install -o root -g dss -m 0660 /dev/null $log
225 /sbin/chkconfig --add %{name}
226 /sbin/chkconfig --add %{name}-admin
227 %service %{name} restart
228 %service %{name}-admin restart
230 if [ "$1" = "1" ]; then
231 %banner %{name} -e <<-EOF
232 Default admin username/password is root/pld. Set a password for it or, better
233 delete it and create new admin username and password (using qtpasswd)
235 Access admin interface at:
236 http://localhost:1220/
241 if [ "$1" = "0" ]; then
242 %service -q %{name} stop
243 %service -q %{name}-admin stop
244 /sbin/chkconfig --del %{name}
245 /sbin/chkconfig --del %{name}-admin
249 if [ "$1" = "0" ]; then
255 %defattr(644,root,root,755)
256 %doc APPLE_LICENSE ReleaseNotes.txt
257 %doc Documentation/3rdPartyAcknowledgements.rtf
258 %doc Documentation/AboutQTFileTools.html
259 %doc Documentation/AboutTheSource.html
260 %doc Documentation/admin-protocol-README.txt
261 %doc Documentation/CachingProxyProtocol-README.txt
262 %doc Documentation/DevNotes.html
263 %doc Documentation/draft-serenyi-avt-rtp-meta-00.txt
264 %doc Documentation/DSS_QT_Logo_License.pdf
265 %doc Documentation/License.rtf
266 %doc Documentation/QTSSAPIDocs.pdf
267 %doc Documentation/ReadMe.rtf
268 %doc Documentation/readme.txt
269 %doc Documentation/ReliableRTP_WhitePaper.rtf
270 %doc Documentation/RTSP_Over_HTTP.pdf
272 %dir %{_sysconfdir}/%{name}
273 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/qtgroups
274 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/qtusers
275 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/relayconfig.xml
276 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/streamingloadtool.conf
277 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/streamingserver.xml
278 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/qtaccess
279 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/streamingadminserver.pem
281 %attr(754,root,root) /etc/rc.d/init.d/dss
282 %attr(754,root,root) /etc/rc.d/init.d/dss-admin
283 %attr(755,root,root) %{_bindir}/MP3Broadcaster
284 %attr(755,root,root) %{_bindir}/PlaylistBroadcaster
285 %attr(755,root,root) %{_bindir}/StreamingLoadTool
286 %attr(755,root,root) %{_bindir}/createuserstreamingdir
287 %attr(755,root,root) %{_bindir}/qtpasswd
289 %attr(755,root,root) %{_sbindir}/DarwinStreamingServer
290 %attr(755,root,root) %{_sbindir}/streamingadminserver
295 %dir %{_libdir}/%{name}
296 %attr(755,root,root) %{_libdir}/%{name}/QTSSHomeDirectoryModule
297 %attr(755,root,root) %{_libdir}/%{name}/QTSSRefMovieModule
299 %attr(755,root,root) %{_libdir}/dss/QTSSRawFileModule
301 %dir /var/lib/%{name}
302 %dir /var/lib/%{name}/movies
304 %dir /var/log/%{name}
305 %attr(644,qtss,qtss) %verify(not md5 mtime size) %ghost /var/log/%{name}/Error.log
306 %attr(644,qtss,qtss) %verify(not md5 mtime size) %ghost /var/log/%{name}/StreamingServer.log
307 %attr(644,qtss,qtss) %verify(not md5 mtime size) %ghost /var/log/%{name}/mp3_access.log
308 %attr(644,qtss,qtss) %verify(not md5 mtime size) %ghost /var/log/%{name}/server_status
309 %attr(644,qtss,qtss) %verify(not md5 mtime size) %ghost /var/log/%{name}/streamingadminserver.log
311 # admin server (subpackage?)
312 %dir %{_datadir}/%{name}
313 %dir %{_datadir}/%{name}/AdminHtml
314 %{_datadir}/%{name}/AdminHtml/html_en
315 %{_datadir}/%{name}/AdminHtml/images
316 %{_datadir}/%{name}/AdminHtml/includes
317 %{_datadir}/%{name}/AdminHtml/*.html
318 %{_datadir}/%{name}/AdminHtml/*.pl
319 %attr(755,root,root) %{_datadir}/%{name}/AdminHtml/*.cgi
322 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_bindir}/QTBroadcaster
325 %attr(755,root,root) %{_bindir}/QTFileInfo
326 %attr(755,root,root) %{_bindir}/QTFileTest
327 %attr(755,root,root) %{_bindir}/QTRTPFileTest
328 %attr(755,root,root) %{_bindir}/QTRTPGen
329 %attr(755,root,root) %{_bindir}/QTSDPGen
330 %attr(755,root,root) %{_bindir}/QTSampleLister
331 %attr(755,root,root) %{_bindir}/QTTrackInfo
334 %defattr(644,root,root,755)
335 /var/lib/%{name}/movies/*