57a046c
Name:           DSDP
57a046c
Version:        5.8
059ec3e
Release:        4%{?dist}
57a046c
Summary:        Software for semidefinite programming
57a046c
57a046c
Group:          Applications/Engineering
57a046c
License:        DSDP
57a046c
URL:            http://www.mcs.anl.gov/hs/software/DSDP/
57a046c
Source0:        http://www.mcs.anl.gov/hs/software/DSDP/DSDP%{version}.tar.gz
57a046c
# Man pages written by Jerry James using text from the sources.
57a046c
# Therefore, the man pages have the same copyright and license as the source.
57a046c
Source1:        DSDP-man.tar.xz
57a046c
# A substitute makefile to fix the brokenness of the distributed Makefiles
57a046c
Source2:        DSDP.Makefile
57a046c
# This patch fixes a buffer overflow in one of the examples.  It has not yet
57a046c
# been sent upstream.
57a046c
Patch0:         DSDP-overflow.patch
57a046c
57a046c
BuildRequires:  atlas-devel
57a046c
BuildRequires:  doxygen
57a046c
BuildRequires:  tex(latex)
57a046c
57a046c
%description
57a046c
DSDP is a free open source implementation of an interior-point method
57a046c
for semidefinite programming.  It provides primal and dual solutions,
57a046c
exploits low-rank structure and sparsity in the data, and has relatively
57a046c
low memory requirements for an interior-point method.  It allows
57a046c
feasible and infeasible starting points and provides approximate
57a046c
certificates of infeasibility when no feasible solution exists.  The
57a046c
dual-scaling algorithm implemented in this package has a convergence
57a046c
proof and worst-case polynomial complexity under mild assumptions on the
57a046c
data.  The software can be used as a set of subroutines, through Matlab,
57a046c
or by reading and writing to data files.  Furthermore, the solver offers
57a046c
scalable parallel performance for large problems and a well documented
57a046c
interface.  Some of the most popular applications of semidefinite
57a046c
programming and linear matrix inequalities (LMI) are model control,
57a046c
truss topology design, and semidefinite relaxations of combinatorial and
57a046c
global optimization problems. 
57a046c
57a046c
%package devel
57a046c
Summary:        Headers and libraries for developing with DSDP
57a046c
Group:          Development/Libraries
57a046c
Requires:       %{name}%{?_isa} = %{version}-%{release}
57a046c
57a046c
%description devel
57a046c
Headers and libraries for developing with DSDP.
57a046c
57a046c
%package examples
57a046c
Summary:        Example programs that use DSDP
57a046c
Group:          Applications/Engineering
57a046c
Requires:       %{name}%{?_isa} = %{version}-%{release}
57a046c
57a046c
%description examples
57a046c
Examples programs that use the DSDP library.
57a046c
57a046c
%prep
57a046c
%setup -q -n %{name}%{version}
57a046c
%setup -q -n %{name}%{version} -T -D -a 1
57a046c
%patch0
57a046c
57a046c
sed -e "s|@RPM_OPT_FLAGS@|${RPM_OPT_FLAGS}|" \
57a046c
    -e "s|@libdir@|%{_libdir}|" \
57a046c
    -e "s|@version@|%{version}|" \
57a046c
    %{SOURCE2} > Makefile
57a046c
57a046c
%build
57a046c
make %{?_smp_mflags}
57a046c
cd docs
57a046c
unzip DSDP5-api-html.zip
57a046c
cd dox
57a046c
rm -fr html images
57a046c
doxygen
57a046c
57a046c
%install
57a046c
# Install the library
57a046c
mkdir -p $RPM_BUILD_ROOT%{_libdir}
57a046c
install -p -m 0755 src/libdsdp.so.%{version} $RPM_BUILD_ROOT%{_libdir}
57a046c
ln -s libdsdp.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libdsdp.so.5
57a046c
ln -s libdsdp.so.5 $RPM_BUILD_ROOT%{_libdir}/libdsdp.so
57a046c
57a046c
# Install the header files
57a046c
mkdir -p $RPM_BUILD_ROOT%{_includedir}
57a046c
cp -a include $RPM_BUILD_ROOT%{_includedir}/DSDP
57a046c
57a046c
# Install the example programs with a dsdp- prefix, except for dsdp5
57a046c
mkdir -p $RPM_BUILD_ROOT%{_bindir}
57a046c
for f in maxcut theta stable color; do
57a046c
  install -p -m 0755 examples/$f $RPM_BUILD_ROOT%{_bindir}/dsdp-$f
57a046c
done
57a046c
install -p -m 0755 examples/dsdp5 $RPM_BUILD_ROOT%{_bindir}
57a046c
57a046c
# Install the man pages
57a046c
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
57a046c
cd man
57a046c
for f in *.1; do
57a046c
  sed "s/@VERSION@/%{version}/" $f > $RPM_BUILD_ROOT%{_mandir}/man1/$f
57a046c
done
57a046c
57a046c
%post -p /sbin/ldconfig
57a046c
57a046c
%postun -p /sbin/ldconfig
57a046c
57a046c
%files
57a046c
%doc dsdp-license docs/DSDP5-Exe-UserGuide.pdf docs/DSDP5-P1289-0905.pdf
57a046c
%{_libdir}/libdsdp.so.*
57a046c
57a046c
%files devel
57a046c
%doc docs/DSDP5-API-UserGuide.pdf docs/dox
57a046c
%{_libdir}/libdsdp.so
57a046c
%{_includedir}/DSDP
57a046c
57a046c
%files examples
57a046c
%doc examples/Contents
57a046c
%{_bindir}/*
57a046c
%{_mandir}/man1/*
57a046c
57a046c
%changelog
059ec3e
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.8-4
059ec3e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
059ec3e
5f410c6
* Sat Jan  7 2012 Jerry James <loganjerry@gmail.com> - 5.8-3
5f410c6
- Rebuild for GCC 4.7
5f410c6
57a046c
* Tue Jun  7 2011 Jerry James <loganjerry@gmail.com> - 5.8-2
57a046c
- Ensure the libraries are installed with the execute bit on
57a046c
- Name the license according to the response from Fedora-Legal
57a046c
57a046c
* Wed May 25 2011 Jerry James <loganjerry@gmail.com> - 5.8-1
57a046c
- Initial RPM