Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > 3c9e464352de775e52d82b11c27cdda1 > files > 5

DarwinStreamingServer-5.0.3.2-1mdk.src.rpm

%define name	DarwinStreamingServer
%define version	5.0.3.2
%define release	1mdk

Summary:	Apple's Darwin Streaming Server
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	Apple Public Source License
Group:		System/Servers
URL:		http://www.publicsource.apple.com/projects/streaming/
Source0:	DSS-v5_0_3_2.tar.bz2
Source1:	dss.init.bz2
Source2:	dss-proxy.init.bz2
Source5:	dss.bz2
Source6:	dss-proxy.bz2
Patch0:		DSS-v5_0_3_2-Config.diff.bz2
Patch1:		DSS-v5_0_3_2-build_optimizer.diff.bz2
Patch2:		DSS-v5_0_3_2-x86_64.diff.bz2
BuildRequires:	libstdc++-devel
PreReq:		rpm-helper
BuildRoot:	%{_tmppath}/%{name}-buildroot

%description
Darwin Streaming Server lets you stream digital video on the
Internet using industry-standard Internet protocols RTP and RTSP.

Using Darwin Streaming Server you can serve stored files (video
on demand) or reflect live broadcasts to thousands of QuickTime
4 or later users. With its combination of industry-standard
streaming protocols and cutting-edge compression technologies,
QuickTime delivers perfectly synchronized audio and video streams
ideal for Internet video and live events.

%package	Proxy
Summary:	Apple's Darwin Streaming Proxy
Group:		System/Servers
License:	Apple Public Source License
PreReq:		rpm-helper

%description	Proxy
The Darwin Streaming Proxy is an application specific proxy which
would normally be run in a border zone or perimeter network. It
is used to give client machines within a protected network access
to streaming servers outside that network, in the case when the
firewall blocks RTSP connections or RTP/UDP data flow. The
firewall perimeter network is usually configured to allow:

* RTSP connections from within the network, as long as the
  destination is the proxy

* RTSP connections to outside the network, as long as the source
  is the proxy

* RTP datagrams to and from the proxy to the inner network

* RTP datagrams to and from the proxy to the outside

%package	Utils
Summary:	Apple's Darwin Streaming Server Movie inspection utilities
Group:		System/Servers
License:	Apple Public Source License
PreReq:		rpm-helper

%description	Utils
* QTBroadcaster
  Requires a target ip address, a source movie, one or more source
  hint track ids in movie, and an initial port. Every packet
  referenced by the hint track(s) is broadcasted to the specified
  ip address.

* QTFileInfo
  Requires a movie name. Displays each track id, name, create date,
  and mod date. If the track is a hint track, additional
  information is displayed: the total rtp bytes and packets, the
  average bit rate and packet size, and the total header
  percentage of the stream.

* QTFileTest
  Requires a movie name. Parses the Movie Header Atom and displays
  a trace of the output.

* QTRTPFileTest
  Requires a movie and a hint track id in the movie. Displays the
  RTP header (TransmitTime, Cookie, SeqNum, and TimeStamp) for
  each packet.

* QTRTPGen
  Requires a movie and a hint track id. Displays the number of
  packets in each hint track sample and writes the RTP packets to
  file "track.cache"

* QTSampleLister
  Requires a movie and a track id. Displays track media sample
  number, media time, Data offset, and sample size for each sample
  in the track.

* QTSDPGen
  Requires a list of 1 or more movies. Displays the SDP
  information for all of the hinted tracks in each movie. Use -f
  to save the SDP information to the file [movie].sdp in the same
  directory as the source movie.

* QTTrackInfo
  Requires a movie, sample table atom type, and track id. Displays
  the information in the sample table atom of the specified track.
  Supports "stco", "stsc", "stsz", "stts" as the atom type.

  Example: "./QTTrackInfo -T stco /movies/mystery.mov 3" dumps the
  chunk offset sample table in track 3.

%prep

%setup -q -n DSS-v5_0_3_2
%patch0 -p1
%patch1 -p1
%patch2 -p1

# tag it and bag it
#perl -p -i -e "s|^#define kVersionString .*|#define kVersionString \"%{version}\"|g" revision.h
#perl -p -i -e "s|^#define kCommentString .*|#define kCommentString \"Release/Mandrake Linux 9.0; Version/%{version}\"|g" revision.h

