3fd52cf
Name:           cddlib
3fd52cf
Version:        094f
67f3aa6
Release:        11%{?dist}.2
3fd52cf
Summary:        A library for generating all vertices in convex polyhedrons
3fd52cf
Group:          Applications/Engineering
3fd52cf
License:        GPLv2+
3fd52cf
URL:            http://www.ifor.math.ethz.ch/~fukuda/cdd_home/
eb168b2
#Source0:       ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/%%{name}-094f.tar.gz
3fd52cf
#tar -xzf cddlib-094f.tar.gz
3fd52cf
#rm cddlib-094f/examples-ml/Combinatorica5.m
3fd52cf
#tar -czf cddlib-094-free.tar.gz cddlib-094f/
3fd52cf
Source0:        %{name}-094f-free.tar.bz2
eb168b2
# This patch was last sent upstream on 7 Apr 2011.  It adds the ability to
eb168b2
# create a shared library, rather than a static library only.
eb168b2
Patch0:         cddlib-configure.patch
eb168b2
3fd52cf
BuildRequires:  gmp-devel
eb168b2
BuildRequires:  tex(latex)
3fd52cf
3fd52cf
3fd52cf
%description
3fd52cf
The C-library cddlib is a C implementation of the Double Description 
3fd52cf
Method of Motzkin et al. for generating all vertices (i.e. extreme points)
3fd52cf
and extreme rays of a general convex polyhedron in R^d given by a system 
3fd52cf
of linear inequalities:
3fd52cf
3fd52cf
   P = { x=(x1, ..., xd)^T :  b - A  x  >= 0 }
3fd52cf
3fd52cf
where A is a given m x d real matrix, b is a given m-vector 
3fd52cf
and 0 is the m-vector of all zeros.
3fd52cf
3fd52cf
The program can be used for the reverse operation (i.e. convex hull
3fd52cf
computation). This means that one can move back and forth between 
3fd52cf
an inequality representation and a generator (i.e. vertex and ray) 
3fd52cf
representation of a polyhedron with cdd. Also, cdd can solve a linear
3fd52cf
programming problem, i.e. a problem of maximizing and minimizing 
3fd52cf
a linear function over P.
3fd52cf
3fd52cf
3fd52cf
%package devel
eb168b2
Summary:        Headers for cddlib
eb168b2
Group:          Development/Libraries
eb168b2
Requires:       gmp-devel%{?_isa}
eb168b2
Requires:       %{name}%{?_isa} = %{version}-%{release}
3fd52cf
3fd52cf
%description devel
eb168b2
Include files for cddlib.
eb168b2
eb168b2
eb168b2
%package static
eb168b2
Summary:        Static libraries for cddlib
eb168b2
Group:          Development/Libraries
eb168b2
eb168b2
%description static
eb168b2
Static libraries for cddlib.
3fd52cf
3fd52cf
3fd52cf
%prep
3fd52cf
%setup -q
eb168b2
%patch0 -p1
eb168b2
3fd52cf
# Don't build/install the example programs
3fd52cf
echo -e 'all:\ninstall:' > src/Makefile.in
3fd52cf
echo -e 'all:\ninstall:' > src-gmp/Makefile.in
3fd52cf
# Clean up the examples
3fd52cf
rm -rf src/~
3fd52cf
rm -rf src*/.DS_Store* src*/.gdb_history examples*/.DS_Store*
3fd52cf
rm -rf src-gmp/~
3fd52cf
chmod -x -R examples*/* src*/*
c58279d
rm doc/cddlibman.pdf
3fd52cf
3fd52cf
3fd52cf
%build
3fd52cf
%configure
eb168b2
eb168b2
# Configure finds libgmp and tries to link it with everything.
eb168b2
sed -i 's/ -lgmp//' lib-src/Makefile
eb168b2
3fd52cf
make %{?_smp_mflags}
c58279d
cd doc
c58279d
  pdflatex cddlibman.tex
