epel7 branch: fix spec file so works with epel7.

cppad.spec: changes indicated by testing 2018 for other branches.
.gitignore: correct 2018 directory, remove 2017 files and directories.
This commit is contained in:
Brad Bell 2018-01-02 10:41:27 -07:00
commit 445301159a
2 changed files with 30 additions and 28 deletions

View file

@ -1,4 +1,6 @@
# ----------------------------------------------------------------------------
# Lint
# ----------------------------------------------------------------------------
# The comamnd 'fedpkg lint' generates the warning:
#
# cppad.spec:89: W: rpm-buildroot-usage
@ -6,15 +8,8 @@
#
# See https://lists.fedoraproject.org/pipermail/devel/2011-January/147969.html
# ----------------------------------------------------------------------------
# The command 'fedpkg lint' generates the warning:
#
# W: spelling-error Summary(en_US) devel -> delve, devil, revel
# W: spelling-error %%description -l en_US devel -> delve, devil, revel
#
# The only occurances of devel in this file are of the form cppad-devel.
# These refer to the corresponding subpackage and are not spelling errors.
# Preamble
# ----------------------------------------------------------------------------
# CppAD release number starts with zero and last part of version number.
# Fedora Release starts with 1; see
# https://fedoraproject.org/wiki/Packaging:Versioning
@ -77,28 +72,26 @@ version of %{name}, can be found at the web site
In addition, printable versions of the documentation,
as a single web page, in both HTML and XML, can be found at that web site.
# ----------------------------------------------------------------------------
%clean
# Cleanup build root at the beginning in case mock has
# cleanup_on_failure set to zero.
rm -rf %{buildroot}
# -----------------------------------------------------------------------------
# prep
# -----------------------------------------------------------------------------
%prep
%setup -q
# Replace cppad_SOURCE_DIR by the system include directory so that
# 1. Replace cppad_SOURCE_DIR by the system include directory so that
# installed files, instead of local files, are used for testing.
# 2. EPEL7 is using cmake 2.8 so change required version and reply on all
# the tests passing for correctness of this change.
#
includedir=%{buildroot}%{_includedir}
sed \
-e "s|\(INCLUDE_DIRECTORIES(\).*{cppad_SOURCE_DIR}|\1 SYSTEM $includedir|" \
-e "s|\(CMAKE_MINIMUM_REQUIRED\)(VERSION 3.1)|\1(VERSION 2.8)|" \
-i.bak CMakeLists.txt
# It seems that it is no longer necessary to remove ${cppad_lib} from
# CMakeLists.txt files. If this works out, remove this comment next year 2019.
# -----------------------------------------------------------------------------
# build
# -----------------------------------------------------------------------------
%build
# See https://fedoraproject.org/wiki/Packaging:Cmake?rd=Packaging/cmake
@ -138,17 +131,14 @@ cppad_cxx_flags='-Wall -pedantic-errors -std=c++11 -Wshadow -Wconversion'
.
make %{?_smp_mflags}
# -----------------------------------------------------------------------------
# Install
# -----------------------------------------------------------------------------
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
# -----------------------------------------------------------------------------
# use the installed include files to compile and run the tests
%check
make check
# -----------------------------------------------------------------------------
%files devel
%defattr(-,root,root,-)
%doc COPYING uw_copy_040507.html
@ -159,8 +149,21 @@ make check
%defattr(-,root,root,-)
%{_docdir}/%{name}
# -----------------------------------------------------------------------------
# Check
# -----------------------------------------------------------------------------
# use the installed include files to compile and run the tests
%check
make check
# ----------------------------------------------------------------------------
%changelog
* Tue Jan 02 2018 Brad Bell <bradbell at seanet dot com> - 20180000.0-1
- fedpkg lint no longer generates spelling error for use of 'devel'.
- Comment out %%clean because only the normal build area is used.
- Change minumum cmake version to 2.8 (needed for epel7 branch).
- Use comments to better group to sections of the spec file.
* Mon Jan 01 2018 Brad Bell <bradbell at seanet dot com> - 20180000.0-1
- Advance to version 2018 of cppad.