Remove doc subpackage and fix soversion number.

This commit is contained in:
Brad Bell 2025-01-19 04:52:58 -07:00
commit 504ed13acb

View file

@ -15,21 +15,26 @@
# are the same. This is because a redirect from index.hml to user_guide.html
# will not reload when user_guide.html changes.
#
# fedora uses its own soversion number for cppad_lib
# 5.0 corresponds to version 20240000
%define soversion 5.0
# year
# The year corresponding to this version
%define year 2025
#
# soversion
# fedora uses its own soversion number for cppad_lib where
# 1.0 corresponds to year 2020
%define soversion %[ %year - 2019 ]
#
# This is really an out of soruce build because the source is in the
# CppAD-%%{version} sub-directory. The fedora macros are confused and need
# this defined true.
# CppAD-%%{version} sub-directory of the source. The fedora macros are
# confused and need this defined true.
%define __cmake_in_source_build 1
# ----------------------------------------------------------------------------
# Fedora Release starts with 1; see
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/
Name: cppad
Version: 20250000.0
Release: 2%{?dist}
Version: %{year}0000.0
Release: 3%{?dist}
Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc
#
License: EPL-2.0 OR GPL-2.0-or-later
@ -65,26 +70,14 @@ Provides: coin-or-cppad-devel = %{version}-%{release}
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
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
See the package %{name}-doc for documentation of this version of %{name}.
The documentation, for the most recent version of %{name}, can be found at
https://cppad.readthedocs.io
# ----------------------------------------------------------------------------
%package doc
Summary: Documentation for %{name}-devel
BuildArch: noarch
%description doc
The %{name}-doc package installs the HTML documentation for this version
of %{name}-devel in
%{_docdir}/%{name}
The documentation, for the most recent version of %{name}, can be found at
The documentation for the %{year} version
https://cppad.readthedocs.io/stable-%{year}
The documentation for the most recent version of %{name} can be found at
https://cppad.readthedocs.io/latest
# -----------------------------------------------------------------------------
# prep
# -----------------------------------------------------------------------------
@ -105,36 +98,10 @@ sed -i CppAD-%{version}/include/cppad/local/var_op/atomic_op.hpp \
echo '' >> CppAD-%{version}/xrst.toml
echo '[input_files]' >> CppAD-%{version}/xrst.toml
echo 'data = [ ]' >> CppAD-%{version}/xrst.toml
#
# CppAD-%%{version}/build/html
# run xrst to create the documentation files in the directory above
mkdir CppAD-%{version}/build
xrst --version
number_jobs=$(echo %{?_smp_mflags} | sed -e 's|[^0-9]*\([0-9]*\)[^0-9]*|\1|')
if [ "$number_jobs" == '' ]
then
number_jobs='1'
fi
xrst \
--config_file CppAD-%{version}/xrst.toml \
--local_toc \
--target html \
--html_theme sphinx_rtd_theme \
--index_page_name user_guide \
--group_list default app \
--number_jobs $number_jobs \
--suppress_spell_warnings
#
# CppAD-%%{version}/build/html
# remove hidden files not needed for viewing documentation
rm CppAD-%{version}/build/html/.buildinfo
rm -r CppAD-%{version}/build/html/.doctrees
mv CppAD-%{version}/build/html html
#
# COPYING, uw_copy_040507.html
mv CppAD-%{version}/COPYING COPYING
mv CppAD-%{version}/uw_copy_040507.html uw_copy_040507.html
cp CppAD-%{version}/COPYING COPYING
cp CppAD-%{version}/uw_copy_040507.html uw_copy_040507.html
#
# fix bug
# should not be needed once version > 20250000.0
@ -295,11 +262,6 @@ cppad_cxx_flags=\
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/libcppad_lib.so
%files doc
# These documentation files are build by the xrst command above
%doc html
# -----------------------------------------------------------------------------
# Check
# -----------------------------------------------------------------------------
@ -312,7 +274,12 @@ make %{?_smp_mflags} check
# This enables one to check that the necessary files are installed.
# ----------------------------------------------------------------------------
%changelog
* Sat Jan 18 2025 Brad Bell <bradbell at seanet dot com> - 20250000.0-1
* Sat Jan 19 2025 Brad Bell <bradbell at seanet dot com> - 20250000.0-3
- 1. Add the year macro and use it to define soversion and Version.
- 2. Remove the cppad-doc subpackage because documantion for this stable
version is not available at https://cppad.readthedocs.io/stable-2025/ .
* Sat Jan 18 2025 Brad Bell <bradbell at seanet dot com> - 20250000.0-2
- This fixes two bugs and will not be necessary
- once the upstream source advances to 20250000.1.