Blob Blame History Raw
# ----------------------------------------------------------------------------
# RPM source for this version of cppad.spec:
# http://www.seanet.com/~bradbell/cppad/cppad-%{version}-%{release}.fc7.src.rpm
# ----------------------------------------------------------------------------
# Known Problems: 
#
# After installation of cppad-doc-%{version} the command
#     rpmlint cppad-doc
# results in the following error message 
#     W: file-not-utf8 /usr/share/doc/cppad-%{version}/pmathmlcss.xsl
# The file pmathmlcss.xsl is the standard presentation MathML style sheet.
# Except for white space and a comment at the top, it is identical to
#     http://www.w3.org/Math/XSL/pmathmlcss.xsl
# (use wget and diff -b to see that this is true).
# ---------------------------------------------------------------------------- 

Name: cppad
Version: 20090303.0
Release: 2%{?dist}
Summary: No base package is installed, see %{name}-devel 

Group: Development/Libraries 
License: GPLv2
URL: http://www.coin-or.org/CppAD/
Source: http://www.coin-or.org/download/source/CppAD/%{name}-%{version}.gpl.tgz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
There is no base %{name} package installation, only %{name}-devel is installed.

# ---------------------------------------------------------------------------
%package devel
Summary: Development libraries for %{name}
Group: Development/Libraries
Provides: %{name} = %{version}%-%{release}

%description devel
We refer to the step by step conversion from an algorithm that computes 
function values to an algorithm that computes derivative values as 
Algorithmic Differentiation (often referred to as Automatic Differentiation.) 
Given a C++ algorithm that computes function values, %{name} generates an 
algorithm that computes its derivative values. A brief introduction to 
Algorithmic Differentiation (AD) can be found at 
http://en.wikipedia.org/wiki/Automatic_differentiation

# ----------------------------------------------------------------------------
%package doc
Summary: Documentation for %{name}
Group: Development/Libraries

%description doc
The %{name}-doc package contains the xml documentation for
the %{name}-devel package. 
Links to an html version of the %{name} documentaiton, 
for the most recent version of %{name}, can be found at web site 
http://www.coin-or.org/CppAD/.
In addition, printable versions of the documentation
as a single web page, in both html and xml, can be found at that web site.

# ----------------------------------------------------------------------------
%prep
%setup -q 

