[Macaulay2] 1.5-4

Rex Dieter rdieter at fedoraproject.org
Tue Jan 21 19:07:55 UTC 2014


commit fb3771a3b81a15781f200023c60f570d596c9fb9
Author: Rex Dieter <rdieter at math.unl.edu>
Date:   Tue Jan 21 13:08:09 2014 -0600

    1.5-4
    
    - utilize %_libexecdir/Macaulay2/... for helper/system binaries
    - libdir: %_libdir => %_prefix/lib
    - -common subpkg option (not used yet)

 Macaulay2.spec |   61 +++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 45 insertions(+), 16 deletions(-)
---
diff --git a/Macaulay2.spec b/Macaulay2.spec
index c1f389a..84a1e7a 100644
--- a/Macaulay2.spec
+++ b/Macaulay2.spec
@@ -3,13 +3,17 @@
 
 %global emacs_sitelisp  %{_datadir}/emacs/site-lisp/
 %global xemacs_sitelisp %{_datadir}/xemacs/site-packages/lisp/
+## define to create -common subpkg
+#global common 1
+%global ISSUE %{?fedora:Fedora-%{fedora}}%{?rhel:RedHatEnterprise-%{rhel}}
+%global M2_machine %{_target_cpu}-Linux-%{ISSUE}
 
 %global INFO_FILES AdjointIdeal BGG BIBasis BeginningMacaulay2 Benchmark Binomials BoijSoederberg BooleanGB Browse Bruns ChainComplexExtras CharacteristicClasses Classic ConvexInterface ConwayPolynomials Cyclotomic DGAlgebras Depth Dmodules EdgeIdeals Elimination FirstPackage FormalGroupLaws FourTiTwo FourierMotzkin GenericInitialIdeal GraphicalModels Graphics Graphs HodgeIntegrals HyperplaneArrangements IntegralClosure InvolutiveBases Kronecker KustinMiller LLLBases LexIdeals LocalRings Macaulay2Doc MapleInterface Markov ModuleDeformations MonomialAlgebras MonomialMultiplierIdeals NAGtypes NoetherNormalization NormalToricVarieties Normaliz NumericalAlgebraicGeometry OpenMath PHCpack PackageTemplate Parametrization Parsing PieriMaps Points Polyhedra Polymake Posets PrimaryDecomposition QthPower RandomCanonicalCurves RandomCurves RandomGenus14Curves RandomObjects RandomPlaneCurves RandomSpaceCurves RationalPoints ReesAlgebra Regularity SCSCP SRdeformations Schubert2 SchurFunc
 tors SchurRings Serialization SimpleDoc SimplicialComplexes SimplicialDecomposability StatePolytope Style SymmetricPolynomials TangentCone TensorComplexes Text ToricVectorBundles Units VersalDeformations WeylGroups XML gfanInterface
  
 Summary: System for algebraic geometry and commutative algebra
 Name:    Macaulay2
 Version: 1.5
-Release: 3%{?dist}
+Release: 4%{?dist}
 
 License: GPLv2 or GPLv3
 Group:   Applications/Engineering
@@ -49,8 +53,6 @@ Patch4: Macaulay2-1.5-default_make_targets.patch
 Patch5: Macaulay2-1.5-no_gftables.patch
 # don't use -Werror 
 Patch6: Macaulay2-1.5-no_Werror.patch
-# use fedora version of 4ti2
-Patch7: Macaulay2-1.3.1-fedora_4ti2.patch
 # use fedora/system copy of normaliz
 %global system_normaliz 1
 Patch8: Macaulay2-1.5-system_normaliz.patch
@@ -103,8 +105,12 @@ BuildRequires: normaliz
 Requires: normaliz
 %endif
 
+%if 0%{?common}
+Requires:  Macaulay-common = %{version}-%{release}
+%else
 Obsoletes: Macaulay2-common < %{version}-%{release}
 Provides:  Macaulay2-common = %{version}-%{release}
+%endif
 Obsoletes: Macaulay2-doc < %{version}-%{release} 
 Provides:  Macaulay2-doc = %{version}-%{release}
 Obsoletes: Macaulay2-emacs < %{version}-%{release}
@@ -122,6 +128,13 @@ Macaulay 2 is a new software system devoted to supporting research in
 algebraic geometry and commutative algebra written by Daniel R. Grayson
 and Michael E. Stillman
 
