From 8f891de2651af278237417790a6937f4dc2b1bb0 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:47:37 +0000 Subject: [PATCH 01/11] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0b7a4f3..cfaf8f0 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ NAME := cppad SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From a4c18852c58ad008cb9c8343731b081ff49c35ee Mon Sep 17 00:00:00 2001 From: "Bradley M. Bell" Date: Sun, 3 Jan 2010 13:33:12 +0000 Subject: [PATCH 02/11] upload and use version Jan 01, 2010 of cppad --- .cvsignore | 2 +- cppad.spec | 72 ++++++++++++++---------------------------------------- sources | 2 +- 3 files changed, 20 insertions(+), 56 deletions(-) diff --git a/.cvsignore b/.cvsignore index a4a90fa..423a1ef 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -cppad-20090303.0.gpl.tgz +cppad-20100101.0.gpl.tgz diff --git a/cppad.spec b/cppad.spec index b8c8682..5c1b2d0 100644 --- a/cppad.spec +++ b/cppad.spec @@ -1,7 +1,3 @@ -# ---------------------------------------------------------------------------- -# RPM source for this version of cppad.spec: -# http://www.seanet.com/~bradbell/cppad/cppad-%{version}-%{release}.fc7.src.rpm -# ---------------------------------------------------------------------------- # Known Problems: # # After installation of cppad-doc-%{version} the command @@ -15,8 +11,8 @@ # ---------------------------------------------------------------------------- Name: cppad -Version: 20090303.0 -Release: 5%{?dist} +Version: 20100101.0 +Release: 1%{?dist} Summary: No base package is installed, see %{name}-devel Group: Development/Libraries @@ -62,47 +58,6 @@ as a single web page, in both html and xml, can be found at that web site. %prep %setup -q -# Patch problems fix in trunk on 20090606, but not yet in any release -# This grep should fail once the version passes 20090606 -grep 'x\[2\] = 5.0; x\[2\] = 5.0;' test_more/jacobian.cpp -# This patch will no longer be needed once the version passes 20090606 -sed -i.stamp test_more/jacobian.cpp \ - -e 's/x\[2\] = 5.0; x\[2\] = 5.0;/x[1] = 5.0; x[2] = 5.0;/' -# This patch will no longer be needed once the version passes 20090606 -sed -i.stamp cppad/local/default.hpp \ - -e 's/AD::AD(void) :/& value_(Base(0)), /' - -# This patch will no longer be needed once branches/sweep is merged into -# the CppAD trunk (date is as yet unknown). -sed -i.stamp cppad/local/fun_construct.hpp \ - -e '/for(i = 0; i < m; i++)/,$d' -cat << EOF >> cppad/local/fun_construct.hpp -# ifndef NDEBUG - for(i = 0; i < m; i++) if( taylor_[dep_taddr_[i]] != y[i].value_ ) - { using std::endl; - std::ostringstream buf; - buf << "A dependent variable value is not equal to " - << "its tape evaluation value (perhaps it is nan)" << endl - << "Dependent variable value = " - << y[i].value_ << endl - << "Tape evaluation value = " - << taylor_[dep_taddr_[i]] << endl - << "Difference = " - << y[i].value_ - taylor_[dep_taddr_[i]] << endl - ; - CPPAD_ASSERT_KNOWN( - 0, - buf.str().c_str() - ); - } -# endif -} - -} // END CppAD namespace - -# endif -EOF - # change example/example.cpp to print out machine epsilon cat << EOF > example.sed /^int main(void)/N @@ -115,9 +70,6 @@ int main(void)\\ EOF sed -i.stamp example/example.cpp -f example.sed -# See Sat Jan 12 2008 log entry -sed -i.stamp speed/example/example.cpp -e '/Run(speed_test,/d' - # Remove setting of permissions in documentation destination directory. # Create the doc_prefix directory (if it does not already exist). # (Note we are not using a postfix directory, so can overwrite its case.) @@ -140,11 +92,16 @@ make install DESTDIR=$RPM_BUILD_ROOT %check example/example test_more/test_more -speed/cppad/cppad correct 123 true -speed/cppad/cppad correct 123 false -speed/double/double correct 123 true speed/example/example -speed/profile/profile correct 123 true +speed/double/double correct 123 +speed/cppad/cppad correct 123 +speed/cppad/cppad correct 123 optimize +speed/cppad/cppad correct 123 retape +speed/cppad/cppad correct 123 optimize retape +speed/profile/profile correct 123 +speed/profile/profile correct 123 optimize +speed/profile/profile correct 123 retape +speed/profile/profile correct 123 optimize retape %clean # cleanup @@ -161,6 +118,13 @@ rm -rf $RPM_BUILD_ROOT # ---------------------------------------------------------------------------- %changelog +* Sat Jan 01 2010 Brad Bell - 20100101.0-1 +- Use new upstream source. +- Remove out of date comment about where this spec file is maintained. +- Remove patches that are no longer necessary in prep section. +- Change calling sequence for correctness of speed tests (we do not run speed +- tests, that requires a computer with no other processes running). + * Fri Jul 24 2009 Fedora Release Engineering - 20090303.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index d89508f..57369ac 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d34e093cb4b59b87b73a1b38597e45ac cppad-20090303.0.gpl.tgz +4886174196fbd7745f30ec3c320a6975 cppad-20100101.0.gpl.tgz From c1d9ba9ac75d11bcf64d10f73a25d7872f4f61f2 Mon Sep 17 00:00:00 2001 From: "Bradley M. Bell" Date: Wed, 10 Feb 2010 12:55:59 +0000 Subject: [PATCH 03/11] Copy of bug fix in revision https://projects.coin-or.org/CppAD/changeset/1647 --- cppad.spec | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/cppad.spec b/cppad.spec index 5c1b2d0..9fa3367 100644 --- a/cppad.spec +++ b/cppad.spec @@ -12,7 +12,7 @@ Name: cppad Version: 20100101.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: No base package is installed, see %{name}-devel Group: Development/Libraries @@ -58,6 +58,19 @@ as a single web page, in both html and xml, can be found at that web site. %prep %setup -q +# Bug fix in revision https://projects.coin-or.org/CppAD/changeset/1647 +if [ %{version} != "20100101.0" ] +then + echo "This bug fix should no longer be necessary" + exit 1 +fi +# +sed -i cppad/local/optimize.hpp \ +-e 's|(new_arg\[0\] == tape\[k\].new_var );|(new_arg[0] == tape[k].new_var )|' +# +sed -i cppad/local/print_op.hpp \ +-e 's|( arg\[1\] < i_z );|( arg\[1\] <= i_z );|' + # change example/example.cpp to print out machine epsilon cat << EOF > example.sed /^int main(void)/N @@ -118,6 +131,10 @@ rm -rf $RPM_BUILD_ROOT # ---------------------------------------------------------------------------- %changelog +* Wed Feb 10 2010 Brad Bell - 20100101.0-2 +- Patch sources for bug fix between 20100101.0 and 20100101.1. +- This should no longer be necessary once a new upstream source is loaded. + * Sat Jan 01 2010 Brad Bell - 20100101.0-1 - Use new upstream source. - Remove out of date comment about where this spec file is maintained. From 388468f89518f333cd987882212cf63005888bc1 Mon Sep 17 00:00:00 2001 From: "Bradley M. Bell" Date: Wed, 31 Mar 2010 14:35:53 +0000 Subject: [PATCH 04/11] use new upstream source bug fixes --- .cvsignore | 2 +- cppad.spec | 20 ++++++-------------- sources | 2 +- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/.cvsignore b/.cvsignore index 423a1ef..d86ec6a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -cppad-20100101.0.gpl.tgz +cppad-20100101.2.gpl.tgz diff --git a/cppad.spec b/cppad.spec index 9fa3367..f2f3825 100644 --- a/cppad.spec +++ b/cppad.spec @@ -11,7 +11,7 @@ # ---------------------------------------------------------------------------- Name: cppad -Version: 20100101.0 +Version: 20100101.2 Release: 2%{?dist} Summary: No base package is installed, see %{name}-devel @@ -58,19 +58,6 @@ as a single web page, in both html and xml, can be found at that web site. %prep %setup -q -# Bug fix in revision https://projects.coin-or.org/CppAD/changeset/1647 -if [ %{version} != "20100101.0" ] -then - echo "This bug fix should no longer be necessary" - exit 1 -fi -# -sed -i cppad/local/optimize.hpp \ --e 's|(new_arg\[0\] == tape\[k\].new_var );|(new_arg[0] == tape[k].new_var )|' -# -sed -i cppad/local/print_op.hpp \ --e 's|( arg\[1\] < i_z );|( arg\[1\] <= i_z );|' - # change example/example.cpp to print out machine epsilon cat << EOF > example.sed /^int main(void)/N @@ -131,6 +118,11 @@ rm -rf $RPM_BUILD_ROOT # ---------------------------------------------------------------------------- %changelog +* Wed Mar 31 2010 Brad Bell - 20100101.2-1 +- Use new upstream source with bug fixes at revision +- https://projects.coin-or.org/CppAD/changeset/1664 +- and remove patch from Wed Feb 10 2010. + * Wed Feb 10 2010 Brad Bell - 20100101.0-2 - Patch sources for bug fix between 20100101.0 and 20100101.1. - This should no longer be necessary once a new upstream source is loaded. diff --git a/sources b/sources index 57369ac..551ef91 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4886174196fbd7745f30ec3c320a6975 cppad-20100101.0.gpl.tgz +9947413be80ab9e8fb3a7b225c144d63 cppad-20100101.2.gpl.tgz From be1621ff63dd2e62b333719dc0ef115575c557dc Mon Sep 17 00:00:00 2001 From: "Bradley M. Bell" Date: Wed, 31 Mar 2010 14:38:21 +0000 Subject: [PATCH 05/11] correct release number for this version --- cppad.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cppad.spec b/cppad.spec index f2f3825..b7727d7 100644 --- a/cppad.spec +++ b/cppad.spec @@ -12,7 +12,7 @@ Name: cppad Version: 20100101.2 -Release: 2%{?dist} +Release: 1%{?dist} Summary: No base package is installed, see %{name}-devel Group: Development/Libraries From 43c59942eee9db41bbd956ac294f4ad3180a744d Mon Sep 17 00:00:00 2001 From: "Bradley M. Bell" Date: Thu, 8 Jul 2010 17:39:08 +0000 Subject: [PATCH 06/11] more bug fixes to 20100101 --- .cvsignore | 2 +- cppad.spec | 6 +++++- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index d86ec6a..d943cbd 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -cppad-20100101.2.gpl.tgz +cppad-20100101.4.gpl.tgz diff --git a/cppad.spec b/cppad.spec index b7727d7..287097e 100644 --- a/cppad.spec +++ b/cppad.spec @@ -11,7 +11,7 @@ # ---------------------------------------------------------------------------- Name: cppad -Version: 20100101.2 +Version: 20100101.4 Release: 1%{?dist} Summary: No base package is installed, see %{name}-devel @@ -118,6 +118,10 @@ rm -rf $RPM_BUILD_ROOT # ---------------------------------------------------------------------------- %changelog +* Thu Jul 08 2010 Brad Bell - 20100101.4-1 +- Use new upstream source which has bug fix at revision +- https://projects.coin-or.org/CppAD/changeset/1698 + * Wed Mar 31 2010 Brad Bell - 20100101.2-1 - Use new upstream source with bug fixes at revision - https://projects.coin-or.org/CppAD/changeset/1664 diff --git a/sources b/sources index 551ef91..1aadac6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9947413be80ab9e8fb3a7b225c144d63 cppad-20100101.2.gpl.tgz +ff39d739635985ee78c7572f6ec9b03c cppad-20100101.4.gpl.tgz From f507bfedab2d679a4fdf29f775d229eb4a72abb0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 12:14:50 +0000 Subject: [PATCH 07/11] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index cfaf8f0..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: cppad -# $Id$ -NAME := cppad -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From a2e0e656ed27b38392b0d7c3455de07819eea496 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Sun, 9 Jan 2011 08:32:41 -0800 Subject: [PATCH 08/11] Upgrade to version 2011 of cppad. --- .gitignore | 1 + cppad.spec | 30 +++++++++++++----------------- sources | 2 +- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index d943cbd..89ba11d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ cppad-20100101.4.gpl.tgz +/cppad-20110101.0.gpl.tgz diff --git a/cppad.spec b/cppad.spec index 287097e..065ec0b 100644 --- a/cppad.spec +++ b/cppad.spec @@ -11,7 +11,7 @@ # ---------------------------------------------------------------------------- Name: cppad -Version: 20100101.4 +Version: 20110101.0 Release: 1%{?dist} Summary: No base package is installed, see %{name}-devel @@ -58,6 +58,10 @@ as a single web page, in both html and xml, can be found at that web site. %prep %setup -q +# abs_top_builddir is misisng from definitions in makefile.in +# (should be fixed in future versions of cppad) +sed -i makefile.in -e 's/abs_top_builddir/ABS_TOP_SRCDIR/' + # change example/example.cpp to print out machine epsilon cat << EOF > example.sed /^int main(void)/N @@ -79,10 +83,7 @@ sed -i.stamp makefile.in \ -e '/chmod -R .* $(doc_package)/d' %build -%configure --with-Documentation \ - --with-Example \ - --with-TestMore \ - --with-Speed +%configure --with-Documentation make %{?_smp_mflags} %install @@ -90,18 +91,7 @@ rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT %check -example/example -test_more/test_more -speed/example/example -speed/double/double correct 123 -speed/cppad/cppad correct 123 -speed/cppad/cppad correct 123 optimize -speed/cppad/cppad correct 123 retape -speed/cppad/cppad correct 123 optimize retape -speed/profile/profile correct 123 -speed/profile/profile correct 123 optimize -speed/profile/profile correct 123 retape -speed/profile/profile correct 123 optimize retape +make %{?_smp_mflags} test %clean # cleanup @@ -118,6 +108,12 @@ rm -rf $RPM_BUILD_ROOT # ---------------------------------------------------------------------------- %changelog +* Sat Jan 08 2011 Brad Bell - 20110101.0-1 +- Use new major version for 2011. +- abs_top_builddir is missing from definitions in makefile.in +- (should be fixed in future versions of cppad). +- The single command "make test" now builds and runs all the tests. + * Thu Jul 08 2010 Brad Bell - 20100101.4-1 - Use new upstream source which has bug fix at revision - https://projects.coin-or.org/CppAD/changeset/1698 diff --git a/sources b/sources index 1aadac6..1b45ca4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ff39d739635985ee78c7572f6ec9b03c cppad-20100101.4.gpl.tgz +d25559c1adb7bbdbb254206b7464dc78 cppad-20110101.0.gpl.tgz From 5c3d5b39c6d3711c4e1cecc627c95b98333b54bd Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Sun, 9 Jan 2011 15:36:12 -0800 Subject: [PATCH 09/11] 1. Remove cppad_ipopt_nlp.hpp and lib/libspeed.a from the distribution. 2. Add lib/pkgconfig/cppad.pc to the %files section of spec file. 3. Remove _smp_mflags from the "make test" command. --- cppad.spec | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/cppad.spec b/cppad.spec index 065ec0b..b174724 100644 --- a/cppad.spec +++ b/cppad.spec @@ -12,7 +12,7 @@ Name: cppad Version: 20110101.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: No base package is installed, see %{name}-devel Group: Development/Libraries @@ -58,9 +58,25 @@ as a single web page, in both html and xml, can be found at that web site. %prep %setup -q -# abs_top_builddir is misisng from definitions in makefile.in -# (should be fixed in future versions of cppad) -sed -i makefile.in -e 's/abs_top_builddir/ABS_TOP_SRCDIR/' +# Items 1,2,3 below should be fixed in future versions of cppad. +cat << EOF > makefile.in.sed +# 1. Do not distribute cppad_ipopt_nlp.hpp. +s/^myinclude_HEADERS *=.*/myinclude_HEADERS =/ +/cppad_ipopt_nlp.hpp/d +# 2. abs_top_builddir is missing from definitions in makefile.in +s/abs_top_builddir/ABS_TOP_SRCDIR/ +# 3. Remove libspeed.a from the distribution (mistake). +s/^install-libLIBRARIES:/do_not_install:/ +s/^uninstall-libLIBRARIES:/do_not_uninstall:/ +s/uninstall-libLIBRARIES// +s/install-libLIBRARIES// +# 4. Remove setting of permissions in documentation destination directory. +/chmod -R .* \$(doc_package)/d +EOF +# Items 1,2, and 4 +sed -i.stamp makefile.in -f makefile.in.sed +# Item 3 +sed -i.stamp speed/src/makefile.in -f makefile.in.sed # change example/example.cpp to print out machine epsilon cat << EOF > example.sed @@ -74,14 +90,6 @@ int main(void)\\ EOF sed -i.stamp example/example.cpp -f example.sed -# Remove setting of permissions in documentation destination directory. -# Create the doc_prefix directory (if it does not already exist). -# (Note we are not using a postfix directory, so can overwrite its case.) -sed -i.stamp makefile.am \ - -e '/chmod -R .* $(doc_package)/d' -sed -i.stamp makefile.in \ - -e '/chmod -R .* $(doc_package)/d' - %build %configure --with-Documentation make %{?_smp_mflags} @@ -91,7 +99,9 @@ rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT %check -make %{?_smp_mflags} test +# make test uses a shell script to run make test is a list of subdirectories +# and it it is unclear how to do: make %{?_smp_mflags} test +make test %clean # cleanup @@ -101,6 +111,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc COPYING ChangeLog AUTHORS uw_copy_040507.html %{_includedir}/%{name} +%{_libdir}/pkgconfig/%{name}.pc %files doc %defattr(-,root,root,-) @@ -108,6 +119,13 @@ rm -rf $RPM_BUILD_ROOT # ---------------------------------------------------------------------------- %changelog +* Sat Jan 09 2011 Brad Bell - 20110101.0-2 +- Remove include/cppad_ipopt_nlp.hpp from distribution. +- Remove lib/libspeed.a from distribution. +- Add lib/pkgconfig/cppad.pc to files section (because it is installed). +- Use a single sed script file with comments to do all the makefile.in edits. +- Remove edits of makefile.am (not used so not reason to patch it). + * Sat Jan 08 2011 Brad Bell - 20110101.0-1 - Use new major version for 2011. - abs_top_builddir is missing from definitions in makefile.in From 7827cd8ea61d17a8b8ab60043cf96ba4b7e01b7d Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Mon, 17 Jan 2011 10:34:43 -0800 Subject: [PATCH 10/11] Use new upstream source, upload of cppad-20110101.0 has wrong ms5sum checksum. sources: md5sum check sum for new upstream sources. cppad.spec: Test using install (not distribution) location for include files --- .gitignore | 1 + cppad.spec | 48 ++++++++++++++++++++++++++---------------------- sources | 2 +- 3 files changed, 28 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 89ba11d..32cdf0c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ cppad-20100101.4.gpl.tgz /cppad-20110101.0.gpl.tgz +/cppad-20110101.2.gpl.tgz diff --git a/cppad.spec b/cppad.spec index b174724..5860625 100644 --- a/cppad.spec +++ b/cppad.spec @@ -11,8 +11,8 @@ # ---------------------------------------------------------------------------- Name: cppad -Version: 20110101.0 -Release: 2%{?dist} +Version: 20110101.2 +Release: 1%{?dist} Summary: No base package is installed, see %{name}-devel Group: Development/Libraries @@ -56,27 +56,25 @@ as a single web page, in both html and xml, can be found at that web site. # ---------------------------------------------------------------------------- %prep -%setup -q -# Items 1,2,3 below should be fixed in future versions of cppad. -cat << EOF > makefile.in.sed -# 1. Do not distribute cppad_ipopt_nlp.hpp. -s/^myinclude_HEADERS *=.*/myinclude_HEADERS =/ -/cppad_ipopt_nlp.hpp/d -# 2. abs_top_builddir is missing from definitions in makefile.in -s/abs_top_builddir/ABS_TOP_SRCDIR/ -# 3. Remove libspeed.a from the distribution (mistake). -s/^install-libLIBRARIES:/do_not_install:/ -s/^uninstall-libLIBRARIES:/do_not_uninstall:/ -s/uninstall-libLIBRARIES// -s/install-libLIBRARIES// -# 4. Remove setting of permissions in documentation destination directory. -/chmod -R .* \$(doc_package)/d -EOF -# Items 1,2, and 4 -sed -i.stamp makefile.in -f makefile.in.sed -# Item 3 -sed -i.stamp speed/src/makefile.in -f makefile.in.sed +%setup -q +# CppAD tests the distribution before installing it. The rpm system can +# test after a mock installation. Thus, we should remove the distribution copy +# of the include file directory from the search path. We must skip +# speed/src/makefile.in because we build its library before the install. +for file in `find . -name 'makefile.in'` +do + if ! (echo $file | grep 'speed/src/makefile.in' > /dev/null) + then + sed -i "$file" \ + -e "s|-I\$(top_srcdir)\([^/]\)|-I$RPM_BUILD_ROOT/usr/include\1|" + fi +done + + +# Remove setting of permissions in documentation destination directory. +sed -i.stamp makefile.in -e '/chmod -R [^ ]* $(doc_package)/d' +# # change example/example.cpp to print out machine epsilon cat << EOF > example.sed @@ -119,6 +117,12 @@ rm -rf $RPM_BUILD_ROOT # ---------------------------------------------------------------------------- %changelog +* Mon Jan 17 2011 Brad Bell - 20110101.2-1 +- The fedora source 20110101.0 has the worng check sum, get new upstream source. +- Remove sed patches for problems that were fixed in upstream source. +- Change makefile.in so tests include from install (not distribute) directory +- (see comments above `find . -name 'makefile.in` above). + * Sat Jan 09 2011 Brad Bell - 20110101.0-2 - Remove include/cppad_ipopt_nlp.hpp from distribution. - Remove lib/libspeed.a from distribution. diff --git a/sources b/sources index 1b45ca4..a305c9d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d25559c1adb7bbdbb254206b7464dc78 cppad-20110101.0.gpl.tgz +c3481a2b39c1a1744386afd0d6a99633 cppad-20110101.2.gpl.tgz From 0ee1e154c7d9161fb060752506fe8ec0382c34ca Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Tue, 18 Jan 2011 07:10:19 -0800 Subject: [PATCH 11/11] Change where pkgconfig/cppad.pc is installed from %{_libdir} to %{_datadir} --- cppad.spec | 56 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/cppad.spec b/cppad.spec index 5860625..7873ef3 100644 --- a/cppad.spec +++ b/cppad.spec @@ -1,19 +1,26 @@ -# Known Problems: +# Known rpmlint warnings: # -# After installation of cppad-doc-%{version} the command -# rpmlint cppad-doc -# results in the following error message -# W: file-not-utf8 /usr/share/doc/cppad-%{version}/pmathmlcss.xsl +# cppad.spec: spelling-error Sumary(en_US) devel: +# Although not in the en_US dictionary, 'devel' is understood by Fedora users. +# +# cppad.spec: rpm-buildroot-usage: +# RPM_BUILD_ROOT is used to test includes from installed directory. +# +# cppad-20110101.2.gpl.tgz: strange-permission 0444L +# The premissions are for readonly, which seems fine in this case. +# +# %{_docdir}/%{name}-%{version}/pmathmlcss.xsl: file-not-utf8: # The file pmathmlcss.xsl is the standard presentation MathML style sheet. # Except for white space and a comment at the top, it is identical to # http://www.w3.org/Math/XSL/pmathmlcss.xsl # (use wget and diff -b to see that this is true). +# # ---------------------------------------------------------------------------- Name: cppad Version: 20110101.2 -Release: 1%{?dist} -Summary: No base package is installed, see %{name}-devel +Release: 2%{?dist} +Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc. Group: Development/Libraries License: GPLv2 @@ -23,11 +30,11 @@ BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description -There is no base %{name} package installation, only %{name}-devel is installed. +C++ Algorithmic Differentiation (AD), see %{name}-devel, %{name}-doc. # --------------------------------------------------------------------------- %package devel -Summary: Development libraries for %{name} +Summary: The %{name} C++ include files for Algorithmic Differentiation (AD) Group: Development/Libraries Provides: %{name} = %{version}-%{release} @@ -38,21 +45,22 @@ Algorithmic Differentiation (often referred to as Automatic Differentiation.) 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 + http://en.wikipedia.org/wiki/Automatic_differentiation +See the package %{name}-doc for documentation of this version of %{name}. # ---------------------------------------------------------------------------- %package doc Summary: Documentation for %{name} -Group: Development/Libraries +Group: XML documentation for %{name}-devel %description doc -The %{name}-doc package contains the xml documentation for -the %{name}-devel package. -Links to an html version of the %{name} documentaiton, -for the most recent version of %{name}, can be found at web site -http://www.coin-or.org/CppAD/. -In addition, printable versions of the documentation -as a single web page, in both html and xml, can be found at that web site. +The %{name}-doc package installs the XML documentation for %{name}-devel in + %{_docdir}/%{name}-%{version} +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/ +In addition, printable versions of the documentation, +as a single web page, in both HTML and XML, can be found at that web site. # ---------------------------------------------------------------------------- %prep @@ -67,7 +75,8 @@ do if ! (echo $file | grep 'speed/src/makefile.in' > /dev/null) then sed -i "$file" \ - -e "s|-I\$(top_srcdir)\([^/]\)|-I$RPM_BUILD_ROOT/usr/include\1|" + -e "s|-I\$(top_srcdir)\([^/]\)|-I$RPM_BUILD_ROOT/usr/include\1|" \ + -e 's|^pkgconfigdir *=.*|pkgconfigdir = $(datadir)/pkgconfig|' fi done @@ -109,7 +118,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc COPYING ChangeLog AUTHORS uw_copy_040507.html %{_includedir}/%{name} -%{_libdir}/pkgconfig/%{name}.pc +%{_datadir}/pkgconfig/%{name}.pc %files doc %defattr(-,root,root,-) @@ -117,6 +126,13 @@ rm -rf $RPM_BUILD_ROOT # ---------------------------------------------------------------------------- %changelog +* Tue Jan 18 2011 Brad Bell - 20110101.2-2 +- Fix rpmlint error, libdir-macro-in-noarch-package by moving the pkg-config +- file cppad.pc from %%_libdir to %%_datadir. +- Improve the %%Summary and %%description entries. +- Fix some rpmlint spelling warnings including xml -> XML, html -> HTML. +- Document (at top of spec file) reason for other warnings that are not fixed. + * Mon Jan 17 2011 Brad Bell - 20110101.2-1 - The fedora source 20110101.0 has the worng check sum, get new upstream source. - Remove sed patches for problems that were fixed in upstream source.