### Files

``````Name:           cddlib
Version:        094f
Release:        11%{?dist}.1
Summary:        A library for generating all vertices in convex polyhedrons
Group:          Applications/Engineering
URL:            http://www.ifor.math.ethz.ch/~fukuda/cdd_home/
#Source0:       ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/%%{name}-094f.tar.gz
#tar -xzf cddlib-094f.tar.gz
#rm cddlib-094f/examples-ml/Combinatorica5.m
#tar -czf cddlib-094-free.tar.gz cddlib-094f/
Source0:        %{name}-094f-free.tar.bz2
# This patch was last sent upstream on 7 Apr 2011.  It adds the ability to
# create a shared library, rather than a static library only.
Patch0:         cddlib-configure.patch

BuildRequires:  gmp-devel
BuildRequires:  tex(latex)

%description
The C-library cddlib is a C implementation of the Double Description
Method of Motzkin et al. for generating all vertices (i.e. extreme points)
and extreme rays of a general convex polyhedron in R^d given by a system
of linear inequalities:

P = { x=(x1, ..., xd)^T :  b - A  x  >= 0 }

where A is a given m x d real matrix, b is a given m-vector
and 0 is the m-vector of all zeros.

The program can be used for the reverse operation (i.e. convex hull
computation). This means that one can move back and forth between
an inequality representation and a generator (i.e. vertex and ray)
representation of a polyhedron with cdd. Also, cdd can solve a linear
programming problem, i.e. a problem of maximizing and minimizing
a linear function over P.

%package devel
Group:          Development/Libraries
Requires:       gmp-devel%{?_isa}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description devel
Include files for cddlib.

%package static
Summary:        Static libraries for cddlib
Group:          Development/Libraries

%description static
Static libraries for cddlib.

%prep
%setup -q
%patch0 -p1

# Don't build/install the example programs
echo -e 'all:\ninstall:' > src/Makefile.in
echo -e 'all:\ninstall:' > src-gmp/Makefile.in
# Clean up the examples
rm -rf src/~
rm -rf src*/.DS_Store* src*/.gdb_history examples*/.DS_Store*
rm -rf src-gmp/~
chmod -x -R examples*/* src*/*
rm doc/cddlibman.pdf

%build
%configure

# Configure finds libgmp and tries to link it with everything.
sed -i 's/ -lgmp//' lib-src/Makefile

make %{?_smp_mflags}
cd doc
pdflatex cddlibman.tex

%install
rm -rf \$RPM_BUILD_ROOT
make install DESTDIR=\$RPM_BUILD_ROOT INSTALL="install -p"
mkdir \$RPM_BUILD_ROOT%{_includedir}/cddlib
mv \$RPM_BUILD_ROOT%{_includedir}/{cdd,cdd_f,cddmp,cddmp_f,cddtypes,cddtypes_f,setoper}.h \
\$RPM_BUILD_ROOT%{_includedir}/cddlib/
rm -f \$RPM_BUILD_ROOT%{_libdir}/*.la

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root,-)
%doc doc/cddlibman.pdf
%doc examples* src*
%{_includedir}/cddlib
%{_libdir}/*.so

%files static
%defattr(-,root,root,-)
%{_libdir}/libcdd.a
%{_libdir}/libcddgmp.a

%changelog
* Mon Oct 10 2011 Peter Schiffer <pschiffe@redhat.com> - 094f-11.1
- rebuild with new gmp

* Thu Apr  7 2011 Jerry James <loganjerry@gmail.com> - 094f-11
- Build shared libraries as well as static
- Drop BuildRoot and the clean section

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 094f-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 094f-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 094f-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

- Install headers with install -p to save timestamps.
- Install headers to namespaced directory.
- Generate pdf from latex source.

- Describe vividly the process whereby the non-free file is
stripped from the source tarball.

- Tarball scrubbed of content we are unable to ship.