[normaliz] New upstream release. Build now uses cmake. Drop upstreamed patch. Fix license handling.

Jerry James jjames at fedoraproject.org
Fri Aug 8 14:27:09 UTC 2014


commit 6a9184f46bde8be5517b0b46a8be6ae784994d0b
Author: Jerry James <jamesjer at betterlinux.com>
Date:   Fri Aug 8 08:26:45 2014 -0600

    New upstream release.
    Build now uses cmake.
    Drop upstreamed patch.
    Fix license handling.

 .gitignore           |    2 +-
 normaliz-shlib.patch |  142 --------------------------------------------------
 normaliz.spec        |   67 +++++++++++++-----------
 sources              |    2 +-
 4 files changed, 39 insertions(+), 174 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 767dc11..b505999 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/Normaliz2.10.1.zip
+/Normaliz2.11.2.zip
diff --git a/normaliz.spec b/normaliz.spec
index a6d2e6e..9691671 100644
--- a/normaliz.spec
+++ b/normaliz.spec
@@ -1,6 +1,6 @@
 Name:           normaliz
-Version:        2.10.1
-Release:        4%{?dist}
+Version:        2.11.2
+Release:        1%{?dist}
 Summary:        A tool for mathematical computations
 
 License:        GPLv3+
@@ -8,15 +8,13 @@ URL:            http://www.mathematik.uni-osnabrueck.de/normaliz/
 # Warning: This zip-ball contains .jar binaries, source only zip-ball not
 # available
 Source0:        http://www.mathematik.uni-osnabrueck.de/normaliz/Normaliz%{version}/Normaliz%{version}.zip
-# Change the Makefiles to use our build flags, build libnormaliz as a shared
-# library, and link the normaliz binary with the shared library
-Patch0:         %{name}-shlib.patch
 
 BuildRequires:  ant
 BuildRequires:  apache-commons-exec
 BuildRequires:  apache-commons-exec-javadoc
 BuildRequires:  appframework
 BuildRequires:  boost-devel
+BuildRequires:  cmake
 BuildRequires:  gmp-devel
 BuildRequires:  java-devel >= 1:1.6.0
 BuildRequires:  javasysmon
@@ -73,7 +71,6 @@ Javadoc documentation for jNormaliz
 
 %prep
 %setup -q -n Normaliz%{nopatchver}
-%patch0
 
 # Remove prebuilt class files, jars, and javadocs, except for one netbeans jar
 # used for building only (no runtime dependencies).
@@ -85,24 +82,36 @@ ln -s %{_javadir}/appframework.jar lib/appframework-1.0.3.jar
 ln -s %{_javadir}/commons-exec.jar lib/commons-exec-1.0.1.jar
 ln -s %{_javadir}/javasysmon.jar lib/javasysmon.jar
 
-cd source/jNormaliz/lib
+pushd source/jNormaliz/lib
 ln -s %{_javadir}/commons-exec.jar commons-exec-1.0.1/commons-exec-1.0.1.jar
 ln -s %{_javadocdir}/apache-commons-exec commons-exec-1.0.1/apidocs
 ln -s %{_javadir}/javasysmon.jar javasysmon.jar
 ln -s %{_javadir}/junit.jar junit_4/junit-4.5.jar
 ln -s %{_javadir}/appframework.jar swing-app-framework/appframework-1.0.3.jar
+popd
+
+# Don't add a Class-Path to the jar
+sed -i '/Class-Path/d' source/jNormaliz/nbproject/build-impl.xml
+
+# Fix underlinked library
+sed -i '/APPLE/d;/  ENDIF/d' source/libnormaliz/CMakeLists.txt
+
+# Use our compiler flags
+sed -i '/funroll-loops/d' source/CMakeLists.txt
+
+# Fix an incorrect version number in 2.11.2
+sed -i 's/PATCH_VERSION 1/PATCH_VERSION 2/' source/CMakeLists.txt
 
 %build
 # Build the C library and the binaries
-pushd source
-export CXXFLAGS="%{optflags}"
-export NORMFLAGS="-Wl,--as-needed $RPM_LD_FLAGS"
-export VERSION="%{nopatchver}"
-export MAJOR="%(cut -d. -f1 <<< %{version})"
-make %{?_smp_mflags}
+mkdir build
+pushd build
+export LDFLAGS="-Wl,--as-needed $RPM_LD_FLAGS"
+%cmake ../source
+make %{?_smp_mflags} VERBOSE=1
 
 # Build the Java interface and documentation
-cd jNormaliz
+cd ../source/jNormaliz
 ant jar
 ant javadoc
 popd
@@ -118,21 +127,11 @@ do
 done
 popd
 
-mv doc/Normaliz%{nopatchver}Documentation.pdf docs
-mv "doc/Computing the integral closure of an affine semigroup.pdf" \
-    docs/Computing_the_integral_closure_of_an_affine_semigroup.pdf
-
 %install
-# Install the binary
-install -D -m 755 source/normaliz %{buildroot}%{_bindir}/normaliz
-
-# Install the library
-mkdir -p %{buildroot}%{_libdir}
-cp -a source/libnormaliz/libnormaliz.so* %{buildroot}%{_libdir}
-
-# Install the headers
-mkdir -p %{buildroot}%{_includedir}/libnormaliz
-cp -p source/libnormaliz/*.h %{buildroot}%{_includedir}/libnormaliz
+# Install the library, binary, and headers
+pushd build
+make install DESTDIR=%{buildroot}
+popd
 
 # Install the jar
 mkdir -p %{buildroot}%{_javadir}
@@ -147,11 +146,12 @@ cp -a source/jNormaliz/dist/javadoc %{buildroot}%{_javadocdir}/jnormaliz
 %postun -n libnormaliz -p /sbin/ldconfig
 
 %files
-%doc source/COPYING
-%doc docs/*
+%doc docs/* doc/Algorithms*.pdf doc/Challenging*.pdf doc/Computing*.pdf
+%doc doc/Normaliz_*.pdf doc/The*.pdf
 %{_bindir}/normaliz
 
 %files -n libnormaliz
+%license source/COPYING
 %{_libdir}/libnormaliz.so.*
 
 %files -n libnormaliz-devel
@@ -160,12 +160,19 @@ cp -a source/jNormaliz/dist/javadoc %{buildroot}%{_javadocdir}/jnormaliz
 %{_includedir}/libnormaliz/
 
 %files -n jnormaliz
+%doc doc/jNormaliz_*.pdf
 %{_javadir}/jNormaliz.jar
 
 %files -n jnormaliz-javadoc
 %{_javadocdir}/jnormaliz
 
 %changelog
+* Tue Aug  5 2014 Jerry James <loganjerry at gmail.com> - 2.11.2-1
+- New upstream release
+- Build now uses cmake
+- Drop upstreamed patch
+- Fix license handling
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.10.1-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
diff --git a/sources b/sources
index 07ffddf..af3f69c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-639f08130e03c8bf489bd11513b2aaf3  Normaliz2.10.1.zip
+5e98bae501c1addb6048b0a832397db8  Normaliz2.11.2.zip


More information about the scm-commits mailing list