cat > defaultPaths.h << EOF
# define DEFAULTPATHS_DIRECTORY_SEPARATOR	"/"
# define DEFAULTPATHS_ETC_DIR			"%{_sysconfdir}/dss/"
# define DEFAULTPATHS_ETC_DIR_OLD		"%{_sysconfdir}/"
# define DEFAULTPATHS_SSM_DIR			"%{_libdir}/dss/"
# define DEFAULTPATHS_LOG_DIR			"/var/log/dss/"
# define DEFAULTPATHS_MOVIES_DIR        "%{_localstatedir}/dss/"
# define DEFAULTPATHS_PID_DIR           "/var/run/dss/"
EOF

%build
export RPM_OPT_FLAGS="%{optflags} -fPIC -Wall"
export ARCH="%{_target_cpu}"
# parallel build hack... (it sucks)
# export JOBS=$(echo %{_smp_mflags}|cut -dj -f2)
# ./Buildit --jobs=$JOBS
./Buildit

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_sbindir}
install -d %{buildroot}%{_sysconfdir}/dss
install -d %{buildroot}%{_sysconfdir}/logrotate.d
install -d %{buildroot}%{_initrddir}
install -d %{buildroot}%{_libdir}/dss
install -d %{buildroot}%{_localstatedir}/dss/Movies/http
install -d %{buildroot}%{_localstatedir}/dss/AdminHtml
install -d %{buildroot}%{_localstatedir}/dss/Playlists
install -d %{buildroot}/var/log/dss
install -d %{buildroot}%{_iconsdir}
install -d %{buildroot}%{_miconsdir}
install -d %{buildroot}%{_liconsdir}
#install -d %{buildroot}%{_menudir}
install -d %{buildroot}/var/run/dss
install -d %{buildroot}%{_mandir}/man1
install -d %{buildroot}%{_libdir}/%{name}-Admin/scripts

install -m0755 DarwinStreamingServer %{buildroot}%{_sbindir}/
install -m0755 StreamingProxy.tproj/StreamingProxy %{buildroot}%{_sbindir}/
install -m0755 PlaylistBroadcaster.tproj/PlaylistBroadcaster %{buildroot}%{_bindir}/
install -m0755 MP3Broadcaster/MP3Broadcaster %{buildroot}%{_bindir}/
install -m0755 qtpasswd.tproj/qtpasswd %{buildroot}%{_bindir}/

# NOTE! the StreamingLoadTool is not yet released as source code
#install -m755 StreamingLoadTool %{buildroot}%{_bindir}/

# modules
install -m0755 APIModules/QTSSDemoAuthorizationModule.bproj/QTSSDemoAuthorizationModule %{buildroot}%{_libdir}/dss/
install -m0755 APIModules/QTSSRawFileModule.bproj/QTSSRawFileModule %{buildroot}%{_libdir}/dss/
install -m0755 APIModules/QTSSRefMovieModule/QTSSRefMovieModule %{buildroot}%{_libdir}/dss/
install -m0755 APIModules/QTSSSpamDefenseModule.bproj/QTSSSpamDefenseModule %{buildroot}%{_libdir}/dss/

# utils
install -m0755 QTFileTools/QTBroadcaster.tproj/QTBroadcaster %{buildroot}%{_bindir}/
install -m0755 QTFileTools/QTFileInfo.tproj/QTFileInfo %{buildroot}%{_bindir}/
install -m0755 QTFileTools/QTFileTest.tproj/QTFileTest %{buildroot}%{_bindir}/
install -m0755 QTFileTools/QTRTPFileTest.tproj/QTRTPFileTest %{buildroot}%{_bindir}/
install -m0755 QTFileTools/QTRTPGen.tproj/QTRTPGen %{buildroot}%{_bindir}/
install -m0755 QTFileTools/QTSampleLister.tproj/QTSampleLister %{buildroot}%{_bindir}/
install -m0755 QTFileTools/QTSDPGen.tproj/QTSDPGen %{buildroot}%{_bindir}/
install -m0755 QTFileTools/QTTrackInfo.tproj/QTTrackInfo %{buildroot}%{_bindir}/

