Patch #1605 2006-10-31 16:18
afb
Adding redhat/automake17 to codeblocks.spec- Download
- 1605-Adding_redhat.patch (2.4 KB)
Index: codeblocks.spec.in
===================================================================
--- codeblocks.spec.in (revision 3163)
+++ codeblocks.spec.in (arbetskopia)
@@ -1,6 +1,7 @@
%define _svnrev %(echo @VERSION@ | cut -c 8-)
%define req_wxgtk 2.6.0
%define _fedora %(if [ -f /etc/fedora-release ]; then echo 1; else echo 0; fi)
+%define _redhat %(if [ -f /etc/redhat-release ]; then echo 1; else echo 0; fi)
%define _suse %(if [ -f /etc/SuSE-release ]; then echo 1; else echo 0; fi)
%define _mandriva %(if [ -f /etc/mandrake-release ]; then echo 1; else echo 0; fi)
%define _version 1.0_0.svn.%{_svnrev}
@@ -21,12 +22,20 @@
%define _mandriva_vernum %(echo "%_{mandriva_version}"|tr -d '.')
%define _release %{_rel}.mdk%{_mandriva_vernum}
%define _distribution %(cat /etc/mandrake-release|cut -f1-4 -d" ")
+%define _redhat 0
%endif
%if %_fedora
%define _fedora_vernum %(cat /etc/fedora-release | cut -f4 -d" ")
%define _release %{_rel}.fc%{_fedora_vernum}
%define _distribution %(cat /etc/fedora-release|cut -f1-4 -d" ")
+%define _redhat 0
%endif
+%if %_redhat
+%define _redhat_prefix %(grep -q "Red Hat Linux" /etc/redhat-release && echo rhl || echo el)
+%define _redhat_vernum %(rpm -qf --queryformat %{VERSION} /etc/redhat-release|tr -d '.')
+%define _release %{_rel}.%{_redhat_prefix}%{_redhat_vernum}
+%define _distribution %(cat /etc/redhat-release)
+%endif
%if %_suse
%if %suse_version >= 930
@@ -38,7 +47,14 @@
%define debugrpm 1
%endif
+%define automake17 0
+%if %_redhat
+%if %_redhat_vernum < 4
+%define automake17 1
+%endif
+%endif
+
Name: codeblocks
Version: %{_version}
Release: %{_release}
@@ -59,7 +75,11 @@
BuildRequires: wxGTK2.6 >= %{req_wxgtk}, wxgtku-devel >= %{req_wxgtk}
%endif
+%if ! %{automake17}
BuildRequires: intltool, gcc-c++, make, gettext, autoconf >= 2.5, automake >= 1.7, libtool >= 1.4, m4
+%else
+BuildRequires: intltool, gcc-c++, make, gettext, autoconf >= 2.5, automake17, libtool >= 1.4, m4
+%endif
BuildRequires: libstdc++, libstdc++-devel
BuildRequires: zip, subversion
@@ -101,7 +121,11 @@
%{?suse_update_config:%{suse_update_config -f}}
%build
+%if ! %{automake17}
./bootstrap
+%else
+ AUTOMAKE=automake-1.7 ACLOCAL=aclocal-1.7 ACLOCAL_FLAGS="-I %{_datadir}/aclocal" ./bootstrap
+%endif
%configure \
--enable-contrib
%__make
History
afb 2006-10-31 16:19
Adds support for RHEL/CentOS, and uses "automake17" RPM on .el3