]> git.pld-linux.org Git - packages/dss.git/blob - dss.spec
93f36f608e19b3098f01dd700f6b2f7eb2d4d9c1
[packages/dss.git] / dss.spec
1 # TODO
2 # - merge dstreamserv.spec
3 %include    /usr/lib/rpm/macros.perl
4
5 Summary:        Darwin Streaming Server
6 Name:           dss
7 Version:        6.0.3
8 Release:        0.11
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
13 Source1:        %{name}.init
14 Source2:        README.utils
15 Patch0:         %{name}.patch
16 Patch1:         %{name}-x86_64.patch
17 Patch2:         optflags.patch
18 Patch3:         compile.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
30 Requires:       rc-scripts
31 Provides:       group(qtss)
32 Provides:       user(qtss)
33 Obsoletes:      DSS
34 Obsoletes:      dstreamserv
35 Obsoletes:      dstreamsrv
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 Darwin Streaming Server lets you stream digital video on the Internet
40 using industry-standard Internet protocols RTP and RTSP.
41
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.
48
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.
52
53 %package Proxy
54 Summary:        Apple's Darwin Streaming Proxy
55 Group:          Daemons
56 Requires:       %{name} = %{version}-%{release}
57
58 %description Proxy
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:
65
66 - RTSP connections from within the network, as long as the destination
67   is the proxy
68
69 - RTSP connections to outside the network, as long as the source is
70   the proxy
71
72 - RTP datagrams to and from the proxy to the inner network
73
74 - RTP datagrams to and from the proxy to the outside
75
76 %package utils
77 Summary:        Apple's Darwin Streaming Server Movie inspection utilities
78 Group:          Applications
79 Requires:       %{name} = %{version}-%{release}
80
81 %description utils
82 Apple's Darwin Streaming Server Movie inspection utilities.
83
84 %package samples
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
90
91 %description samples
92 Sample files for Streaming Server.
93
94 %description samples -l pl.UTF-8
95 Przykładowe pliki do Darwin Streaming Servera.
96
97 %prep
98 %setup -q -n DarwinStreamingSrvr%{version}-Source
99 %patch0 -p1
100 %patch1 -p1
101 %patch2 -p1
102 %patch3 -p1
103 cp -p %{SOURCE2} .
104
105 # patch streamingadminserver.pl
106 %{__sed} -i.bak -e  '
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
119
120 # patch manpages
121 %{__sed} -i -e  '
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/*
130
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/"
140 EOF
141
142 %build
143 export RPM_OPT_FLAGS="%{rpmcflags}"
144 export ARCH="%{_target_cpu}"
145 export CC="%{__cc}"
146 export CXX="%{__cxx}"
147
148 jobs=$(echo %{_smp_mflags} | cut -dj -f2)
149 ./Buildit ${jobs:+--jobs=$jobs}
150
151 %install
152 rm -rf $RPM_BUILD_ROOT
153 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/lib/%{name},%{_mandir}/man{1,8}}
154 ./DSS_MakeRoot \
155         $RPM_BUILD_ROOT
156
157 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
158
159 # avoid extension
160 mv $RPM_BUILD_ROOT%{_sbindir}/streamingadminserver{.pl,}
161
162 # utils
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}
171
172 # modules
173 install -p APIModules/QTSSRawFileModule.bproj/QTSSRawFileModule $RPM_BUILD_ROOT%{_libdir}/%{name}
174
175 # config
176 cp -a qtaccess $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
177
178 # Create our default admin user and remove Apple's
179 # Default login is root/pld -- please change it!
180 qtpasswd="\
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'
186
187 mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/relayconfig.xml{-Sample,}
188 rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/streamingserver.xml-sample
189
190 # streamingadminserver
191 cp -a WebAdmin/streamingadminserver.pem $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
192
193 # doc
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
201
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
207
208 %clean
209 rm -rf $RPM_BUILD_ROOT
210
211 %pre
212 %groupadd -f -g 148 qtss
213 %useradd -g qtss -d /tmp -u 148 -s /bin/false qtss
214
215 %post
216 /sbin/chkconfig --add %{name}
217 %service %{name} restart
218
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)
223
224         Access admin interface at:
225         http://localhost:1220/
226         EOF
227 fi
228
229 %preun
230 if [ "$1" = "0" ]; then
231         %service -q %{name} stop
232         /sbin/chkconfig --del %{name}
233 fi
234
235 %postun
236 if [ "$1" = "0" ]; then
237         %userremove qtss
238         %groupremove qtss
239 fi
240
241 %files
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
258
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
267
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
274
275 %attr(755,root,root) %{_sbindir}/DarwinStreamingServer
276 %attr(755,root,root) %{_sbindir}/streamingadminserver
277
278 %{_mandir}/man1/*
279 %{_mandir}/man8/*
280
281 %dir %{_libdir}/%{name}
282 %attr(755,root,root) %{_libdir}/%{name}/QTSSHomeDirectoryModule
283 %attr(755,root,root) %{_libdir}/%{name}/QTSSRefMovieModule
284
285 %attr(755,root,root) %{_libdir}/dss/QTSSRawFileModule
286
287 %dir /var/lib/%{name}
288 %dir /var/lib/%{name}/movies
289
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
295
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
305
306 %files utils
307 %defattr(644,root,root,755)
308 %doc README.utils
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
317
318 %files samples
319 %defattr(644,root,root,755)
320 /var/lib/%{name}/movies/*
This page took 0.105013 seconds and 3 git commands to generate.