Blob Blame History Raw
Name:           cudd
Version:        2.5.0
Release:        5%{?dist}
Summary:        CU Decision Diagram Package
Group:          Development/Libraries
License:        BSD
URL:            http://vlsi.colorado.edu/~fabio/CUDD/
Source0:        ftp://vlsi.Colorado.EDU/pub/%{name}-%{version}.tar.gz
# This patch was sent upstream in September 2005.
# Build shared libraries as well as static archives, and incidentally unbreak
# parallel make.
Patch0:         cudd-2.5.0-sharedlib.patch
# This patch was sent upstream in September 2005.
# Fix some mixed signed/unsigned operations
Patch1:         cudd-2.5.0-signedness.patch
# This patch was sent upstream in September 2005.
# Don't ignore the return values of certain functions
Patch2:         cudd-2.5.0-retval.patch
# This patch was sent upstream in September 2005.
# Fix a bunch of "used without being initialized" warnings
Patch3:         cudd-2.5.0-init.patch
# This patch was sent upstream in September 2005.
# On 64 bit platforms, fix the size definitions of void * and long.
# Use the correct floating point structure based on endianness.
Patch4:         cudd-2.5.0-arch.patch


%description
CUDD is a package for the manipulation of Binary Decision Diagrams
(BDDs), Algebraic Decision Diagrams (ADDs) and Zero-suppressed
Binary Decision Diagrams (ZDDs).


%package        devel
Summary:        Header files and man pages for %{name}
Group:          Development/Libraries
Requires:       %{name}%{?_isa} = %{version}-%{release}


%description    devel
Development headers and man pages for %{name}.


%package        static
Summary:        Static libraries for %{name}
Group:          Development/Libraries


%description    static
Static libraries for %{name}.


%prep
%setup -q
%patch0
%patch1
%patch2
%patch3
%patch4

# Fix two doc files with DOS line endings
for f in dddmp/README.*; do
  sed 's/\r//' $f > ${f}.fixed
  touch -r $f ${f}.fixed
  mv -f ${f}.fixed $f
done


%build
# Build the shared libraries and binaries
make %{?_smp_mflags} CPPFLAGS="%{optflags}" ICFLAGS="%{optflags} -fPIC" \
  XCFLAGS="-DHAVE_IEEE_754 -DBSD"

# Build the static libraries
make clean
make %{?_smp_mflags} static CPPFLAGS="%{optflags}" ICFLAGS="%{optflags}" \
  XCFLAGS="-DHAVE_IEEE_754 -DBSD"


%install
# Install the shared libraries
mkdir -p $RPM_BUILD_ROOT%{_libdir}
for slib in */*.so; do
  install -p -m 755 ${slib}.%{version} $RPM_BUILD_ROOT%{_libdir}/
  mv ${slib}.2 $RPM_BUILD_ROOT%{_libdir}
  mv ${slib} $RPM_BUILD_ROOT%{_libdir}
done

# Install the static libraries
mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}
for slib in */*.a; do
  install -p -m 644 ${slib} $RPM_BUILD_ROOT%{_libdir}/%{name}/
done

# Install the header files
mkdir -p $RPM_BUILD_ROOT%{_includedir}/%{name}
for hdr in include/*; do
  install -p -m 644 ${hdr} $RPM_BUILD_ROOT%{_includedir}/%{name}/
done

# Install the test binary
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -p -m 0755 nanotrav/nanotrav $RPM_BUILD_ROOT%{_bindir}

# Install the test binary man page
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -p -m 0644 nanotrav/nanotrav.1 $RPM_BUILD_ROOT%{_mandir}/man1

# Put all the documentation in one place for easy installation
mkdir doc
mv cudd/doc doc/cudd
mv dddmp/doc doc/dddmp
mv dddmp/R* doc/dddmp
mv mtr/doc doc/mtr
mv nanotrav/doc doc/nanotrav
mv nanotrav/README doc/nanotrav
mv st/doc doc/st


%post -p /sbin/ldconfig


%postun -p /sbin/ldconfig


%files
%doc README LICENSE RELEASE.NOTES doc/nanotrav
%{_bindir}/nanotrav
%{_libdir}/*.so.*
%{_mandir}/man1/*


%files devel
%doc README LICENSE doc/cudd doc/dddmp doc/mtr doc/st
%{_includedir}/%{name}
%{_libdir}/*.so


%files static
%doc LICENSE
%{_libdir}/%{name}


%changelog
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Mon Feb 20 2012 Jerry James <loganjerry@gmail.com> - 2.5.0-1
- Update to 2.5.0

* Sat Jan  7 2012 Jerry James <loganjerry@gmail.com> - 2.4.2-5
- Rebuild for GCC 4.7
- Minor spec file cleanups

* Fri Mar 11 2011 Jerry James <loganjerry@gmail.com> - 2.4.2-4
- Rebuild for F15
- Remove BuildRoot tag
- Minor cleanups to fix rpmlint warnings

* Wed Jul 7 2010 Conrad Meyer <konrad@tylerc.org> - 2.4.2-3
- Add license to -static subpackage as per new licensing guidelines.

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

* Tue May 12 2009 Jerry James <loganjerry@gmail.com> - 2.4.2-1
- Update to 2.4.2
- Drop upstreamed cudd-2.4.1-strcat.patch
- Merge Mamoru's patch into cudd-2.4.2-sharedlib.patch

* Sun Mar 29 2009 Conrad Meyer <konrad@tylerc.org> - 2.4.1-6
- Use Mamoru's patch (thanks!).

* Sat Mar 28 2009 Conrad Meyer <konrad@tylerc.org> - 2.4.1-5
- Add patch to build obj/ directory. (Resolves missing symbol
  problems.)

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Jan 22 2009 Jerry James <loganjerry@gmail.com> - 2.4.1-3
- Add patches to address various minor build infelicities
- Build both shared and static libraries
- Install the test binary, nanotrav, and its man page
- Gather documentation from all of the subdirectories

* Sun Jan 4 2009 Conrad Meyer <konrad@tylerc.org> - 2.4.1-2
- Add LICENSE, cudd/doc to docs.

* Fri Dec 12 2008 Conrad Meyer <konrad@tylerc.org> - 2.4.1-1
- Initial package.