diff --git a/octave.spec b/octave.spec index 9431dfe..0b365b1 100644 --- a/octave.spec +++ b/octave.spec @@ -1,15 +1,24 @@ # From src/version.h:#define OCTAVE_API_VERSION %global octave_api api-v48+ +# For rc versions, change release manually +%global rcver 0 +%if 0%{?rcver:1} +%global rctag -rc%{?rcver} +%endif + Name: octave Version: 3.6.2 -Release: 0.1.rc0%{?dist} +Release: 0.1.rc%{rcver}%{?dist} Summary: A high-level language for numerical computations Epoch: 6 Group: Applications/Engineering License: GPLv3+ -#Source0: ftp://ftp.gnu.org/gnu/octave/octave-%{version}.tar.bz2 -Source0: ftp://alpha.gnu.org/gnu/octave/octave-%{version}-rc0.tar.bz2 +%if 0%{!?rcver:1} +Source0: ftp://ftp.gnu.org/gnu/octave/octave-%{version}.tar.bz2 +%else +Source0: ftp://alpha.gnu.org/gnu/octave/octave-%{version}%{rctag}.tar.bz2 +%endif # RPM macros for helping to build Octave packages Source1: macros.octave # https://savannah.gnu.org/bugs/index.php?32839 @@ -72,7 +81,7 @@ BuildArch: noarch This package contains documentation for Octave. %prep -%setup -q -n %{name}-%{version}-rc0 +%setup -q -n %{name}-%{version}%{?rctag} %patch2 -p1 -b .pkgbuilddir # Check permissions @@ -100,7 +109,7 @@ fi # SMP make still not working in Octave 3.6.0 #make OCTAVE_RELEASE="Fedora %{version}-%{release}" %{?_smp_mflags} -make OCTAVE_RELEASE="Fedora %{version}-%{release}" +make OCTAVE_RELEASE="Fedora %{version}%{?rctag}-%{release}" %install rm -rf %{buildroot} @@ -109,7 +118,7 @@ rm -f %{buildroot}%{_infodir}/dir # Make library links mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d -echo "%{_libdir}/octave/%{version}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/octave-%{_arch}.conf +echo "%{_libdir}/octave/%{version}%{?rctag}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/octave-%{_arch}.conf # Remove RPM_BUILD_ROOT from ls-R files perl -pi -e "s,%{buildroot},," %{buildroot}%{_libdir}/%{name}/ls-R @@ -138,9 +147,9 @@ touch %{buildroot}%{_datadir}/%{name}/octave_packages # Fix multilib installs for include in config defaults oct-conf do - mv %{buildroot}%{_includedir}/%{name}-%{version}/%{name}/${include}.h \ - %{buildroot}%{_includedir}/%{name}-%{version}/%{name}/${include}-%{__isa_bits}.h - cat > %{buildroot}%{_includedir}/%{name}-%{version}/%{name}/${include}.h < %{buildroot}%{_includedir}/%{name}-%{version}%{?rctag}/%{name}/${include}.h < #if __WORDSIZE == 32 @@ -152,9 +161,9 @@ do #endif EOF done -for script in octave-config-%{version} mkoctfile-%{version} +for script in octave-config-%{version}%{?rctag} mkoctfile-%{version}%{?rctag} do - mv %{buildroot}%{_bindir}/${script} %{buildroot}%{_libdir}/%{name}/%{version}/${script} + mv %{buildroot}%{_bindir}/${script} %{buildroot}%{_libdir}/%{name}/%{version}%{?rctag}/${script} cat > %{buildroot}%{_bindir}/${script} <