Blob Blame History Raw
Name:           cudd
Version:        2.4.2
Release:        3%{?dist}
Summary:        CU Decision Diagram Package
Group:          Development/Libraries
License:        BSD
URL:            http://vlsi.colorado.edu/~fabio/CUDD/
Source0:        ftp://vlsi.Colorado.EDU/pub/cudd-%{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.4.2-sharedlib.patch
# This patch was sent upstream in September 2005.
# Fix some mixed signed/unsigned operations
Patch1:         cudd-2.4.2-signedness.patch
# This patch was sent upstream in September 2005.
# Don't ignore the return values of certain functions
Patch2:         cudd-2.4.2-retval.patch
# This patch was sent upstream in September 2005.
# Fix a bunch of "used without being initialized" warnings
Patch3:         cudd-2.4.2-init.patch
# This patch was sent upstream in September 2005.
# On 64 bit platforms, fix the size definitions of void * and long
Patch4:         cudd-2.4.2-64bit.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)


%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} = %{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 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

# Fix two doc files with DOS line endings
sed -i 's/\r//' dddmp/README.dddmp
sed -i 's/\r//' dddmp/README.testdddmp


%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
rm -rf $RPM_BUILD_ROOT

# 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


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README LICENSE RELEASE.NOTES doc/nanotrav
%{_bindir}/nanotrav
%{_libdir}/*.so.*
%{_mandir}/man1/*


%files devel
%defattr(-,root,root,-)
%doc README LICENSE doc/cudd doc/dddmp doc/mtr doc/st
%{_includedir}/%{name}
%{_libdir}/*.so


%files static
%defattr(-,root,root,-)
%doc LICENSE
%{_libdir}/%{name}


%changelog
* 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.