+%package common
+Summary: Common files for %{name}
+Requires: Macaulay2 = %{version}-%{release}
+BuildArch: noarch
+%description common
+%{summary}.
+
 
 %prep
 %setup -q  -n %{name}-%{version}-%{svn}/M2
@@ -144,11 +157,6 @@ install -D -p %{SOURCE100} BUILD/tarfiles/
 %patch4 -p1 -b .default_make_targets
 %patch5 -p1 -b .no_gftables
 %patch6 -p1 -b .no_Werror
-%patch7 -p1 -b .fedora_4ti2
-# 4ti2 binaries are tucked away in %{_libdir}/4ti2/bin/
-# and are thus arch dependant, or figure out a better way to use
-# environment modules here
-sed -i "s|@@LIBDIR@@|%{_libdir}|g" Macaulay2/packages/FourTiTwo.m2
 %if 0%{?system_normaliz}
 %patch8 -p1 -b .system_normaliz
 %endif
@@ -164,13 +172,24 @@ pushd    BUILD/%{_target_platform}/StagingArea/common/share/Macaulay2/Core
 ln -s /usr/share/factory/gftables factory
 popd
 
+# helper binaries (4ti2, normaliz)
+mkdir -p BUILD/%{_target_platform}/StagingArea/%{M2_machine}/libexec/Macaulay2/%{M2_machine}
+pushd    BUILD/%{_target_platform}/StagingArea/%{M2_machine}/libexec/Macaulay2/%{M2_machine}
+for bin in %{_libdir}/4ti2/bin/* %{?system_normaliz:%{_bindir}/normaliz} ; do
+if [ -x "${bin}" ]; then
+  ln -s "${bin}"
+else
+  echo "WARNING: target ${bin} not executable!"
+fi
+done
+popd
+
 
 %build
 
 # We need /sbin:. in PATH to find install-info,etags
 PATH=/sbin:$(pwd):$PATH; export PATH
 
-
 ## configure macro currently broken, due to some odd prefix-checks.  probably fixable -- Rex
 mkdir -p BUILD/%{_target_platform}
 pushd BUILD/%{_target_platform}
@@ -178,8 +197,8 @@ CPPFLAGS="-I%{_includedir}/factory" \
 CFLAGS="%{optflags}" \
 CXXFLAGS="%{optflags}" \
 ../../configure \
+  --with-issue=%{ISSUE} \
   --prefix=%{_prefix} \
-  --libdir="\${prefix}/%{_lib}" \
   --disable-dumpdata \
   --enable-shared \
   --disable-fc-lib-ldflags \
@@ -283,21 +302,31 @@ fi
 [ $2 -eq 0 ] && rm -f %{xemacs_sitelisp}/M2*.el* || :
 
 %files
-%defattr(-,root,root,-)
 %{_bindir}/M2
 %{_datadir}/applications/*Macaulay2.desktop
 %{_datadir}/icons/hicolor/*/*/*
-%{_datadir}/Macaulay2/
-%{_docdir}/Macaulay2/
 %{_infodir}/*.info*
-%{_libdir}/Macaulay2/
-%{_libexecdir}/Macaulay2/
+%dir %{_prefix}/lib/Macaulay2/
+%{_prefix}/lib/Macaulay2/%{M2_machine}
+%dir %{_libexecdir}/Macaulay2/
+%{_libexecdir}/Macaulay2/%{M2_machine}
 %{_mandir}/man1/*
-%ghost %{emacs_sitelisp} 
+%ghost %{emacs_sitelisp}
 %ghost %{xemacs_sitelisp}
 
+%if 0%{?common}
+%files common
+%endif
+%{_datadir}/Macaulay2/
+%{_docdir}/Macaulay2/
+
 
 %changelog
+* Tue Jan 21 2014 Rex Dieter <rdieter at fedoraproject.org> - 1.5-4
+- utilize %%_libexecdir/Macaulay2/... for helper/system binaries
+- libdir: %%_libdir => %%_prefix/lib
+- -common subpkg option (not used yet)
+
 * Tue Jan 14 2014 Jerry James <loganjerry at gmail.com> - 1.5-3
 - Update normaliz interface for normaliz 2.8 and later
 


More information about the scm-commits mailing list