[NLopt/el5] disable octave-subpkg on el7
Björn Esser
besser82 at fedoraproject.org
Thu Jul 17 10:34:13 UTC 2014
commit 96206f5c65acb24c03c8e3ab589a3164c0b982e9
Author: Björn Esser <bjoern.esser at gmail.com>
Date: Thu Jul 17 12:33:32 2014 +0200
disable octave-subpkg on el7
NLopt.spec | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/NLopt.spec b/NLopt.spec
index 08a2634..4795d05 100644
--- a/NLopt.spec
+++ b/NLopt.spec
@@ -5,6 +5,9 @@
%if 0%{?fedora} || 0%{?rhel} >= 6
%global with_guile 1
%endif # 0%{?fedora} || 0%{?rhel} >= 6
+%if 0%{?fedora} || (0%{?rhel} && 0%{?rhel} <= 6)
+%global with_octave 1
+%endif # 0%{?fedora} || (0%{?rhel} && 0%{?rhel} <= 6)
%if 0%{?fedora} || 0%{?rhel} >= 7
%global with_py 1
%endif # 0%{?fedora} || 0%{?rhel} >= 7
@@ -28,7 +31,7 @@
Name: NLopt
Version: 2.4.2
-Release: 1%{?gitrel}%{?dist}
+Release: 2%{?gitrel}%{?dist}
Summary: Open-Source library for nonlinear optimization
%{?el5:Group: System Environment/Libraries}
@@ -146,6 +149,7 @@ of Guile bindings for %{name}.
%endif # 0%{?with_guile}
+%if 0%{?with_octave}
%package -n octave-%{name}
%global octpkg %{name}
# For compatibility with RHEL <= 6.
@@ -171,6 +175,7 @@ Provides: octave-%{lc_name}%{?_isa} = %{version}-%{release}
%description -n octave-%{name}
This package contains the Octave bindings for %{name}.
+%endif # 0%{?with_octave}
%if 0%{?with_py}
@@ -312,6 +317,7 @@ find %{buildroot} -depth -name '*.*a' -print0 | xargs -0 rm -f
mv -f %{buildroot}%{python3_sitelib}/* %{buildroot}%{python3_sitearch}
%endif # 0%{?with_py3}
+%if 0%{?with_octave}
# Setup octave stuff properly.
mkdir -p %{buildroot}%{octpkgdir}/packinfo
mv %{buildroot}%{octpkglibdir}/*.m %{buildroot}%{octpkgdir}
@@ -337,6 +343,7 @@ function on_uninstall (desc)
error ('Can not uninstall %s installed by the redhat package manager', desc.name);
endfunction
EOF
+%endif # 0%{?with_octave}
%check
@@ -363,7 +370,7 @@ popd
%postun -n guile-%{name} -p /sbin/ldconfig
%endif # 0%{?with_guile}
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?with_octave} && (0%{?fedora} || 0%{?rhel} >= 7)
%post -n octave-%{name}
%octave_cmd pkg rebuild
@@ -387,8 +394,7 @@ fi
%postun -n octave-%{name}
octave -H -q --no-window-system --no-site-file --eval "pkg rebuild"
-%endif
-
+%endif # 0%{?with_octave} && (0%{?fedora} || 0%{?rhel} >= 7)
%files
%doc ChangeLog COPY* NEWS
@@ -412,9 +418,11 @@ octave -H -q --no-window-system --no-site-file --eval "pkg rebuild"
%{_libdir}/lib%{lc_name}_cxx_guile.so
%endif # 0%{?with_guile}
+%if 0%{?with_octave}
%files -n octave-%{name}
%{octpkglibdir}
%{octpkgdir}
+%endif # 0%{?with_octave}
%if 0%{?with_py}
%files -n python-%{name}
@@ -429,6 +437,9 @@ octave -H -q --no-window-system --no-site-file --eval "pkg rebuild"
%endif # 0%{?with_py3}
%changelog
+* Thu Jul 17 2014 Björn Esser <bjoern.esser at gmail.com> - 2.4.2-2
+- disable octave-subpkg on el7
+
* Thu Jul 17 2014 Björn Esser <bjoern.esser at gmail.com> - 2.4.2-1
- new upstream release (#1116586)
- adapted spec to use named conditionals for packages
More information about the ml
mailing list