%define _hardened_build 1 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} # eval to 2.3 if python isn't yet present, workaround for no python in fc4 minimal buildroot %{!?python_version: %define python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]' || echo "2.3")} Name: distcc Version: 3.2rc1 Release: %mkrel 11 Summary: Distributed C/C++ compilation Group: Development/Tools License: GPLv2+ URL: http://distcc.org/ Source0: http://distcc.googlecode.com/files/%{name}-%{version}.tar.bz2 Source1: hosts.sample Source2: distccd.service #Patch0: distcc-2.18.3-avahi.patch Patch0: distcc-minilzo-2.08.patch Patch1: distcc-3.2rc1-mga-fix-sv-coding-in-distccmon-gnome.desktop.patch BuildRequires: popt-devel BuildRequires: gnomeui2-devel BuildRequires: pango-devel BuildRequires: python-devel BuildRequires: desktop-file-utils BuildRequires: avahi-common-devel BuildRequires: avahi-client-devel BuildRequires: avahi-core-devel %description distcc is a program to distribute compilation of C or C++ code across several machines on a network. distcc should always generate the same results as a local compile, is simple to install and use, and is often two or more times faster than a local compile. %package server Summary: Server for distributed C/C++ compilation Group: Development/Tools License: GPLv2+ Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units %description server This package contains the compilation server needed to use %{name}. %prep %setup -q #%%patch0 -p1 -b .avahi %patch0 -p1 %patch1 -p0 %build %configure --with-gnome --with-docdir=%{_datadir}/doc/%{name}-%{version} --disable-Werror %make %install %makeinstall_std # Move desktop file to right directory mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications mv $RPM_BUILD_ROOT%{_datadir}/%{name}/*.desktop $RPM_BUILD_ROOT%{_datadir}/applications/ sed -i 's@Icon=@Icon=%{_datadir}/%{name}/@' $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop # Install sample hosts file install -Dm 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/hosts # Install sample distccd config file install -Dm 0644 contrib/redhat/sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/distccd # Install distcdd unit file mkdir -p $RPM_BUILD_ROOT%{_unitdir} install -Dm 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/distccd.service %post server #[ $1 -lt 2 ] && /sbin/chkconfig --add distccd ||: if [ $1 -eq 1 ] ; then # Initial installation /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : fi %preun server #[ $1 -eq 0 ] && /sbin/chkconfig --del distccd ||: if [ $1 -eq 0 ] ; then # Package removal, not upgrade /usr/bin/systemctl --no-reload disable distccd.service > /dev/null 2>&1 || : /usr/bin/systemctl stop distccd.service > /dev/null 2>&1 || : fi %postun server /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall /usr/bin/systemctl try-restart distccd.service >/dev/null 2>&1 || : fi %files %doc %{_datadir}/doc/%{name}-%{version} %{_bindir}/distcc %{_bindir}/distccmon* %{_bindir}/lsdistcc %{_bindir}/pump %{_mandir}/man1/distcc.* %{_mandir}/man1/distccmon* %{_datadir}/%{name} %{_datadir}/applications/*.desktop %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/hosts %files server %doc COPYING README %{_bindir}/distccd %{_unitdir}/* %{_sysconfdir}/default/distcc %{_sysconfdir}/distcc/*allow* %{_mandir}/man1/distccd* %{_mandir}/man1/include_server* %{_mandir}/man1/pump* %config(noreplace) %{_sysconfdir}/sysconfig/distccd %{python_sitearch}/include_server* %changelog * Mon Feb 08 2016 umeabot <umeabot> 3.2rc1-11.mga6 + Revision: 943260 - Mageia 6 Mass Rebuild * Wed Oct 15 2014 umeabot <umeabot> 3.2rc1-10.mga5 + Revision: 748197 - Second Mageia 5 Mass Rebuild * Sat Sep 27 2014 tv <tv> 3.2rc1-9.mga5 + Revision: 726140 - rebuild for missing pythoneggs deps * Tue Sep 16 2014 umeabot <umeabot> 3.2rc1-8.mga5 + Revision: 678759 - Mageia 5 Mass Rebuild * Wed Aug 20 2014 luigiwalser <luigiwalser> 3.2rc1-7.mga5 + Revision: 666075 - add patch from fedora to fix CVE-2014-4607 in bundled minilzo * Sat May 31 2014 pterjan <pterjan> 3.2rc1-6.mga5 + Revision: 628161 - Rebuild for new Python * Tue Oct 22 2013 umeabot <umeabot> 3.2rc1-5.mga4 + Revision: 542536 - Mageia 4 Mass Rebuild * Mon Oct 14 2013 pterjan <pterjan> 3.2rc1-4.mga4 + Revision: 497728 - Rebuild to add different pythonegg provides for python 2 and 3 * Fri Jan 11 2013 umeabot <umeabot> 3.2rc1-3.mga3 + Revision: 348827 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Fri Jan 04 2013 kamil <kamil> 3.2rc1-2.mga3 + Revision: 338794 - add P0: mga-fix-sv-coding-in-distccmon-gnome.desktop.patch - remove triggerrun - adapt for Mageia - imported package distcc * Thu Oct 25 2012 Jon Ciesla <limburgher@gmail.com> - 3.2rc1-1 - Latest upstream, BZ 870200. * Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri Apr 13 2012 Jon Ciesla <limburgher@gmail.com> - 3.1-6 - Add hardened build. * Tue Jan 31 2012 Jon Ciesla <limburgher@gmail.com> - 3.1-5 - Migrate to systemd, BZ 770409. * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Thu Nov 10 2011 Jon Ciesla <limb@jcomserv.net> - 3.1-3 - Rebuild for libpng 1.5. * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Thu Oct 07 2010 Jon Ciesla <limb@jcomserv.net> - 3.1-1 - New upstream, BZ 641032. * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.18.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.18.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Fri Feb 22 2008 Denis Leroy <denis@poolshark.org> - 2.18.3-4 - Added Avahi support patch from Lennart * Tue Feb 19 2008 Denis Leroy <denis@poolshark.org> - 2.18.3-3 - LSB header for init script * Mon Feb 18 2008 Denis Leroy <denis@poolshark.org> - 2.18.3-2 - Fixed Source0 URL, fixed init script * Mon Feb 4 2008 Denis Leroy <denis@poolshark.org> - 2.18.3-1 - First version