[gfan] Make package sagemath friendly (#837857)
pcpa
pcpa at fedoraproject.org
Fri Jul 6 16:39:50 UTC 2012
commit 3794d54a214074318fa723d4dc5c0d7a3c841de5
Author: pcpa <paulo.cesar.pereira.de.andrade at gmail.com>
Date: Fri Jul 6 13:39:21 2012 -0400
Make package sagemath friendly (#837857)
gfan-permissive.patch | 18 ++++++++++++++++++
gfan.spec | 43 ++++++++++++++++++++++++++++++-------------
2 files changed, 48 insertions(+), 13 deletions(-)
---
diff --git a/gfan-permissive.patch b/gfan-permissive.patch
new file mode 100644
index 0000000..1f630ef
--- /dev/null
+++ b/gfan-permissive.patch
@@ -0,0 +1,18 @@
+diff -up gfan0.5/app_main.cpp.orig gfan0.5/app_main.cpp
+--- gfan0.5/app_main.cpp.orig 2012-07-05 12:10:18.377378026 -0400
++++ gfan0.5/app_main.cpp 2012-07-05 12:10:24.414378093 -0400
+@@ -76,14 +76,6 @@ public:
+
+ int main()
+ {
+- if(name1[0]==0)
+- {
+- debug<<"This is the Gfan program for computing Groebner fans and tropical varieties.\n"
+- "Use the command \"gfan list\" to view all subcommands.\n"
+- "The command \"gfan\" is deprecate for computing all Groebner bases of an ideal.\n"
+- "Please use subcommand \"gfan _bases\" instead. Awaiting input. <Ctrl>-D to end.\n";
+- }
+-
+ LexicographicTermOrder myOrder;
+
+ PolynomialSet g=FileParser(Stdin).parsePolynomialSetWithRing();
diff --git a/gfan.spec b/gfan.spec
index 2176c60..9215ac1 100644
--- a/gfan.spec
+++ b/gfan.spec
@@ -1,6 +1,6 @@
Name: gfan
Version: 0.5
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Software for Computing Gröbner Fans and Tropical Varieties
Group: Applications/Engineering
License: GPL+
@@ -14,6 +14,9 @@ Patch1: gfan-format.patch
# Sent upstream 2011 Apr 27. Fix warnings that could indicate runtime
# problems.
Patch2: gfan-warning.patch
+# Treate plain "gfan" call as "gfan_bases" call (as done in previous versions)
+# instead of priting warning telling to call it as "gfan_bases" and exiting
+Patch3: gfan-permissive.patch
BuildRequires: cddlib-devel
BuildRequires: gmp-devel
@@ -29,12 +32,20 @@ contains many tools which are useful in the study of Gröbner bases,
initial ideals and tropical geometry. Among these are an interactive
traversal program for Gröbner fans and programs for graphical renderings.
+%package doc
+Summary: Gfan examples and documentation files
+Group: Applications/Engineering
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description doc
+Gfan examples and documentation files.
%prep
%setup -q -n %{name}%{version}
%patch0
%patch1
%patch2
+%patch3 -p1
# manual is non-free
rm -rf doc
@@ -61,6 +72,9 @@ sed -i 's/^gfan/%s/' \
sed -i 's|func.poly|testsuite/0056WeildDivisor/func.poly|g' \
testsuite/0056WeildDivisor/command
+# No need to install a simple upstream Makefile to rsync homepage
+# directory to upstream page.
+rm -f homepage/Makefile
%build
make %{?_smp_mflags} \
@@ -70,27 +84,30 @@ make %{?_smp_mflags} \
%install
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix}
-mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/%{name}
-mv $RPM_BUILD_ROOT%{_bindir}/gfan_* $RPM_BUILD_ROOT%{_libexecdir}/%{name}/
-pushd $RPM_BUILD_ROOT%{_libexecdir}/%{name}/
- for symlink in gfan_*; do
- rm $symlink
- ln -s ../../bin/%{name} $symlink
- done
+pushd $RPM_BUILD_ROOT%{_bindir}
+ ./%{name} installlinks
popd
-# %%check
-# ./gfan _test
+%check
+./gfan _test
%files
-%doc COPYING examples LICENSE
-%{_bindir}/%{name}
-%{_libexecdir}/%{name}
+%doc COPYING LICENSE
+%{_bindir}/*
+%files doc
+%doc examples
+%doc homepage
%changelog
+* Thu Jul 5 2012 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 0.5-4
+- Use gfan itself to create symlinks.
+- Create -doc subpackage and install the homepage dir as documentation.
+- Reenable %%check.
+- Add -permissive patch for sagemath interface.
+
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.5-3
- Rebuilt for c++ ABI breakage
More information about the scm-commits
mailing list