1. Change name of sources to be exactly the same as on github.

2. improve comments in cppad.spec.
This commit is contained in:
Brad Bell 2019-02-01 07:45:52 -07:00
commit 1220f6aa56
3 changed files with 19 additions and 19 deletions

8
.gitignore vendored
View file

@ -13,7 +13,7 @@
/new/
/new.*/
# ---------------------------------------------------------------------------
# soruce code
/CppAD-20190200.0.tar.gz
# documentation
/CppAD-20190200.doc.tar.gz
# source code tarball creates CppAD-20190200.0
/20190200.0.tar.gz
# documentation tarball creates CppAD-20190200.doc
/20190200.doc.tar.gz

View file

@ -31,13 +31,10 @@ Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc
# change (see mention of cppad_lib below).
%global debug_package %{nil}
# Note that the upstream sources have been named the same as thier directories;
# CppAD-%%{version} and CppAD-%%{yyyymmdd}.doc
License: EPL2.0 or (GPL2 or later)
URL: http://coin-or.github.io/CppAD
Source: https://github.com/coin-or/CppAD/archive/%{version}.tar.gz
Source1: https://github.com/coin-or/CppAD/archive/%{yyyymmdd}.doc.tar.gz
Source1: https://github.com/coin-or/CppAD/archive/%{version}.tar.gz
Source2: https://github.com/coin-or/CppAD/archive/%{yyyymmdd}.doc.tar.gz
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake >= 2.8
@ -81,15 +78,15 @@ The documentation, for the most recent version of %{name}, can be found at
# -----------------------------------------------------------------------------
%prep
#
# The source code tarball
# This source code tarball creates CppAD-%%{version}
rm -rf CppAD-%{version}
tar -xzf %{_topdir}/SOURCES/CppAD-%{version}.tar.gz
tar -xzf %{_topdir}/SOURCES/%{version}.tar.gz
#
# The documentation tarball
# This documentation tarball creates CppAD-%%{yyymmdd}.doc
rm -rf CppAD-%{yyyymmdd}.doc
tar -xzf %{_topdir}/SOURCES/CppAD-%{yyyymmdd}.doc.tar.gz
tar -xzf %{_topdir}/SOURCES/%{yyyymmdd}.doc.tar.gz
#
# move the documentaion to this build directory
# move the documentaion to the build directory
mv CppAD-%{yyyymmdd}.doc/doc CppAD-%{version}/doc
mv CppAD-%{version}/COPYING COPYING
mv CppAD-%{version}/uw_copy_040507.html uw_copy_040507.html
@ -103,12 +100,12 @@ sed -e "s|\${cppad_SOURCE_DIR}/include|SYSTEM $includedir|" \
# build
# -----------------------------------------------------------------------------
%build
# See https://fedoraproject.org/wiki/Packaging:Cmake?rd=Packaging/cmake
# and http://www.coin-or.org/CppAD/Doc/cmake.htm
#
# Cannot use %%{_includedir}, $${_libdir}, %%{_datadir}, %%{_docdir}
# because they are absolute paths. Relative values would be more flexible
# because they can be combined with %%{_prefix} to get absolute values.
# The last argument to the cmake command is the directory created using
# the souce code tarball.
cppad_cxx_flags='-Wall -pedantic-errors -std=c++11 -Wshadow -Wconversion'
%cmake --version
%cmake \
@ -138,6 +135,7 @@ cppad_cxx_flags='-Wall -pedantic-errors -std=c++11 -Wshadow -Wconversion'
-D cppad_tape_addr_type=size_t \
-D cppad_deprecated=NO \
CppAD-%{version}
#
make %{?_smp_mflags}
# -----------------------------------------------------------------------------
@ -148,12 +146,14 @@ rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
%files devel
%doc COPYING uw_copy_040507.html
%{_includedir}/%{name}
%{_datadir}/pkgconfig/%{name}.pc
%{_libdir}/pkgconfig/%{name}.pc
# These documentation files come from the source code tarball
%doc COPYING uw_copy_040507.html
%files doc
# These documentation files come from the docukentation tarball
%{_docdir}/%{name}
# -----------------------------------------------------------------------------

View file

@ -1,2 +1,2 @@
SHA512 (CppAD-20190200.0.tar.gz) = 2cd77d56b141f58f5bf2bfc75b17ac663e6f5696f43bb18219e94289000f45acb148eee2dec445813aada01e55ed560888e69f8c32ced359df5472938efec6a8
SHA512 (CppAD-20190200.doc.tar.gz) = 7543960efd81fbf0186397b63953b927ec5cfd1f0796408b63ddbf5d41a2137ce1fa1e03ad1448eb31b131cce2c58bd4a52f47ea52da6506126b74eb539e43ba
SHA512 (20190200.0.tar.gz) = 2cd77d56b141f58f5bf2bfc75b17ac663e6f5696f43bb18219e94289000f45acb148eee2dec445813aada01e55ed560888e69f8c32ced359df5472938efec6a8
SHA512 (20190200.doc.tar.gz) = 7543960efd81fbf0186397b63953b927ec5cfd1f0796408b63ddbf5d41a2137ce1fa1e03ad1448eb31b131cce2c58bd4a52f47ea52da6506126b74eb539e43ba