]> git.pld-linux.org Git - packages/dss.git/blob - dss.spec
1df046d49f74836b5f177679a7f1ddd5db5fd843
[packages/dss.git] / dss.spec
1 # TODO
2 # - merge dstreamserv.spec
3 Summary:        Darwin Streaming Server
4 Name:           dss
5 Version:        6.0.3
6 Release:        0.8
7 License:        Apple Public Source License
8 Group:          Networking/Daemons
9 Source0:        http://dss.macosforge.org/downloads/DarwinStreamingSrvr%{version}-Source.tar
10 # Source0-md5:  ca676691db8417d05121699c0ca3d549
11 Source1:        %{name}.init
12 Source2:        README.utils
13 Patch0:         %{name}.patch
14 Patch1:         %{name}-x86_64.patch
15 Patch2:         optflags.patch
16 Patch3:         compile.patch
17 URL:            http://dss.macosforge.org/
18 BuildRequires:  libstdc++-devel
19 BuildRequires:  rpmbuild(macros) >= 1.228
20 Requires(post,preun):   /sbin/chkconfig
21 Requires(postun):       /usr/sbin/groupdel
22 Requires(postun):       /usr/sbin/userdel
23 Requires(pre):  /bin/id
24 Requires(pre):  /usr/bin/getgid
25 Requires(pre):  /usr/sbin/groupadd
26 Requires(pre):  /usr/sbin/useradd
27 Requires:       rc-scripts
28 Provides:       group(qtss)
29 Provides:       user(qtss)
30 Obsoletes:      DSS
31 Obsoletes:      dstreamserv
32 Obsoletes:      dstreamsrv
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 Darwin Streaming Server lets you stream digital video on the Internet
37 using industry-standard Internet protocols RTP and RTSP.
38
39 Using Darwin Streaming Server you can serve stored files (video on
40 demand) or reflect live broadcasts to thousands of QuickTime 4 or
41 later users. With its combination of industry-standard streaming
42 protocols and cutting-edge compression technologies, QuickTime
43 delivers perfectly synchronized audio and video streams ideal for
44 Internet video and live events.
45
46 %description -l pl.UTF-8
47 Serwer strumieni pozwala wysyłać strumienie danych QuickTime do
48 klientów w Internecie przy użyciu protokołów RTP i RTSP.
49
50 %package Proxy
51 Summary:        Apple's Darwin Streaming Proxy
52 Group:          Daemons
53
54 %description Proxy
55 The Darwin Streaming Proxy is an application specific proxy which
56 would normally be run in a border zone or perimeter network. It is
57 used to give client machines within a protected network access to
58 streaming servers outside that network, in the case when the firewall
59 blocks RTSP connections or RTP/UDP data flow. The firewall perimeter
60 network is usually configured to allow:
61
62 - RTSP connections from within the network, as long as the destination
63   is the proxy
64
65 - RTSP connections to outside the network, as long as the source is
66   the proxy
67
68 - RTP datagrams to and from the proxy to the inner network
69
70 - RTP datagrams to and from the proxy to the outside
71
72 %package utils
73 Summary:        Apple's Darwin Streaming Server Movie inspection utilities
74 Group:          Applications
75
76 %description utils
77 Apple's Darwin Streaming Server Movie inspection utilities.
78
79 %package samples
80 Summary:        Darwin Streaming Server - samples
81 Summary(pl.UTF-8):      Przykłady do Darwin Streaming Servera
82 Group:          Networking/Daemons
83 Obsoletes:      dstreamserv-samples
84
85 %description samples
86 Sample files for Streaming Server.
87
88 %description samples -l pl.UTF-8
89 Przykładowe pliki do Darwin Streaming Servera.
90
91 %prep
92 %setup -q -n DarwinStreamingSrvr%{version}-Source
93 %patch0 -p1
94 %patch1 -p1
95 %patch2 -p1
96 %patch3 -p1
97 cp -p %{SOURCE2} .
98
99 # patch streamingadminserver.pl
100 %{__sed} -i.bak -e  '
101         s|/''usr/local/movies|/var/lib/%{name}/movies|g
102         s|/''usr/local/sbin/StreamingServerModules|%{_libdir}/%{name}/|g
103         s|/''usr/local/|%{_prefix}/|g
104         s|/''etc/streaming|%{_sysconfdir}/%{name}|g
105         s|/var/streaming/AdminHtml|%{_datadir}/%{name}/AdminHtml|g
106         s|/var/streaming/logs|/var/log/%{name}|g
107         s|/var/streaming/|/var/lib/%{name}/|g
108 '       DSS_MakeRoot streamingserver.xml-POSIX \
109         WebAdmin/src/streamingadminserver.pl \
110         WebAdmin/WebAdminHtml/adminprotocol-lib.pl
111
112 # patch manpages
113 %{__sed} -i -e  '
114         s|/Library/QuickTimeStreaming/Config/|%{_sysconfdir}/%{name}/|g
115         s|/Library/QuickTimeStreaming/Modules|%{_libdir}/%{name}|g
116         s|/Library/QuickTimeStreaming/Movies|/var/lib/%{name}/movies|g
117         s|/Library/QuickTimeStreaming/Playlists|/var/lib/%{name}/playlists|g
118         s|/Library/QuickTimeStreaming/Logs|/var/log/%{name}|g
119         s|/Library/QuickTimeStreaming/Docs|%{_docdir}/%{name}-%{version}|g
120         s|QuickTimeStreamingServer|DarwinStreamingServer|g
121 ' Documentation/man/qtss/*
122
123 cat > defaultPaths.h << 'EOF'
124 #define DEFAULTPATHS_DIRECTORY_SEPARATOR        "/"
125 #define DEFAULTPATHS_ROOT_DIR                   "/var/lib/%{name}/"
126 #define DEFAULTPATHS_ETC_DIR                    "%{_sysconfdir}/%{name}/"
127 #define DEFAULTPATHS_ETC_DIR_OLD                "%{_sysconfdir}/"
128 #define DEFAULTPATHS_SSM_DIR                    "%{_libdir}/%{name}/"
129 #define DEFAULTPATHS_LOG_DIR                    "/var/log/%{name}/"
130 #define DEFAULTPATHS_PID_DIR                    "/var/run/"
131 #define DEFAULTPATHS_MOVIES_DIR                 "/var/lib/%{name}/movies/"
132 EOF
133
134 %build
135 export RPM_OPT_FLAGS="%{rpmcflags}"
136 export ARCH="%{_target_cpu}"
137 export CC="%{__cc}"
138 export CXX="%{__cxx}"
139
140 jobs=$(echo %{_smp_mflags} | cut -dj -f2)
141 ./Buildit ${jobs:+--jobs=$jobs}
142
143 %install
144 rm -rf $RPM_BUILD_ROOT
145 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/lib/%{name},%{_mandir}/man{1,8}}
146 ./DSS_MakeRoot \
147         $RPM_BUILD_ROOT
148
149 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
150
151 # utils
152 install -p QTFileTools/QTBroadcaster.tproj/QTBroadcaster $RPM_BUILD_ROOT%{_bindir}
153 install -p QTFileTools/QTFileInfo.tproj/QTFileInfo $RPM_BUILD_ROOT%{_bindir}
154 install -p QTFileTools/QTFileTest.tproj/QTFileTest $RPM_BUILD_ROOT%{_bindir}
155 install -p QTFileTools/QTRTPFileTest.tproj/QTRTPFileTest $RPM_BUILD_ROOT%{_bindir}
156 install -p QTFileTools/QTRTPGen.tproj/QTRTPGen $RPM_BUILD_ROOT%{_bindir}
157 install -p QTFileTools/QTSampleLister.tproj/QTSampleLister $RPM_BUILD_ROOT%{_bindir}
158 install -p QTFileTools/QTSDPGen.tproj/QTSDPGen $RPM_BUILD_ROOT%{_bindir}
159 install -p QTFileTools/QTTrackInfo.tproj/QTTrackInfo $RPM_BUILD_ROOT%{_bindir}
160
161 # modules
162 install -p APIModules/QTSSRawFileModule.bproj/QTSSRawFileModule $RPM_BUILD_ROOT%{_libdir}/%{name}
163
164 # config
165 cp -a qtaccess $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
166
167 # Create our default admin user and remove Apple's
168 # Default login is root/pld -- please change it!
169 qtpasswd="\
170 $RPM_BUILD_ROOT%{_bindir}/qtpasswd \
171 -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/qtusers
172 -g $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/qtgroups"
173 $qtpasswd root -p pld -A admin
174 $qtpasswd -F -d 'aGFja21l'
175
176 mv $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/relayconfig.xml{-Sample,}
177 rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/streamingserver.xml-sample
178
179 # streamingadminserver
180 cp -a WebAdmin/streamingadminserver.pem $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
181
182 # doc
183 cp -a Documentation/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
184 cp -a Documentation/man/qtss/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
185 cp -a Documentation/man/qtss/createuserstreamingdir.8 $RPM_BUILD_ROOT%{_mandir}/man8
186 cp -a Documentation/man/qtss/QuickTimeStreamingServer.8 $RPM_BUILD_ROOT%{_mandir}/man8/DarwinStreamingServer.8
187 cp -a Documentation/man/qtss/streamingadminserver.pl.8 $RPM_BUILD_ROOT%{_mandir}/man8
188 rm $RPM_BUILD_ROOT/var/lib/%{name}/3rdPartyAcknowledgements.rtf
189 rm $RPM_BUILD_ROOT/var/lib/%{name}/readme.txt
190
191 # provide ghost logs...
192 touch $RPM_BUILD_ROOT/var/log/%{name}/Error.log
193 touch $RPM_BUILD_ROOT/var/log/%{name}/StreamingServer.log
194 touch $RPM_BUILD_ROOT/var/log/%{name}/mp3_access.log
195 touch $RPM_BUILD_ROOT/var/log/%{name}/server_status
196
197 %clean
198 rm -rf $RPM_BUILD_ROOT
199
200 %pre
201 %groupadd -f -g 148 qtss
202 %useradd -g qtss -d /tmp -u 148 -s /bin/false qtss
203
204 %post
205 /sbin/chkconfig --add %{name}
206 %service %{name} restart
207
208 if [ "$1" = "1" ]; then
209         %banner %{name} -e <<-EOF
210         Default admin username/password is root/pld. Set a password for it or, better
211         delete it and create new admin username and password (using qtpasswd)
212
213         EOF
214 fi
215
216 %preun
217 if [ "$1" = "0" ]; then
218         %service -q %{name} stop
219         /sbin/chkconfig --del %{name}
220 fi
221
222 %postun
223 if [ "$1" = "0" ]; then
224         %userremove qtss
225         %groupremove qtss
226 fi
227
228 %files
229 %defattr(644,root,root,755)
230 %doc APPLE_LICENSE ReleaseNotes.txt
231 %doc Documentation/3rdPartyAcknowledgements.rtf
232 %doc Documentation/AboutQTFileTools.html
233 %doc Documentation/AboutTheSource.html
234 %doc Documentation/admin-protocol-README.txt
235 %doc Documentation/CachingProxyProtocol-README.txt
236 %doc Documentation/DevNotes.html
237 %doc Documentation/draft-serenyi-avt-rtp-meta-00.txt
238 %doc Documentation/DSS_QT_Logo_License.pdf
239 %doc Documentation/License.rtf
240 %doc Documentation/QTSSAPIDocs.pdf
241 %doc Documentation/ReadMe.rtf
242 %doc Documentation/readme.txt
243 %doc Documentation/ReliableRTP_WhitePaper.rtf
244 %doc Documentation/RTSP_Over_HTTP.pdf
245
246 %dir %{_sysconfdir}/%{name}
247 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/qtgroups
248 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/qtusers
249 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/relayconfig.xml
250 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/streamingloadtool.conf
251 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/streamingserver.xml
252 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/qtaccess
253 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/streamingadminserver.pem
254
255 %attr(754,root,root) /etc/rc.d/init.d/dss
256 %attr(755,root,root) %{_bindir}/MP3Broadcaster
257 %attr(755,root,root) %{_bindir}/PlaylistBroadcaster
258 %attr(755,root,root) %{_bindir}/StreamingLoadTool
259 %attr(755,root,root) %{_bindir}/createuserstreamingdir
260 %attr(755,root,root) %{_bindir}/qtpasswd
261
262 %attr(755,root,root) %{_sbindir}/DarwinStreamingServer
263 %attr(755,root,root) %{_sbindir}/streamingadminserver.pl
264
265 %{_mandir}/man1/*
266 %{_mandir}/man8/*
267
268 %dir %{_libdir}/%{name}
269 %attr(755,root,root) %{_libdir}/%{name}/QTSSHomeDirectoryModule
270 %attr(755,root,root) %{_libdir}/%{name}/QTSSRefMovieModule
271
272 %attr(755,root,root) %{_libdir}/dss/QTSSRawFileModule
273
274 %dir /var/lib/%{name}
275 %dir /var/lib/%{name}/movies
276
277 %dir /var/log/%{name}
278 %attr(644,qtss,qtss) %verify(not md5 mtime size) %ghost /var/log/%{name}/Error.log
279 %attr(644,qtss,qtss) %verify(not md5 mtime size) %ghost /var/log/%{name}/StreamingServer.log
280 %attr(644,qtss,qtss) %verify(not md5 mtime size) %ghost /var/log/%{name}/mp3_access.log
281 %attr(644,qtss,qtss) %verify(not md5 mtime size) %ghost /var/log/%{name}/server_status
282
283 # admin server (subpackage?)
284 %dir %{_datadir}/%{name}
285 %dir %{_datadir}/%{name}/AdminHtml
286 %{_datadir}/%{name}/AdminHtml/html_en
287 %{_datadir}/%{name}/AdminHtml/images
288 %{_datadir}/%{name}/AdminHtml/includes
289 %{_datadir}/%{name}/AdminHtml/*.html
290 %{_datadir}/%{name}/AdminHtml/*.pl
291 %attr(755,root,root) %{_datadir}/%{name}/AdminHtml/*.cgi
292
293 %files utils
294 %defattr(644,root,root,755)
295 %doc README.utils
296 %attr(755,root,root) %{_bindir}/QTBroadcaster
297 %attr(755,root,root) %{_bindir}/QTFileInfo
298 %attr(755,root,root) %{_bindir}/QTFileTest
299 %attr(755,root,root) %{_bindir}/QTRTPFileTest
300 %attr(755,root,root) %{_bindir}/QTRTPGen
301 %attr(755,root,root) %{_bindir}/QTSDPGen
302 %attr(755,root,root) %{_bindir}/QTSampleLister
303 %attr(755,root,root) %{_bindir}/QTTrackInfo
304
305 %files samples
306 %defattr(644,root,root,755)
307 /var/lib/%{name}/movies/*
This page took 0.10275 seconds and 3 git commands to generate.