On Fri, 8 Feb 2008, Troy Dawson wrote:
> Jon Peatfield wrote:
>> http://www.damtp.cam.ac.uk/linux/sl/damtp/5x/SRPMS/R-2.6.2-1.SL51.src.rpm
>>
>> The re-build finished quicker than I expected or the typing of that last
>> message took longer (or both).
>
> Hi Jon,
> I got one change for your spec file.
> Right now when you get the release version you do
>
> %define VER %(rpmquery --qf '%{VERSION}' sl-release | sed 's/\\.//g')
>
> I have changed it to
>
> %define VER %(rpmquery --qf '%{VERSION}' sl-release | cut -d'.' -f1)
>
> This gives us the major release number (SL4, SL5) instead of the minor
> release number (41, 51).
> I like this better for two reasons.
> First - The rpm should be able to run on any SL4 or SL5 machine, so the minor
> number isn't really needed.
> Second (and the real reason I changed it) - Later on you have
> %if %{VER} >= 5
> And 41 is greater than 5, so it doesn't build on SL 4, because it's wanting
> everything that is in SL5.
Quite right. The old code was my fault anyway...
> OK, one other change, but this is very minor. For the distro is has SL in
> capitol letters, while RedHat and Centos are in lower case letters (rh,
> centos).
> This is a personal thing, but I like it better in lower case letters.
> Like I said, this change is minor and purely a personal preference, but if
> you want it in capitol letters, leave it.
Changed (I use sl5x as my default disttag). I can't remember why SL was
put in here.
I also spotted that I'd left in a hack:
Release: %{REL}.%{DISTTAG}%{VER}{%?EXTRAREL}
from when I was trying something silly earlier, and that actually despite
the entries in %changelog the epoch in
http://cran.r-project.org/bin/linux/redhat/SRPMS/R.spec was already set to
'2'. I've no idea how I managed to set it to '1' in my build attempts
earlier.
I've removed some (of my) stupidity from the %changelog and attach the
diff -bu against http://cran.r-project.org/bin/linux/redhat/SRPMS/R.spec
I'm rebuilding it again at the moment.
> Thank you for your work on this.
This is nothing compared to our debts to you.
-- Jon
--- R.spec.cran 2008-02-08 21:37:49.000000000 +0000
+++ R.spec 2008-02-08 21:28:24.000000000 +0000
@@ -62,10 +62,21 @@
%if %(rpmquery sl-release | grep -cv 'not installed$')
#Scientific Linux. A RHEL work-alike - http://www.scientificlinux.org
# note nasty use of \\. here grr!
- %define VER %(rpmquery --qf '%{VERSION}' sl-release | sed 's/\\.//g')
- %define DISTTAG SL
+ %define VER %(rpmquery --qf '%{VERSION}' sl-release | cut -d'.' -f1)
+ %define DISTTAG sl
+ %if %{VER} >= 5
+ %define XORG 1
+ %define GCC4 1
+ %define RPDFVIEWER evince
+ %define LINUXOPT 1
+ %define TEXINFOSPLIT 1
+ %define RBROWSER firefox
+ %endif
%endif
+# This will need changing when everyone switches to livetex!
+%define TEXPKG tetex-latex
+
################################################################
%if 0%{?GCC4}
@@ -114,7 +125,7 @@
%define REL 1
Summary: A language for data analysis and graphics
Name: R
-Version: 2.6.1
+Version: 2.6.2
Epoch: 2
Release: %{REL}.%{DISTTAG}%{VER}
Source0: ftp://cran.r-project.org/pub/R/src/base/R-2/R-%{version}.tar.gz
@@ -126,7 +137,7 @@
Icon: logosm-trans.gif
BuildRequires: gcc-c++, gcc-%{FORTRAN}, gcc-objc
BuildRequires: libpng-devel, libjpeg-devel, readline-devel, libtermcap-devel
-BuildRequires: tetex-latex, tcl-devel, tk-devel
+BuildRequires: %{?TEXPKG}, tcl-devel, tk-devel, zip
BuildRequires: %{X11DEV} %{TEXINFO}
%if 0%{?DIFFPKG}
BuildRequires: diffutils
@@ -154,7 +165,7 @@
Requires: gcc-c++, gcc-%{FORTRAN}
Requires: libpng-devel, libjpeg-devel, readline-devel, libtermcap-devel
Requires: %{X11DEV}
-Requires: tetex-latex, texinfo, tcl-devel, tk-devel
+Requires: %{?TEXPKG}, texinfo, tcl-devel, tk-devel
%description devel
Install R-devel if you are going to develop or compile R packages.
@@ -193,6 +204,9 @@
export CXXFLAGS=%{CXXFLAGS}
export FFLAGS=%{FFLAGS}
export LDFLAGS=%{LDFLAGS}
+# only set for hackery
+export PATH=${PATH}%{?PATHADDHACK}
+
( %configure \
--without-blas \
--with-tcl-config=%{_libdir}/tclConfig.sh \
@@ -208,6 +222,9 @@
%install
+# only set for hackery
+export PATH=${PATH}%{?PATHADDHACK}
+
make install install-pdf %{?INFO:install-info} DESTDIR=${RPM_BUILD_ROOT}
rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir
rm -f ${RPM_BUILD_ROOT}%{_infodir}/dir.old
@@ -280,6 +297,12 @@
/sbin/ldconfig
%changelog
+* Fri Feb 8 2008 Jon Peatfield <[log in to unmask]> - 2:2.6.2-1
+- Update to 2.6.2 tweaks to build on sl5. Include fix from SL5x
+ 2.5.0-2 srpm (zip must be a BuildRequires or it won't get listed in
+ etc/Renviron when built via brewbuilder). Correct sl DISTTAG and
+ extraction of VER (from Troy Dawson).
+
* Fri Dec 12 2007 Martyn Plummer <[log in to unmask]> 1:2.6.1-1
- Updated for Fedora 8
|