1. Use new upstream souce to simplify spec file.
2. Fix some rpmlint warnings and add comment about remaining warning.
This commit is contained in:
parent
1d976e8ba5
commit
f91eac471c
3 changed files with 26 additions and 91 deletions
114
cppad.spec
114
cppad.spec
|
|
@ -1,16 +1,15 @@
|
|||
# rpmlint command and output
|
||||
#
|
||||
# rpmlint --version
|
||||
# rpmlint version 1.4 Copyright (C) 1999-2007 Frederic Lepied, Mandriva
|
||||
#
|
||||
# rpmlint cppad-devel-20120101.1-1.fc15.noarch.rpm
|
||||
# 1 packages and 0 specfiles checked; 0 errors, 0 warnings.
|
||||
# rpmlint --version
|
||||
# rpmlint version 1.4 Copyright (C) 1999-2007 Frederic Lepied, Mandriva
|
||||
#
|
||||
# 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.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
Name: cppad
|
||||
Version: 20130000.0
|
||||
Release: 3%{?dist}
|
||||
Version: 20130000.1
|
||||
Release: 1%{?dist}
|
||||
Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc
|
||||
|
||||
# Only noarch.rpms provided.
|
||||
|
|
@ -46,8 +45,8 @@ See the package %{name}-doc for documentation of this version of %{name}.
|
|||
|
||||
# ----------------------------------------------------------------------------
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Group: XML documentation for %{name}-devel
|
||||
Summary: Documentation for %{name}-devel
|
||||
Group: Documentation
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
|
|
@ -63,86 +62,14 @@ as a single web page, in both HTML and XML, can be found at that web site.
|
|||
%prep
|
||||
|
||||
%setup -q
|
||||
includedir=%{buildroot}%{_includedir}
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# This patch should not longer be necessary when %%{version} >= 20130000.0
|
||||
# Fedora test machines seem to use gauard digits instead of converting values
|
||||
# to their numerical percision. Modify tests to avoid this.
|
||||
cat << EOF > patch.sed
|
||||
/\\tbool *check_epsilon/! b end_check_epsilon
|
||||
N
|
||||
s|\\t{\\tbool *ok *= *true;|&\\
|
||||
\\t\\tCppAD::vector<Type> eps(1), one(1), two(1), eps2(1), check(1);|
|
||||
: end_check_epsilon
|
||||
#
|
||||
/\\tbool *check_min/! b end_check_min
|
||||
N
|
||||
s|\\t{\\tbool *ok *= *true;|&\\
|
||||
\\t\\tCppAD::vector<Type> min(1), eps(1), one(1), three(1), tmp(1), match(1);|
|
||||
: end_check_min
|
||||
#
|
||||
/\\tbool *check_max/! b end_check_max
|
||||
N
|
||||
s|\\t{\\tbool *ok *= *true;|&\\
|
||||
\\t\\tCppAD::vector<Type> max(1), eps(1), one(1), three(1), tmp(1), match(1);|
|
||||
: end_check_max
|
||||
#
|
||||
/\\tbool *check_max_complex/! b end_check_max_complex
|
||||
N
|
||||
s|\\t\\tbool *ok *= *true;|&\\
|
||||
\\t\\tCppAD::vector<Complex> c_max(1), c_eps(1);\\
|
||||
\\t\\tCppAD::vector<Type> max(1), eps(1), one(1), three(1), tmp(1), match(1);|
|
||||
: end_check_max_complex
|
||||
#
|
||||
s|\\t\\tComplex c_max *=|\\t\\tc_max[0] =|
|
||||
s|\\t\\tComplex c_eps *=|\\t\\tc_eps[0] =|
|
||||
s|c_max\\.|c_max[0]\\.|
|
||||
s|c_eps\\.|c_eps[0]\\.|
|
||||
#
|
||||
s|\\t\\tType min *=|\\t\\tmin[0] =|
|
||||
s|\\t\\tType max *=|\\t\\tmax[0] =|
|
||||
s|\\t\\tType eps *=|\\t\\teps[0] =|
|
||||
s|\\t\\tType one *=|\\t\\tone[0] =|
|
||||
s|\\t\\tType two *=|\\t\\ttwo[0] =|
|
||||
s|\\t\\tType tmp *=|\\t\\ttmp[0] =|
|
||||
s|\\t\\tType eps2 *=|\\t\\teps2[0] =|
|
||||
s|\\t\\tType check *=|\\t\\tcheck[0] =|
|
||||
s|\\t\\tType three *=|\\t\\tthree[0] =|
|
||||
s|\\t\\tType match *=|\\t\\tmatch[0] =|
|
||||
#
|
||||
s|\\t\\ttmp *=|\\t\\ttmp[0] =|
|
||||
s|\\t\\tmatch *=|\\t\\tmatch[0] =|
|
||||
s|\\t\\tcheck *=|\\t\\tcheck[0] =|
|
||||
#
|
||||
#
|
||||
s|(eps)|(eps[0])|
|
||||
s|(eps2)|(eps2[0])|
|
||||
#
|
||||
s|\\([a-z][a-z]*\\) *\\([*/]\\) *\\([a-z][a-z]*\\)|\\1[0] \\2 \\3[0]|g
|
||||
s|\\([-+*/]\\) *\\([a-z][a-z]*\\)\\( *[;,)]\\)|\\1 \\2[0]\\3|
|
||||
s|\\([a-z][a-z]*\\) *\\([-+*/]\\)\\( *(\\)|\\1[0] \\2 \\3|
|
||||
#
|
||||
s|eps */ *two|eps[0] / two[0]|
|
||||
s|one *\\([!=]*\\) *check|one[0] \\1 check[0]|
|
||||
#
|
||||
# undo some changes that should not have been done
|
||||
s|<cppad\\[0\\] */ *cppad\\[0\\].hpp>|<cppad/cppad.hpp>|
|
||||
s|value\\[0\\]|value|
|
||||
EOF
|
||||
sed -f patch.sed -i example/limits.cpp
|
||||
sed -f patch.sed -i test_more/epsilon.cpp
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# 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
|
||||
|
||||
# This patch should not longer be necessary when %%{version} >= 20130000.0
|
||||
sed -e '/TARGET_LINK_LIBRARIES/d' \
|
||||
-i.stamp speed/example/CMakeLists.txt
|
||||
-i.stamp CMakeLists.txt
|
||||
|
||||
# change example/example.cpp to print out machine epsilon
|
||||
cat << EOF > example.sed
|
||||
|
|
@ -160,10 +87,10 @@ sed -i.stamp example/example.cpp -f example.sed
|
|||
# for suggestions on using cmake.
|
||||
%build
|
||||
%cmake \
|
||||
-D CMAKE_VERBOSE_MAKEFILE=0 \
|
||||
-D cppad_documentation=YES \
|
||||
-D cppad_cxx_flags='-Wall -ansi -pedantic-errors -std=c++98 -Wshadow' \
|
||||
.
|
||||
-D CMAKE_VERBOSE_MAKEFILE=0 \
|
||||
-D cppad_documentation=YES \
|
||||
-D cppad_cxx_flags='-Wall -ansi -pedantic-errors -std=c++98 -Wshadow' \
|
||||
.
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
|
|
@ -190,6 +117,13 @@ rm -rf %{buildroot}
|
|||
|
||||
# ----------------------------------------------------------------------------
|
||||
%changelog
|
||||
* Tue Jan 08 2013 Brad Bell <bradbell at seanet dot com> - 20130000.1-1
|
||||
- Use a new upstream source.
|
||||
- Remove the patches that were fixed in the upstream source.
|
||||
- Convert tabs to spaces (avoid rpmlint warning).
|
||||
- Fix rpmlint warning for cppad-doc group warning.
|
||||
- Add comment for rpmlint warning about using buildroot.
|
||||
|
||||
* Sat Jan 05 2013 Brad Bell <bradbell at seanet dot com> - 20130000.0-3
|
||||
- The patch.sed script in this file is for a final test of a solution on the
|
||||
- remote machine. Expect to modify upstream source so it is not necessary.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue