diff --git a/.gitignore b/.gitignore index 399ca6b..5b03613 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,15 @@ +# ignore swap files created by vim editor +*.swp +# ignore rpm files created by fedpkg srpm +*.rpm +# ignore result drectory created by fedpkg mockbuild +results_cppad +# tarballs cppad-20110101.5.gpl.tgz cppad-20120101.1.gpl.tgz +/cppad-20130000.0.gpl.tgz +/cppad-20130000.1.gpl.tgz +/cppad-20130000.2.gpl.tgz +/cppad-20130000.3.gpl.tgz /cppad-20140000.2.gpl.tgz +/cppad-20150000.4.gpl.tgz diff --git a/cppad.spec b/cppad.spec index 21c4920..33c6feb 100644 --- a/cppad.spec +++ b/cppad.spec @@ -1,18 +1,25 @@ -# rpmlint --version -# rpmlint version 1.4 Copyright (C) 1999-2007 Frederic Lepied, Mandriva +# ---------------------------------------------------------------------------- +# The comamnds 'rpmlint cppad.spec' and 'fedpkg lint' generate the warning: # -# rmplint cppad.sped -# cppad.spec: ... W: rpm-buildroot-usage ... -# 0 packages and 1 specfiles checked; 0 errors, 1 warnings. -# search for 'rpm-buildroot-usage' and see comments near there. -# ---------------------------------------------------------------------------- +# cppad.spec:71: W: rpm-buildroot-usage +# %%prep includedir=%%{buildroot}%%{_includedir} +# +# See http://comments.gmane.org/gmane.linux.redhat.fedora.devel/144920 +# ---------------------------------------------------------------------------- +# The command 'fedpkg lint' generates the following warnings: +# +# W: spelling-error Summary(en_US) devel -> delve, devil, revel +# W: spelling-error %%description -l en_US devel -> delve, devil, revel +# +# These uses of devel refer to cppad-devel and hence are not spelling errors. +# ---------------------------------------------------------------------------- Name: cppad -Version: 20140000.2 -Release: 2%{?dist} +Version: 20150000.4 +Release: 3%{?dist} Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc -# Only noarch.rpms provided. +# Only noarch.rpms provided. The user can compile with or without debugging # Nothing useful in *debuginfo %global debug_package %{nil} @@ -21,7 +28,7 @@ License: GPLv3 URL: http://www.coin-or.org/CppAD/ Source: http://www.coin-or.org/download/source/CppAD/%{name}-%{version}.gpl.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: cmake28 +BuildRequires: cmake >= 2.8 %description C++ Algorithmic Differentiation (AD), see %{name}-devel, %{name}-doc. @@ -51,7 +58,7 @@ BuildArch: noarch %description doc The %{name}-doc package installs the XML documentation for %{name}-devel in - %{_docdir}/%{name}-%{version} + %{_docdir}/%{name} Links to an HTML version of the %{name} documentation, for the most recent version of %{name}, can be found at the web site http://www.coin-or.org/CppAD/ @@ -65,11 +72,31 @@ as a single web page, in both HTML and XML, can be found at that web site. # Replace cppad_SOURCE_DIR by the system include directory so that # installed files, instead of local files, are used for testing. -# (Note next line generates rpm-buildroot-usage warning from rpmlint.) +# includedir=%{buildroot}%{_includedir} sed \ -e "s|\(INCLUDE_DIRECTORIES(\).*{cppad_SOURCE_DIR}|\1 SYSTEM $includedir|" \ -i.stamp CMakeLists.txt +# +# Make speed/src/libspeed_src a static instead of shared library. +# This should be fixed in the upstream source and not necessary next year. +sed \ +-e 's|ADD_LIBRARY(speed_src|& STATIC|' \ + -i.stamp speed/src/CMakeLists.txt + +# Remove installation of cppad_colpack.cpp becasue it is not used +# by the Fedora installation. This should be fixed in the upstream source +# and not necessary next year; i.e., 2016. +cat << EOF > CMakeLists.sed +/^INSTALL/! b skip +N +/cppad_colpack.cpp/! b skip +N +N +d +: skip +EOF +sed -f CMakeLists.sed -i CMakeLists.txt # change example/example.cpp to print out machine epsilon cat << EOF > example.sed @@ -84,14 +111,29 @@ EOF sed -i.stamp example/example.cpp -f example.sed # See https://fedoraproject.org/wiki/Packaging:Cmake?rd=Packaging/cmake -# for suggestions on using cmake. +# and http://www.coin-or.org/CppAD/Doc/cmake.htm %build -%cmake28 \ - -D CMAKE_VERBOSE_MAKEFILE=0 \ - -D cppad_documentation=YES \ - -D cppad_cxx_flags='-Wall -ansi -pedantic-errors -std=c++98 -Wshadow' \ +# +# Cannot use %%{_includedir}, or %%{_docdir} because they are absolute. +# Relative values would be more flexible because they can be combined with +# %%{_prefix} to get absolute values. +%cmake --version +%cmake \ + -D CMAKE_VERBOSE_MAKEFILE=0 \ + \ + -D cmake_install_prefix=%{_prefix} \ + -D cmake_install_includedirs=include \ + -D cmake_install_datadir=share \ + -D cmake_install_docdir=share/doc \ + \ + -D cppad_cxx_flags='-Wall -ansi -pedantic-errors -std=c++98 -Wshadow' \ + -D cppad_test_vector=cppad \ + -D cppad_max_num_theads=64 \ + -D cppad_sparse_list=YES \ + -D cppad_tape_id_type=size_t \ + -D cppad_tape_addr_type=size_t \ + -D cppad_implicit_ctor_from_any_type=NO \ . - make %{?_smp_mflags} %install @@ -114,23 +156,60 @@ rm -rf %{buildroot} %files doc %defattr(-,root,root,-) -%{_docdir}/%{name}-%{version} +%{_docdir}/%{name} # ---------------------------------------------------------------------------- %changelog -* Wed Mar 05 2014 Brad Bell - 20140000.2-2 -- Swith to using cmake28 as suggest in Comment 3 on -- https://bugzilla.redhat.com/show_bug.cgi?id=896116#c3 +* Sat Feb 07 2015 Brad Bell - 20150000.4-3 +- Change std=c++11 to std=c++98 so works with rel6 (also so works +- in f20 and f21 when std=c++11 is not specified). +- Change speed/src/libspeed_src to be a static library because it is only +- used for testing (shared library was not being found on epl6). -* Fri Jan 31 2014 Brad Bell - 20140000.2-1 +* Sun Feb 01 2015 Brad Bell - 20150000.4-2 +- Fix rmplint warning about macro-in-comment. +- Edit comments at top of about warnings that won't be fixed. + +* Sat Jan 31 2015 Brad Bell - 20150000.4-1 +- Advance to version 2015 of cppad. +- Ensure cmake >= 2.8; see https://bugzilla.redhat.com/show_bug.cgi?id=896116 +- Remove patch for location of docdir (fixed upstream). +- Patch CMakeLists.txt to remove install of cppad_colpack.cpp (it is not used). +- List all cmake options (including defaults) that are used by this install. + +* Sat Aug 16 2014 Fedora Release Engineering - 20140000.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 20140000.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + + +* Tue Jan 21 2014 Brad Bell - 20140000.2-1 - Advance to version 2014 of cppad. -- Add link to bug report about cmake not working on el6 +- Add link to web discussion about rpm-buildroot-usage warning. +- Fix rpmlint warning about mixing tabs and spaces in spec file. -* Thu Jan 17 2013 Brad Bell - 20130000.1-1 -- Change build from using cmake to using auto-tools because Red-Hat -- will not fix problems with cmake 2.6; see -- https://bugzilla.redhat.com/show_bug.cgi?id=896116 -- (cmake mailing list suggests upgrading to 2.8) +* Mon Oct 07 2013 Brad Bell - 20130000.3-1 +- 1. Use new upstream source to fix warnings generated by g++ 4.8.1. +- 2. As per https://fedoraproject.org/wiki/Changes/UnversionedDocdirs +- move xml documentation from /usr/share/doc/%%{name}-%%{version} to +- /usr/share/doc/%%{name} + +* Sat Aug 03 2013 Fedora Release Engineering - 20130000.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 28 2013 Brad Bell - 20130000.2-1 +- Fix bug https://bugzilla.redhat.com/show_bug.cgi?id=913929 +- in the upstream soruce and use the corresponding upstream release. +- Note, the previous commit, 20130000.1-3, could have been avoided using +- https://fedoraproject.org/wiki/Using_the_Koji_build_system#Scratch_Builds + +* Wed Feb 13 2013 Brad Bell - 20130000.1-3 +- Attempt to reproduce failure reported in bug id=913929 +- (The build logs were deleted because I did not get to this soon enough) + +* Wed Feb 13 2013 Fedora Release Engineering - 20130000.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Tue Jan 08 2013 Brad Bell - 20130000.1-1 - Use a new upstream source. diff --git a/sources b/sources index 2c939a4..8149c3f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5c2973e0a399167f4edc6551aa5e2432 cppad-20140000.2.gpl.tgz +1720334972913771209883efd384ea0a cppad-20150000.4.gpl.tgz