Blob Blame History Raw
Name:           adevs
Version:        2.7
Release:        3%{?dist}
Summary:        C++ library for constructing discrete event simulation
Group:          System Environment/Libraries
License:        LGPLv2+
URL:            http://www.ornl.gov/~1qn/adevs/
Source0:        http://www.ornl.gov/~1qn/adevs/adevs.tar.gz
# Fixes soname version.
Patch0:         adevs-2.7-install.patch
BuildRequires:  tcl
BuildRequires:  latex2html

%description
Adevs (A Discrete EVent System simulator) is a C++ library for constructing
discrete event simulations based on the Parallel DEVS and Dynamic DEVS
(dynDEVS) formalisms. DEVS has been applied to the study of social systems,
ecological systems, computer networks and computer architecture, military
systems at the tactical and theater levels, and in many other areas

%package devel
Summary:        C++ library for constructing discrete event simulations
Group:          Development/Libraries
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description devel
Header files and development libraries for adevs package.
Adevs (A Discrete EVent System simulator) is a C++ library for constructing
discrete event simulations based on the Parallel DEVS and Dynamic DEVS
(dynDEVS) formalisms.

%package doc
Summary:        API docs and examples for adevs
Group:          Development/Libraries
License:        LGPLv2+ and GPL+ 
BuildArch:      noarch
Requires:       %{name} = %{version}-%{release}

%description doc
Manual, doxygen generated API documentation and C++ examples for Adevs
library.

%prep
%setup -q -n %{name}-%{version}
%patch0 -p1 -b .install

%build
export CFLAGS="%{optflags}"

pushd src
make %{_smp_mflags} adevs OPTFLAG=
popd

pushd docs
# Commented out temporarily to workaround latext2html bug,
# see #991957 for more info.
#make html_manual
rm -f manual/*.aux manual/*.out manual/*.dvi manual/*.log manual/*.toc
popd

find examples -type f -exec sed -i 's/\r//' {} \;
find examples -type f -exec chmod -x {} \;

%check
pushd test
make check_cpp
OMP_NUM_THREADS=4 make check_par
popd

%install
install -m 755 -d %{buildroot}%{_includedir}/adevs
install -p -m 644 -t %{buildroot}%{_includedir}/adevs include/*.h

pushd src
make install DESTDIR=%{buildroot}%{_libdir}
popd

# java support is not enabled yet...
rm -r ./examples/java_life

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%doc README
%{_libdir}/libadevs.so.*

%files devel
%{_includedir}/adevs
%{_libdir}/libadevs.so

%files doc
%doc docs/api docs/manual examples

%changelog
* Thu Aug 22 2013 Jan Kaluza <jkaluza@redhat.com> - 2.7-3
- workaround (temporarily) #991957 by not regenerating docs

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

* Mon Jul 08 2013 Jan Kaluza <jkaluza@redhat.com> - 2.7-1
- updated to new version 2.7

* Tue Jun 18 2013 Jan Kaluza <jkaluza@redhat.com> - 2.6-4
- fix building tests with the newest g++

* Mon Jun 17 2013 Jan Kaluza <jkaluza@redhat.com> - 2.6-3
- rename -docs package to -doc

* Wed Jun 12 2013 Jan Kaluza <jkaluza@redhat.com> - 2.6-2
- add docs, run tests during the build, build with openmp

* Thu Jun 06 2013 Jan Kaluza <jkaluza@redhat.com> - 2.6-1
- Initial Fedora packaging