# change example/example.cpp to print out machine epsilon 
cat << EOF > example.sed
/^int main(void)/N
s|^int main(void)\n{|# include <cfloat>\\
int main(void)\\
{       // print machine epsilon\\
        std::cout << "DBL_EPSILON =" << DBL_EPSILON << std::endl;\\
\\
|
EOF
sed -i.stamp example/example.cpp -f example.sed

# See Sat Jan 12 2008  log entry
sed -i.stamp speed/example/example.cpp -e '/Run(speed_test,/d'

# Remove setting of permissions in documentation destination directory.
# Create the doc_prefix directory (if it does not already exist).
# (Note we are not using a postfix directory, so can overwrite its case.)
sed -i.stamp makefile.am \
        -e '/chmod -R .* $(doc_package)/d'
sed -i.stamp makefile.in \
        -e '/chmod -R .* $(doc_package)/d'

%build
%configure --with-Documentation \
           --with-Example \
           --with-TestMore \
           --with-Speed 
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%check
example/example 
test_more/test_more
speed/cppad/cppad     correct 123 true
speed/cppad/cppad     correct 123 false
speed/double/double   correct 123 true
speed/example/example
speed/profile/profile correct 123 true

%clean
# cleanup 
rm -rf $RPM_BUILD_ROOT

%files devel
%defattr(-,root,root,-)
%doc COPYING ChangeLog AUTHORS uw_copy_040507.html
%{_includedir}/%{name}

%files doc
%defattr(-,root,root,-)
%{_docdir}/%{name}-%{version}

# ----------------------------------------------------------------------------
%changelog
* Mon Mar 30 2009 Brad Bell <bradbell at seanet do com> 20080303-2
- Change tabs to spaces in spec file to avoid an rpmlint warning.
- The base package in previous release had no files, hence did not exist.
- Use Provides: in cppad-devel to indicate that it provides cppad.

* Sun Mar 29 2009 Brad Bell <bradbell at seanet dot com> 20080303-1
- Change to newer version of cppad.
- Create a base package that requres both devel and doc sub-packages

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

* Tue Oct 08 2008 Brad Bell <bradbell at seanet dot com> 20080826-1
- Change to newer version of cppad.
- Change download directory to standard coin-or location.
- Remove editing of speed/main.cpp (no longer necessary).
- Add retape argument to check programs in speed directory.

* Fri Apr 04 2008 Brad Bell <bradbell at seanet dot com> 20080403-3
- Patch speed/main.cpp work with newer version of gcc
- (speed/main.cpp had not been tested with new version of gcc.)

* Thu Apr 03 2008 Brad Bell <bradbell at seanet dot com> 20080403-2
- Upload new source with the command
- make new-sources FILES="cppad-20080403.gpl.tgz"

* Thu Apr 03 2008 Brad Bell <bradbell at seanet dot com> 20080403-1
- New upstream version

* Sat Jan 12 2008  Brad Bell <bradbell at seanet dot com> 20071229-6
- Remove speed estimation correctness test because we are not in control of 
- which other jobs are on the machine that is doing the rpmbuild.

* Fri Jan 11 2008  Brad Bell <bradbell at seanet dot com> 20071229-5
- Remove introduction/exp_apx/exp_apx from the set of tests 
- (which should have been done in 20071229-4). 
- From now on test building rpm locally before making tags.

* Thu Jan 10 2008  Brad Bell <bradbell at seanet dot com> 20071229-4
- Add code to print out DBL_EPSILON at the beginning of the example tests.
- Remove --with-Introduction (it only checks by hand calculations that are in 
- AD Introduction section of the documentation). 
- Remove extra --with-Documentation

* Wed Jan 09 2008  Brad Bell <bradbell at seanet dot com> 20071229-3
- I mistakenly tried to make tag 20071229-2 in devel before committing local 
- changes. It appears tag was partially created, but not sure it is correct.
- So I am bumping the version number. 

* Wed Jan 09 2008  Brad Bell <bradbell at seanet dot com> 20071229-2
- Cygwin's version of md5sum puts a <space><star> between the check sum
- and the file name. Fedora build tools expect two spaces, so the star has
- was changed to a space in the devel, F-7, and F-8 sources file.

* Sat Dec 29 2007  Brad Bell <bradbell at seanet dot com> 20071229-1
- Fix gpl_license.sh in upstream source (missed some special cases).

* Thu Dec 27 2007 Brad Bell <bradbell at seanet dot com> 20071225-2
- Fix spelling errors in this file and day of the week errors in %%changelog.
- Add ChangeLog, AUTHORS, uw_copy_040507.html to devel %%doc files.
 
* Tue Dec 25 2007 Brad Bell <bradbell at seanet dot com> 20071225-1
- %%Source points to newly created directory for archived versions cppad
- modify makefile.in so does not set permissions for documentation files

* Fri Dec 21 2007 Brad Bell <bradbell at seanet dot com> 20071221-1
- Added introduction/exp_apx/exp_apx to the list of correctness tests.
- Use %% to avoid macro expansion in %%changelog.
- Remove tabs from this spec file.
- Remove period from end of base package summary.
- Change upstream makefile.am so that it copies directories instead of files.

* Thu Dec 20 2007 Brad Bell <bradbell at seanet dot com> 20071208-2
- Increment release number each time a new spec file is uploaded.
- Use the commands %%configure, %%check.
- Remove the %%doc command.
- Use more macros, including %%{?_smp_mflags}, %%{_includedir}, %%{_docdir}.

* Thu Dec 20 2007 Brad Bell <bradbell at seanet dot com> 20071208-1
- Remove comments, except for those that are useful to a fedora reviewer. 
- Use different Summary and description for each sub-package.
- Use %%{?dist} in Release entry.
- Use %%(%%{__id_u} -n) in BuildRoot entry. 
- Use noarch in BuildArch entry.
- Move -rf $RPM_BUILD_ROOT from prep entry to install entry.
- Use macros where possible.

* Sat Dec 08 2007 Brad Bell <bradbell at seanet dot com> 20071208-1
- Fix all but one rpmlint warning (see Notes at beginning of this file).

* Mon Dec 03 2007 Brad Bell <bradbell at seanet dot com> 20071203-1
- first version of cppad that included RPM spec file.