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
16 Patch1: %{name}-x86_64.patch
17 Patch2: optflags.patch
19 URL: http://dss.macosforge.org/
20 BuildRequires: libstdc++-devel
21 BuildRequires: rpm-perlprov >= 4.1-13
22 BuildRequires: rpmbuild(macros) >= 1.228
23 Requires(post,preun): /sbin/chkconfig
24 Requires(postun): /usr/sbin/groupdel
25 Requires(postun): /usr/sbin/userdel
26 Requires(pre): /bin/id
27 Requires(pre): /usr/bin/getgid
28 Requires(pre): /usr/sbin/groupadd
29 Requires(pre): /usr/sbin/useradd
34 Obsoletes: dstreamserv
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 Darwin Streaming Server lets you stream digital video on the Internet
40 using industry-standard Internet protocols RTP and RTSP.
42 Using Darwin Streaming Server you can serve stored files (video on
43 demand) or reflect live broadcasts to thousands of QuickTime 4 or
44 later users. With its combination of industry-standard streaming
45 protocols and cutting-edge compression technologies, QuickTime
46 delivers perfectly synchronized audio and video streams ideal for
47 Internet video and live events.
49 %description -l pl.UTF-8
50 Serwer strumieni pozwala wysyłać strumienie danych QuickTime do
51 klientów w Internecie przy użyciu protokołów RTP i RTSP.
54 Summary: Apple's Darwin Streaming Proxy
56 Requires: %{name} = %{version}-%{release}
59 The Darwin Streaming Proxy is an application specific proxy which
60 would normally be run in a border zone or perimeter network. It is
61 used to give client machines within a protected network access to
62 streaming servers outside that network, in the case when the firewall
63 blocks RTSP connections or RTP/UDP data flow. The firewall perimeter
64 network is usually configured to allow:
66 - RTSP connections from within the network, as long as the destination
69 - RTSP connections to outside the network, as long as the source is
72 - RTP datagrams to and from the proxy to the inner network
74 - RTP datagrams to and from the proxy to the outside
77 Summary: Apple's Darwin Streaming Server Movie inspection utilities
79 Requires: %{name} = %{version}-%{release}
82 Apple's Darwin Streaming Server Movie inspection utilities.
85 Summary: Darwin Streaming Server - samples
86 Summary(pl.UTF-8): Przykłady do Darwin Streaming Servera
87 Group: Networking/Daemons
88 Requires: %{name} = %{version}-%{release}
89 Obsoletes: dstreamserv-samples
92 Sample files for Streaming Server.
94 %description samples -l pl.UTF-8
95 Przykładowe pliki do Darwin Streaming Servera.
98 %setup -q -n DarwinStreamingSrvr%{version}-Source
105 # patch streamingadminserver.pl
107 s|/''usr/local/movies|/var/lib/%{name}/movies|g
108 s|/''usr/local/sbin/StreamingServerModules|%{_libdir}/%{name}/|g
109 s|/''usr/local/|%{_prefix}/|g
110 s|/''etc/streaming|%{_sysconfdir}/%{name}|g
111 s|/var/streaming/AdminHtml|%{_datadir}/%{name}/AdminHtml|g
112 s|/var/streaming/logs|/var/log/%{name}|g
113 s|/var/streaming/|/var/lib/%{name}/|g
114 s|<PREF NAME="run_user_name"></PREF>|<PREF NAME="run_user_name">qtss</PREF>|
115 s|<PREF NAME="run_group_name"></PREF>|<PREF NAME="run_group_name">qtss</PREF>|
116 ' DSS_MakeRoot streamingserver.xml-POSIX \
117 WebAdmin/src/streamingadminserver.pl \
118 WebAdmin/WebAdminHtml/adminprotocol-lib.pl
122 s|/Library/QuickTimeStreaming/Config/|%{_sysconfdir}/%{name}/|g
123 s|/Library/QuickTimeStreaming/Modules|%{_libdir}/%{name}|g
124 s|/Library/QuickTimeStreaming/Movies|/var/lib/%{name}/movies|g
125 s|/Library/QuickTimeStreaming/Playlists|/var/lib/%{name}/playlists|g
126 s|/Library/QuickTimeStreaming/Logs|/var/log/%{name}|g
127 s|/Library/QuickTimeStreaming/Docs|%{_docdir}/%{name}-%{version}|g
128 s|QuickTimeStreamingServer|DarwinStreamingServer|g
129 ' Documentation/man/qtss/*
131 cat > defaultPaths.h << 'EOF'
132 #define DEFAULTPATHS_DIRECTORY_SEPARATOR "/"
133 #define DEFAULTPATHS_ROOT_DIR "/var/lib/%{name}/"
134 #define DEFAULTPATHS_ETC_DIR "%{_sysconfdir}/%{name}/"
135 #define DEFAULTPATHS_ETC_DIR_OLD "%{_sysconfdir}/"
136 #define DEFAULTPATHS_SSM_DIR "%{_libdir}/%{name}/"
137 #define DEFAULTPATHS_LOG_DIR "/var/log/%{name}/"
138 #define DEFAULTPATHS_PID_DIR "/var/run/"
139 #define DEFAULTPATHS_MOVIES_DIR "/var/lib/%{name}/movies/"
143 export RPM_OPT_FLAGS="%{rpmcflags}"
144 export ARCH="%{_target_cpu}"
146 export CXX="%{__cxx}"
148 jobs=$(echo %{_smp_mflags} | cut -dj -f2)
149 ./Buildit ${jobs:+--jobs=$jobs}
152 rm -rf $RPM_BUILD_ROOT
153 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/lib/%{name},%{_mandir}/man{1,8}}
157 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
160 mv $RPM_BUILD_ROOT%{_sbindir}/streamingadminserver{.pl,}
163 install -p QTFileTools/QTBroadcaster.tproj/QTBroadcaster $RPM_BUILD_ROOT%{_bindir}
164 install -p QTFileTools/QTFileInfo.tproj/QTFileInfo $RPM_BUILD_ROOT%{_bindir}
165 install -p QTFileTools/QTFileTest.tproj/QTFileTest $RPM_BUILD_ROOT%{_bindir}
166 install -p QTFileTools/QTRTPFileTest.tproj/QTRTPFileTest $RPM_BUILD_ROOT%{_bindir}
167 install -p QTFileTools/QTRTPGen.tproj/QTRTPGen $RPM_BUILD_ROOT%{_bindir}
168 install -p QTFileTools/QTSampleLister.tproj/QTSampleLister $RPM_BUILD_ROOT%{_bindir}
169 install -p QTFileTools/QTSDPGen.tproj/QTSDPGen $RPM_BUILD_ROOT%{_bindir}
170 install -p QTFileTools/QTTrackInfo.tproj/QTTrackInfo $RPM_BUILD_ROOT%{_bindir}
173 install -p APIModules/QTSSRawFileModule.bproj/QTSSRawFileModule $RPM_BUILD_ROOT%{_libdir}/%{name}
176 cp -a qtaccess $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
178 # Create our default admin user and remove Apple's
179 # Default login is root/pld -- please change it!
181 $RPM_BUILD_ROOT%{_bindir}/qtpasswd \
182 -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/qtusers
183 -g $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/qtgroups"
184 $qtpasswd root -p pld -A admin
185 $qtpasswd -F -d 'aGFja21l'
187 mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/relayconfig.xml{-Sample,}
188 rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/streamingserver.xml-sample
190 # streamingadminserver
191 cp -a WebAdmin/streamingadminserver.pem $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
194 cp -a Documentation/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
195 cp -a Documentation/man/qtss/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
196 cp -a Documentation/man/qtss/createuserstreamingdir.8 $RPM_BUILD_ROOT%{_mandir}/man8
197 cp -a Documentation/man/qtss/QuickTimeStreamingServer.8 $RPM_BUILD_ROOT%{_mandir}/man8/DarwinStreamingServer.8
198 cp -a Documentation/man/qtss/streamingadminserver.pl.8 $RPM_BUILD_ROOT%{_mandir}/man8/streamingadminserver.8
199 rm $RPM_BUILD_ROOT/var/lib/%{name}/3rdPartyAcknowledgements.rtf
200 rm $RPM_BUILD_ROOT/var/lib/%{name}/readme.txt
202 # provide ghost logs...
203 touch $RPM_BUILD_ROOT/var/log/%{name}/Error.log
204 touch $RPM_BUILD_ROOT/var/log/%{name}/StreamingServer.log
205 touch $RPM_BUILD_ROOT/var/log/%{name}/mp3_access.log
206 touch $RPM_BUILD_ROOT/var/log/%{name}/server_status
209 rm -rf $RPM_BUILD_ROOT
212 %groupadd -f -g 148 qtss
213 %useradd -g qtss -d /tmp -u 148 -s /bin/false qtss
216 /sbin/chkconfig --add %{name}
217 %service %{name} restart
219 if [ "$1" = "1" ]; then
220 %banner %{name} -e <<-EOF
221 Default admin username/password is root/pld. Set a password for it or, better
222 delete it and create new admin username and password (using qtpasswd)
224 Access admin interface at:
225 http://localhost:1220/
230 if [ "$1" = "0" ]; then
231 %service -q %{name} stop
232 /sbin/chkconfig --del %{name}
236 if [ "$1" = "0" ]; then
242 %defattr(644,root,root,755)
243 %doc APPLE_LICENSE ReleaseNotes.txt
244 %doc Documentation/3rdPartyAcknowledgements.rtf
245 %doc Documentation/AboutQTFileTools.html
246 %doc Documentation/AboutTheSource.html
247 %doc Documentation/admin-protocol-README.txt
248 %doc Documentation/CachingProxyProtocol-README.txt
249 %doc Documentation/DevNotes.html
250 %doc Documentation/draft-serenyi-avt-rtp-meta-00.txt
251 %doc Documentation/DSS_QT_Logo_License.pdf
252 %doc Documentation/License.rtf
253 %doc Documentation/QTSSAPIDocs.pdf
254 %doc Documentation/ReadMe.rtf
255 %doc Documentation/readme.txt
256 %doc Documentation/ReliableRTP_WhitePaper.rtf
257 %doc Documentation/RTSP_Over_HTTP.pdf
259 %dir %{_sysconfdir}/%{name}
260 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/qtgroups
261 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/qtusers
262 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/relayconfig.xml
263 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/streamingloadtool.conf
264 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/streamingserver.xml
265 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/qtaccess
266 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/streamingadminserver.pem
268 %attr(754,root,root) /etc/rc.d/init.d/dss
269 %attr(755,root,root) %{_bindir}/MP3Broadcaster
270 %attr(755,root,root) %{_bindir}/PlaylistBroadcaster
271 %attr(755,root,root) %{_bindir}/StreamingLoadTool
272 %attr(755,root,root) %{_bindir}/createuserstreamingdir
273 %attr(755,root,root) %{_bindir}/qtpasswd
275 %attr(755,root,root) %{_sbindir}/DarwinStreamingServer
276 %attr(755,root,root) %{_sbindir}/streamingadminserver
281 %dir %{_libdir}/%{name}
282 %attr(755,root,root) %{_libdir}/%{name}/QTSSHomeDirectoryModule
283 %attr(755,root,root) %{_libdir}/%{name}/QTSSRefMovieModule
285 %attr(755,root,root) %{_libdir}/dss/QTSSRawFileModule
287 %dir /var/lib/%{name}
288 %dir /var/lib/%{name}/movies
290 %dir /var/log/%{name}
291 %attr(644,qtss,qtss) %verify(not md5 mtime size) %ghost /var/log/%{name}/Error.log
292 %attr(644,qtss,qtss) %verify(not md5 mtime size) %ghost /var/log/%{name}/StreamingServer.log
293 %attr(644,qtss,qtss) %verify(not md5 mtime size) %ghost /var/log/%{name}/mp3_access.log
294 %attr(644,qtss,qtss) %verify(not md5 mtime size) %ghost /var/log/%{name}/server_status
296 # admin server (subpackage?)
297 %dir %{_datadir}/%{name}
298 %dir %{_datadir}/%{name}/AdminHtml
299 %{_datadir}/%{name}/AdminHtml/html_en
300 %{_datadir}/%{name}/AdminHtml/images
301 %{_datadir}/%{name}/AdminHtml/includes
302 %{_datadir}/%{name}/AdminHtml/*.html
303 %{_datadir}/%{name}/AdminHtml/*.pl
304 %attr(755,root,root) %{_datadir}/%{name}/AdminHtml/*.cgi
307 %defattr(644,root,root,755)
309 %attr(755,root,root) %{_bindir}/QTBroadcaster
310 %attr(755,root,root) %{_bindir}/QTFileInfo
311 %attr(755,root,root) %{_bindir}/QTFileTest
312 %attr(755,root,root) %{_bindir}/QTRTPFileTest
313 %attr(755,root,root) %{_bindir}/QTRTPGen
314 %attr(755,root,root) %{_bindir}/QTSDPGen
315 %attr(755,root,root) %{_bindir}/QTSampleLister
316 %attr(755,root,root) %{_bindir}/QTTrackInfo
319 %defattr(644,root,root,755)
320 /var/lib/%{name}/movies/*