%define gst_minver 0.10.11 %define gstpb_minver 0.10.11 %define gstpy_minver 0.10.4 %define pygtk_minver 2.10.0 %define kiwi_minver 1.9.13 %define gstreamer gstreamer Name: flumotion Version: 0.10.0 Release: 1%{?dist} Summary: Streaming Server based on GStreamer and Twisted Group: Applications/Internet License: LGPLv2 URL: http://www.flumotion.net/ Source: http://www.flumotion.net/src/flumotion/%{name}-%{version}.tar.bz2 Requires: python >= 2.4 Requires: %{gstreamer} >= %{gst_minver} Requires: %{gstreamer}-plugins-base >= %{gstpb_minver} Requires: %{gstreamer}-python >= %{gstpy_minver} Requires: python-twisted-core Requires: python-twisted-names Requires: python-twisted-web Requires: python-twisted-conch Requires: pygtk2 >= %{pygtk_minver} Requires: python-imaging Requires: pyOpenSSL Requires: pkgconfig Requires: python-crypto Requires: python-kiwi >= %{kiwi_minver} # for make-dummy-cert to work Requires(post): openssl BuildRequires: %{gstreamer}-devel >= %{gst_minver} BuildRequires: %{gstreamer}-python >= %{gstpy_minver} BuildRequires: python-twisted-core BuildRequires: python-twisted-names BuildRequires: python-twisted-web BuildRequires: python-devel BuildRequires: pygtk2-devel BuildRequires: gtk2-devel BuildRequires: python-kiwi >= %{kiwi_minver} # docs BuildRequires: epydoc BuildRequires: xorg-x11-server-Xvfb # sigh, libtool BuildRequires: gcc-c++ BuildRequires: desktop-file-utils # even though intltool is included, this dependency pulls in perl(XML::Parser) # which is needed at configure time. BuildRequires: gettext BuildRequires: intltool # since we compile pytrayicon, we're no longer noarch # BuildArch: noarch %description Flumotion is a GPL streaming media server written in Python. It is distributed and component-based: every step in the streaming process (production, conversion, consumption) can be run inside a separate process on separate machines. Flumotion uses Twisted and GStreamer. Twisted enables the high-level functionality, distributing components over the network. GStreamer, through the Python bindings, enables the high-speed low-level functionality: actual media processing. Flumotion uses a central manager process to control the complete network; one or more worker processes distributed over machines to run actual streaming components; and one or more admin clients connecting to the manager to control it. %prep %setup -q %build %configure make EPYDOC_ARGS"= -q --no-frames --html" %install rm -rf $RPM_BUILD_ROOT # use DESTDIR so compiled python files get tagged correctly with their # final location make DESTDIR=$RPM_BUILD_ROOT install # desktop file desktop-file-install \ --vendor fedora \ --mode 644 \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ --add-category X-Fedora \ --add-category X-Streamer \ --delete-original \ $RPM_BUILD_ROOT%{_datadir}/applications/flumotion-admin.desktop mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/flumotion # install service files install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d install -m 755 \ doc/redhat/flumotion \ $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d # create log and run and cache directory install -d $RPM_BUILD_ROOT%{_localstatedir}/log/flumotion install -d $RPM_BUILD_ROOT%{_localstatedir}/run/flumotion install -d $RPM_BUILD_ROOT%{_localstatedir}/cache/flumotion # Install the logrotate entry %{__install} -m 0644 -D doc/redhat/flumotion.logrotate \ %{buildroot}%{_sysconfdir}/logrotate.d/flumotion %find_lang flumotion %clean rm -rf $RPM_BUILD_ROOT %pre /usr/sbin/useradd -s /sbin/nologin \ -r -d %{_localstatedir}/cache/flumotion -M \ flumotion > /dev/null 2> /dev/null || : # for old installs, we need to move the homedir /usr/sbin/usermod -d %{_localstatedir}/cache/flumotion \ flumotion > /dev/null 2> /dev/null || : %post /sbin/chkconfig --add flumotion # generate a default .pem certificate ? PEM_FILE="%{_sysconfdir}/flumotion/default.pem" if ! test -e ${PEM_FILE} then sh %{_datadir}/flumotion/make-dummy-cert ${PEM_FILE} chown :flumotion ${PEM_FILE} chmod 640 ${PEM_FILE} fi # create a default planet config if no manager configs present # the default login will be user/test if ! test -e %{_sysconfdir}/flumotion/managers then mkdir -p %{_sysconfdir}/flumotion/managers/default/flows cat > %{_sysconfdir}/flumotion/managers/default/planet.xml < localhost EOF fi # create a default worker config if no worker configs present # the default login will be user/test if ! test -e %{_sysconfdir}/flumotion/workers then mkdir -p %{_sysconfdir}/flumotion/workers cat > %{_sysconfdir}/flumotion/workers/default.xml < user test EOF fi %preun # if removal and not upgrade, stop the processes, clean up locks if [ $1 -eq 0 ] then /sbin/service flumotion stop > /dev/null rm -rf %{_localstatedir}/lock/flumotion* rm -rf %{_localstatedir}/run/flumotion* # clean out the cache/home dir too, without deleting it or the user rm -rf %{_localstatedir}/cache/flumotion/* rm -rf %{_localstatedir}/cache/flumotion/.[^.]* /sbin/chkconfig --del flumotion fi # Think about this first, we don't really want to stop everything #%postun # if [ $1 -ge 1 ]; then # /sbin/service flumotion condrestart # fi %files -f flumotion.lang %defattr(-,root,root,-) %doc ChangeLog COPYING README AUTHORS flumotion.doap %doc doc/reference/html %doc conf %config(noreplace) %{_sysconfdir}/logrotate.d/flumotion %{_bindir}/flumotion-manager %{_bindir}/flumotion-worker %{_bindir}/flumotion-admin %{_bindir}/flumotion-admin-text %{_bindir}/flumotion-command %{_bindir}/flumotion-tester %{_bindir}/flumotion-job %{_bindir}/flumotion-inspect %{_bindir}/flumotion-launch %{_bindir}/flumotion-rrdmon %{_bindir}/flumotion-nagios %{_sbindir}/flumotion %{_libdir}/flumotion %{_libdir}/pkgconfig/flumotion.pc %{_datadir}/applications/*.desktop %{_datadir}/pixmaps/* %{_mandir}/man1/flumotion*.1* %dir %{_datadir}/flumotion %{_datadir}/flumotion/glade %{_datadir}/flumotion/image %{_datadir}/flumotion/make-dummy-cert %{_datadir}/flumotion/*.xsl %{_datadir}/flumotion/*.html %{_datadir}/hal/fdi/policy/20thirdparty/91-flumotion-device-policy.fdi %attr(750,root,flumotion) %{_sysconfdir}/flumotion %attr(770,root,flumotion) %{_localstatedir}/run/flumotion %attr(770,root,flumotion) %{_localstatedir}/log/flumotion %attr(770,root,flumotion) %{_localstatedir}/cache/flumotion %{_sysconfdir}/rc.d/init.d/flumotion %changelog * Fri Apr 29 2011 Thomas Vander Stichele - 0.8.1-1 - New stable release * Tue Feb 08 2011 Fedora Release Engineering - 0.8.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Tue Sep 28 2010 Peter Robinson - 0.8.0-1 - New 0.8.0 stable release * Wed Aug 11 2010 David Malcolm - 0.6.1-2 - recompiling .py files against Python 2.7 (rhbz#623296) * Sun Nov 15 2009 Thomas Vander Stichele - 0.6.1-1 - Move to 0.6.1 release - Added flumotion-nagios and flumotion-rrdmon - Added cortado html - Added hal device policy * Sun Sep 27 2009 Orcan Ogetbil - 0.4.2-10 - Update desktop file according to F-12 FedoraStudio feature * Fri Jul 24 2009 Fedora Release Engineering - 0.4.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Tue Feb 24 2009 Fedora Release Engineering - 0.4.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Mon Dec 01 2008 Ignacio Vazquez-Abrams - 0.4.2-7 - Rebuild for Python 2.6 * Sun Nov 23 2008 Thomas Vander Stichele - 0.4.2-6 - updated summary and description - not rebuilt yet * Fri Apr 11 2008 Alex Lancaster - 0.4.2-5 - Override epydoc option as --ignore-param-mismatch appears not to be supported by the version 3 of epydoc in F-9. - Fix License tag: GPLv2. * Fri Mar 07 2008 Thomas Vander Stichele - 0.4.2-4 - Change pycrypto dependency to python-crypto, which is the actual package name * Tue Feb 19 2008 Fedora Release Engineering - 0.4.2-3 - Autorebuild for GCC 4.3 * Wed May 16 2007 Thomas Vander Stichele - 0.4.2-2 - Own datadir/flumotion. Fixes #233834. - Require pycrypto for the sha256 bouncer. * Sat Apr 14 2007 Thomas Vander Stichele - 0.4.2-1 - new upstream release * Mon Jan 22 2007 Andy Wingo - Make the run, log, and cache directories group-writable, so that processes can manage their own pid, log files, and registry caches. * Tue Dec 19 2006 Thomas Vander Stichele - switch around to root:flumotion for ownership of various directories, allowing users in the flumotion group to see logs and config - remove flumotion cache/home dir contents - clean up commenting in manager config * Fri Sep 29 2006 Thomas Vander Stichele - 0.2.2-1 - new upstream release * Thu Sep 07 2006 Thomas Vander Stichele - 0.2.1-3 - trigger rebuild * Sun Sep 03 2006 Thomas Vander Stichele - move chkconfig --del to within the if * Sun Jun 18 2006 Thomas Vander Stichele - 0.2.2-2 - only create default worker if there is not /etc/flumotion/workers - only create default manager if there is not /etc/flumotion/managers - make gstreamer versions defines - change flumotion home directory to /var/cache/flumotion * Mon May 08 2006 Thomas Vander Stichele - 0.2.1-1 - new upstream release - fix post script for creating worker config * Fri Mar 17 2006 Thomas Vander Stichele - 0.2.0-2 - require pyOpenSSL, without which the manager does not start - use /var/cache/flumotion as the home dir, so that the cache can be written, instead of using datadir * Sun Mar 05 2006 Thomas Vander Stichele - 0.2.0-1 - new upstream release * Fri May 20 2005 Thomas Vander Stichele - 0.1.8-1 - new upstream release * Thu Apr 21 2005 Thomas Vander Stichele - Use desktop-file-utils * Mon Feb 14 2005 Christian Schaller - Add desktop file for admin tool and icon * Thu Nov 11 2004 Thomas Vander Stichele - Integrate changes from issue 86 * Fri Nov 05 2004 Christian Schaller - Add call to chkconfig script in post and preun parts to get our service into the service list * Fri Nov 05 2004 Thomas Vander Stichele - use DESTDIR install to fix python compiles * Mon Jun 07 2004 Thomas Vander Stichele - first package