[bitten] Omit master subpackage on el5, .gitignore extended

Tim Niemueller timn at fedoraproject.org
Mon Feb 21 20:57:26 UTC 2011


commit c123797368507ba3ef5df61b8aa9abf995eaddbe
Author: Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
Date:   Mon Feb 21 21:45:27 2011 +0100

    Omit master subpackage on el5, .gitignore extended
    
    Do not build the master subpackage for el5, because its Trac version is
    too old. The slave still is useful, therefore still provide bitten on
    el5.

 .gitignore  |    5 ++++-
 bitten.spec |   28 ++++++++++++++++++++++++++--
 2 files changed, 30 insertions(+), 3 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2111fdb..2dee42e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,4 @@
-/Bitten-0.6b3.tar.gz
+/Bitten-0.6b3*
+/noarch
+/.build*
+/*.src.rpm
diff --git a/bitten.spec b/bitten.spec
index b698d12..ecc1ebe 100644
--- a/bitten.spec
+++ b/bitten.spec
@@ -20,7 +20,7 @@
 
 Name:           bitten
 Version:        0.6b3
-Release:        0.2%{?dist}
+Release:        0.3%{?dist}
 Summary:        A continuous integration plugin for Trac
 Group:          Development/Tools
 License:        BSD
@@ -49,6 +49,7 @@ Bitten is a Python-based framework for collecting various software metrics via
 continuous integration. It builds on Trac to provide an integrated web-based
 user interface.
 
+%if 0%{?fedora} > 0 || 0%{?rhel} > 5
 %package master
 Summary:        A continuous integration plugin for Trac
 Group:          Development/Tools
@@ -62,7 +63,7 @@ user interface.
 
 This package includes the Bitten master. It integrates into Trac and will
 supply Bitten slaves with build orders.
-
+%endif
 
 %package common
 Summary:        Common files for Bitten master and slave
@@ -108,6 +109,21 @@ cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/bitten-slave
 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/bitten-slave
 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/bitten-slave
 
+%if 0%{?fedora} == 0 && 0%{?rhel} <= 5
+# Remove master files on RHEL 5 because its Trac version is too old
+rm -f $RPM_BUILD_ROOT%{python_sitelib}/bitten/admin.py*
+rm -f $RPM_BUILD_ROOT%{python_sitelib}/bitten/api.py*
+rm -rf $RPM_BUILD_ROOT%{python_sitelib}/bitten/htdocs/
+rm -f $RPM_BUILD_ROOT%{python_sitelib}/bitten/main.py*
+rm -f $RPM_BUILD_ROOT%{python_sitelib}/bitten/master.py*
+rm -f $RPM_BUILD_ROOT%{python_sitelib}/bitten/model.py*
+rm -f $RPM_BUILD_ROOT%{python_sitelib}/bitten/notify.py*
+rm -f $RPM_BUILD_ROOT%{python_sitelib}/bitten/queue.py*
+rm -rf $RPM_BUILD_ROOT%{python_sitelib}/bitten/report/
+rm -rf $RPM_BUILD_ROOT%{python_sitelib}/bitten/templates/
+rm -f $RPM_BUILD_ROOT%{python_sitelib}/bitten/upgrades.py*
+rm -f $RPM_BUILD_ROOT%{python_sitelib}/bitten/web_ui.py*
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -144,6 +160,9 @@ fi
 %{python_sitelib}/bitten/util/
 %{python_sitelib}/Bitten*/
 
+
+%if 0%{?fedora} > 0 || 0%{?rhel} > 5
+
 %files master
 %defattr(-,root,root,-)
 # For noarch packages: sitelib
@@ -160,6 +179,8 @@ fi
 %{python_sitelib}/bitten/upgrades.py*
 %{python_sitelib}/bitten/web_ui.py*
 
+%endif
+
 %files slave
 %defattr(-,root,root,-)
 # For noarch packages: sitelib
@@ -173,6 +194,9 @@ fi
 %dir %attr(-,%username,%username) %{_var}/lib/bitten-slave
 
 %changelog
+* Mon Feb 21 2011 Tim Niemueller <timn at fedoraproject.org> 0.6b3-0.3
+- Do not build master package on el5 (requires Trac 0.11+)
+
 * Sat Feb 19 2011 Tim Niemueller <timn at fedoraproject.org> 0.6b3-0.2
 - Instead of removing the user on deinstall, simply print reminder
 


More information about the scm-commits mailing list