Use %setup to unpack tarballs.

This commit is contained in:
Brad Bell 2021-03-07 11:50:28 -07:00
commit 0e0c6a0073

View file

@ -13,7 +13,7 @@
# https://fedoraproject.org/wiki/Packaging:Versioning
Name: cppad
Version: %{yyyymmdd}.5
Release: 1%{?dist}
Release: 2%{?dist}
Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc
License: EPL-2.0 or GPLv2+
@ -62,27 +62,18 @@ of %{name}-devel in
The documentation, for the most recent version of %{name}, can be found at
http://coin-or.github.io/CppAD
# -----------------------------------------------------------------------------
# The user can compile with or without debugging using this library,
# because the prep seciton ensures CPPAD_DEBUG_AND_RELEASE is defined.
# The cppad_lib library has gotten larger, so we include a debug version.
%debug_package
# -----------------------------------------------------------------------------
# prep
# -----------------------------------------------------------------------------
%prep
#
# This source code tarball creates CppAD-%%{version}
rm -rf CppAD-%{version}
tar -xzf %{_topdir}/SOURCES/%{version}.tar.gz
#
# This documentation tarball creates CppAD-%%{yyymmdd}.doc
rm -rf CppAD-%{yyyymmdd}.doc
tar -xzf %{_topdir}/SOURCES/%{yyyymmdd}.doc.tar.gz
# Create an empty directory named cppad-%%{version},
# changed into that directory and unpack Source0 and Source1.
%setup -q -c -a 0 -a 1
#
# 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
# ----------------------------------------------------------------------------
@ -183,9 +174,17 @@ cppad_cxx_flags='-Wall -pedantic-errors -std=c++11 -Wshadow -Wconversion'
# use the installed include files to compile and run the tests
%check
make %{?_smp_mflags} check
# ----------------------------------------------------------------------------
# %%clean
# Use %%clean with no arguments to surpress the cleanup of BUILDROOT
# This enables one to check that the necessary files are installed.
# ----------------------------------------------------------------------------
%changelog
* Sun Mar 07 2021 Brad Bell <bradbell at seanet dot com> - 20210000.5-2
- Remove %%debug_package (not necessary to create debug info).
- Use %%setup to unpack tarballs (sets premissions properly).
- Add comments about using %%clean to check BUILDROOT.
* Sun Feb 28 2021 Brad Bell <bradbell at seanet dot com> - 20210000.5-1
- Advance to upstream source 20210000.5
- Remove patches that are no longer necessary.