3fd52cf
3fd52cf
3fd52cf
%install
3fd52cf
rm -rf $RPM_BUILD_ROOT
cc0ec24
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
c58279d
mkdir $RPM_BUILD_ROOT%{_includedir}/cddlib
c58279d
mv $RPM_BUILD_ROOT%{_includedir}/{cdd,cdd_f,cddmp,cddmp_f,cddtypes,cddtypes_f,setoper}.h \
c58279d
  $RPM_BUILD_ROOT%{_includedir}/cddlib/
eb168b2
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
3fd52cf
3fd52cf
eb168b2
%post -p /sbin/ldconfig
eb168b2
eb168b2
eb168b2
%postun -p /sbin/ldconfig
eb168b2
eb168b2
eb168b2
%files
eb168b2
%defattr(-,root,root,-)
eb168b2
%doc AUTHORS ChangeLog COPYING README
eb168b2
%{_libdir}/*.so.*
3fd52cf
3fd52cf
3fd52cf
%files devel
3fd52cf
%defattr(-,root,root,-)
3fd52cf
%doc doc/cddlibman.pdf
3fd52cf
%doc examples* src*
c58279d
%{_includedir}/cddlib
eb168b2
%{_libdir}/*.so
eb168b2
eb168b2
eb168b2
%files static
eb168b2
%defattr(-,root,root,-)
3fd52cf
%{_libdir}/libcdd.a
3fd52cf
%{_libdir}/libcddgmp.a
3fd52cf
3fd52cf
3fd52cf
%changelog
67f3aa6
* Thu Oct 20 2011 Marcela Mašláňová <mmaslano@redhat.com> - 094f-11.2
67f3aa6
- rebuild with new gmp without compat lib
67f3aa6
83467ee
* Mon Oct 10 2011 Peter Schiffer <pschiffe@redhat.com> - 094f-11.1
83467ee
- rebuild with new gmp
83467ee
eb168b2
* Thu Apr  7 2011 Jerry James <loganjerry@gmail.com> - 094f-11
eb168b2
- Build shared libraries as well as static
eb168b2
- Drop BuildRoot and the clean section
eb168b2
009b56c
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 094f-10
009b56c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
009b56c
c0d2d0e
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 094f-9
c0d2d0e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
c0d2d0e
40345a5
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 094f-8
40345a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
40345a5
cc0ec24
* Fri Nov 28 2008 Conrad Meyer <konrad@tylerc.org> - 094f-7
cc0ec24
- Install headers with install -p to save timestamps.
c58279d
- Install headers to namespaced directory.
c58279d
- Generate pdf from latex source.
cc0ec24
3fd52cf
* Fri Oct 31 2008 Conrad Meyer <konrad@tylerc.org> - 094f-6
3fd52cf
- Describe vividly the process whereby the non-free file is
3fd52cf
  stripped from the source tarball.
3fd52cf
3fd52cf
* Thu Oct 30 2008 Conrad Meyer <konrad@tylerc.org> - 094f-5
3fd52cf
- Tarball scrubbed of content we are unable to ship.
3fd52cf
3fd52cf
* Tue Oct 28 2008 Conrad Meyer <konrad@tylerc.org> - 094f-4
3fd52cf
- Remove modules that do not meet licensing guidelines.
3fd52cf
- Don't generate debuginfo.
3fd52cf
3fd52cf
* Tue Oct 28 2008 Conrad Meyer <konrad@tylerc.org> - 094f-3
3fd52cf
- Fix permissions on documentation.
3fd52cf
3fd52cf
* Mon Oct 27 2008 Conrad Meyer <konrad@tylerc.org> - 094f-2
3fd52cf
- Incorporate several suggestions from review.
3fd52cf
3fd52cf
* Thu Sep 25 2008 Conrad Meyer <konrad@tylerc.org> - 094f-1
3fd52cf
- Initial package.