# config
install -m0644 streamingserver.xml %{buildroot}%{_sysconfdir}/dss/
install -m0644 streamingserver.xml %{buildroot}%{_sysconfdir}/dss/streamingserver.xml.default
install -m0644 relayconfig.xml-Sample %{buildroot}%{_sysconfdir}/dss/relayconfig.xml
install -m0644 relayconfig.xml-Sample %{buildroot}%{_sysconfdir}/dss/relayconfig.xml.default
install -m0644 StreamingProxy.tproj/streamingproxy.conf %{buildroot}%{_sysconfdir}/dss/
install -m0644 StreamingProxy.tproj/streamingproxy.conf %{buildroot}%{_sysconfdir}/dss/streamingproxy.conf.default
install -m0644 qtaccess %{buildroot}%{_sysconfdir}/dss/
install -m0644 qtusers %{buildroot}%{_sysconfdir}/dss/
install -m0644 qtgroups %{buildroot}%{_sysconfdir}/dss/

# install manuals
install -m0644 Documentation/broadcasterctl.1 %{buildroot}%{_mandir}/man1/
install -m0644 Documentation/MP3Broadcaster.1 %{buildroot}%{_mandir}/man1/

# NOTE! the StreamingLoadTool is not yet released as source code
#install -m644 streamingloadtool.conf %{buildroot}%{_sysconfdir}/dss/streamingloadtool.conf

# sys 5 scripts
bzcat %{SOURCE1} > %{buildroot}%{_initrddir}/%{name}
bzcat %{SOURCE2} > %{buildroot}%{_initrddir}/%{name}-Proxy

# logrotate stuff
bzcat %{SOURCE5} > %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
bzcat %{SOURCE6} > %{buildroot}%{_sysconfdir}/logrotate.d/%{name}-Proxy

# i strongly suspect the web admin can't follow symlinks..., if
# so, some coder needs to fix the source. As the server is run
# under the dss user, there might be some problems...

ln -s %{_docdir}/%{name}-%{version} %{buildroot}%{_localstatedir}/dss/Docs
ln -s ../../../etc/dss %{buildroot}%{_localstatedir}/dss/Config
ln -s ../../../usr/lib/dss %{buildroot}%{_localstatedir}/dss/Modules
ln -s ../../log/dss %{buildroot}%{_localstatedir}/dss/Logs

# provide ghost logs...
touch %{buildroot}/var/log/dss/Error.log
touch %{buildroot}/var/log/dss/StreamingServer.log
touch %{buildroot}/var/log/dss/mp3_access.log
touch %{buildroot}/var/log/dss/server_status
touch %{buildroot}/var/log/dss/StreamingProxy.log

# strip the modules
strip %{buildroot}%{_libdir}/dss/*

%pre
%_pre_useradd dss %{_localstatedir}/dss /bin/sh

%post
%_post_service %{name}

%preun
%_preun_service %{name}

%postun
%_postun_userdel dss

%post Proxy
%_post_service %{name}-Proxy

%preun Proxy
%_preun_service %{name}-Proxy

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-, root, root)
%doc APPLE_LICENSE ReleaseNotes.txt
%doc APIModules/QTSSRawFileModule.bproj/README-RawFileModule
%doc APIModules/QTSSRawFileModule.bproj/sampleredirect.raw
%doc Documentation/3rdPartyAcknowledgements.rtf
%doc Documentation/AboutTheSource.html
%doc Documentation/admin-protocol-README.txt
%doc Documentation/CachingProxyProtocol-README.txt
%doc Documentation/DevNotes.html
%doc Documentation/draft-serenyi-avt-rtp-meta-00.txt
%doc Documentation/DSS_QT_Logo_License.pdf
%doc Documentation/License.rtf
%doc Documentation/QTSSAPIDocs.pdf
%doc Documentation/ReadMe.rtf
%doc Documentation/readme.txt
%doc Documentation/ReliableRTP_WhitePaper.rtf
%doc Documentation/RTSP_Over_HTTP.pdf
%doc Documentation/SourceCodeFAQ.html
%attr(0755,root,root) %{_initrddir}/%{name}
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/dss/qtaccess
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/dss/qtgroups
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/dss/qtusers
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/dss/relayconfig.xml
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/dss/relayconfig.xml.default
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/dss/streamingserver.xml
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/dss/streamingserver.xml.default
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name}
%dir %attr(0755, root, root) %{_bindir}/MP3Broadcaster
%dir %attr(0755, root, root) %{_bindir}/PlaylistBroadcaster
%dir %attr(0755, root, root) %{_bindir}/qtpasswd
%dir %attr(0755, root, root) %{_sbindir}/DarwinStreamingServer
%dir %attr(0755, root, root) %{_libdir}/dss
%dir %attr(0755, dss, dss) /var/run/dss
%attr(0755,root,root) %{_libdir}/dss/QTSSDemoAuthorizationModule
%attr(0755,root,root) %{_libdir}/dss/QTSSRawFileModule
%attr(0755,root,root) %{_libdir}/dss/QTSSRefMovieModule
%attr(0755,root,root) %{_libdir}/dss/QTSSSpamDefenseModule
%dir %attr(0755, root, root) %{_localstatedir}/dss/Movies
%dir %attr(0755, root, root) %{_localstatedir}/dss/Movies/http
%dir %attr(0755, root, root) %{_localstatedir}/dss/Playlists
%dir %attr(0755, root, root) %{_localstatedir}/dss/Docs
%dir %attr(0755, root, root) %{_localstatedir}/dss/Config
%dir %attr(0755, root, root) %{_localstatedir}/dss/Modules
%dir %attr(0755, dss, dss) %{_localstatedir}/dss/Logs
%dir %attr(0755, dss, dss) /var/log/dss
%attr(0644,dss,dss) %verify(not md5 size mtime) %ghost /var/log/dss/Error.log
%attr(0644,dss,dss) %verify(not md5 size mtime) %ghost /var/log/dss/StreamingServer.log
%attr(0644,dss,dss) %verify(not md5 size mtime) %ghost /var/log/dss/mp3_access.log
%attr(0644,dss,dss) %verify(not md5 size mtime) %ghost /var/log/dss/server_status
%attr(0644,root,root) %{_mandir}/man1/broadcasterctl.1*
%attr(0644,root,root) %{_mandir}/man1/MP3Broadcaster.1*

%files Proxy
%defattr(-, root, root)
%doc APPLE_LICENSE Documentation/CachingProxyProtocol-README.txt
%doc StreamingProxy.tproj/StreamingProxy.html
%attr(0755, root, root) %{_initrddir}/%{name}-Proxy
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/dss/streamingproxy.conf
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/dss/streamingproxy.conf.default
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name}-Proxy
%dir %attr(0755, root, root) %{_sbindir}/StreamingProxy
%dir %attr(0755, root, root) %{_localstatedir}/dss/Config
%dir %attr(0755, dss, dss) %{_localstatedir}/dss/Logs
%dir %attr(0755, dss, dss) /var/log/dss
%attr(0644,dss,dss) %verify(not md5 size mtime) %ghost /var/log/dss/StreamingProxy.log

%files Utils
%defattr(-, root, root)
%doc APPLE_LICENSE Documentation/AboutQTFileTools.html
%dir %attr(0755, root, root) %{_bindir}/QTBroadcaster
%dir %attr(0755, root, root) %{_bindir}/QTFileInfo
%dir %attr(0755, root, root) %{_bindir}/QTFileTest
%dir %attr(0755, root, root) %{_bindir}/QTRTPFileTest
%dir %attr(0755, root, root) %{_bindir}/QTRTPGen
%dir %attr(0755, root, root) %{_bindir}/QTSampleLister
%dir %attr(0755, root, root) %{_bindir}/QTSDPGen
%dir %attr(0755, root, root) %{_bindir}/QTTrackInfo

%changelog
* Wed May 04 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.3.2-1mdk
- 5.0.3.2
- rediffed P0 and P1
- added some x86_64 fixes
- added P2 to fix build on x86_64 (arklinux)

* Sat Jun 05 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.1.1-2mdk
- rebuilt against new deps and with gcc v3.4.x
- fix deps

* Fri Apr 16 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 5.0.1.1-1mdk
- rediffed P0 and P1
- the DEFAULTPATHS.patch was included in the source Aug 16 2003, thanks apple
- fix pid file dir
- added a few new modules and files here and there

* Fri Jul 11 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1.3-2mdk
- rebuild

* Mon Jun 16 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1.3-1mdk
- 4.1.3

* Thu Jan 16 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1.1-3mdk
- build release

* Fri Nov 22 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1.1-2mdk
- since i never got the %{name}-Admin package to really work, and 
  no one ever helped me fixing it, drop it. it's no loss, it's garbage 
  anyway. also drop the %{name}-Media package (waste of bandwidth when
  mirroring)
- also drop S3, S4, S7, S8, S9, S10 and P3 (not needed anymore)

* Sat Nov 09 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1.1-1mdk
- new version
- make Mr. Lint happier...
- fix locations in the patches (%{_localstatedir}/dss)

* Mon Aug 19 2002 Laurent Culioli <laurent@pschit.net> 4.1-3mdk
- Rebuild with gcc3.2

* Sun Aug  4 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-2mdk
- rebuilt with gcc-3.2

* Tue Jul 23 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-1mdk
- final version! (4.1)
- rediffed all patches
- misc spec file fixes
- the web admin gui still does not work..., a perl wizard really
  needs to look into this _please_

* Sat Jun 29 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-0.20020629.1mdk
- new CVS version

* Fri Jun 14 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-0.20020614.1mdk
- new CVS version

* Sun Jun 02 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 4.1-0.20020601.2mdk
- png icons for menu (out xpm!)

* Sat Jun  1 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-0.20020601.1mdk
- new CVS version (build 423)

* Wed May 29 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-0.20020529.1mdk
- new CVS version
- some spec file cleanups

* Thu May  6 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-0.20020506.1mdk
- new CVS version
- the source rpm for 4.1-0.20020502.1mdk was lost in cyberspace

* Thu May  2 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-0.20020502.1mdk
- new CVS version (thread safe std lib calls support)
- rediffs
- included the new "RefMovieModule"

* Tue Apr 27 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-0.20020427.1mdk
- new CVS version (build 419)
- included a new pid file dir in defaultPaths.h
- included a new dynamic tag (versioning) hack

* Tue Apr 24 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-0.20020424.1mdk
- new CVS version (did not compile)

* Tue Apr 16 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-0.20020416.1mdk
- new CVS version (build 418) (did not compile)

* Tue Apr 16 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-0.20020415.3mdk
- bzip all sources
- fix the menu stuff...

* Tue Apr 16 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-0.20020415.2mdk
- fixed status in the Admin init script (S3), fixed the "right" permissions in
  /etc/dss/* when running the dss-admin_setup.sh script. These fixes were sent by
  Andre Duclos <Andre.Duclos@cnes.fr>, Thanks man!
- provide ghost logs, also fix logrotate for the new realtime server_status
  feature.
- provide a simple X menu entry and icons for the Admin stuff

* Mon Apr 15 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-0.20020415.1mdk
- new CVS version (build 417)
- fixed the "right" permissions in /etc/dss/* (again?)
 
* Tue Apr  9 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.1-0.20020409.1mdk
- I was using the wrong numbering scheme, pointed out by Frédéric Crozat.

* Tue Apr  9 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0.20020409-2mdk
- fix references for streamingadminserver to StreamingAdminServer (!)
  now you can stop it too :-)

* Tue Apr  9 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0.20020409-1mdk
- new CVS version
- I think I've found why the web gui wasn't working...
- more default values added to the xml conf files.
- spec file fixes

* Mon Apr  8 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0.20020408-1mdk
- the previous update was lost in cyber space...
- init script fixes
- new CVS version
- rediffs
- spec file fixes

* Wed Mar 20 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0.20020320-6mdk
- useradd suddenly stopped workin (!) - fixed now...

* Tue Mar 19 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0.20020319-5mdk
- Mr. rpmlint fixes
- the proxy server does not like tabs in the config (!)
- remade the sys5 scripts

* Tue Mar 19 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0.20020319-4mdk
- (who's counting...)
- added P2 & P3 inspired by Peter Brays patches
- broke out the sample movies into a sub package
- removed the sample mp3 file

* Mon Mar 18 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0-3mdk
- third attempt with a better P0 & P1...

* Sun Mar 17 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0-2mdk
- second attempt with a fresh CVS version...

* Sat Mar 16 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 4.0-1mdk
- first attempt at this beast...
- added S1 - S7, P0 - P1