From a3fe61cb2aae27898216b27b4169d183210a5005 Mon Sep 17 00:00:00 2001 From: joerg_wunsch Date: Tue, 29 Nov 2005 20:28:51 +0000 Subject: [PATCH] Submitted by Galen Seitz: patch #4459: Fix for rpm package builds * avrdude.spec.in: update the RPM spec file: - Default to enable-doc=yes during configure. - Move info file to docs package. - Make building of docs package conditional. Basic idea copied from avr-gcc. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@558 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 10 ++++++++++ avrdude.spec.in | 29 ++++++++++++++++++++++++----- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ebe88435..3fed7b78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-11-29 Joerg Wunsch + + Submitted by Galen Seitz: + patch #4459: Fix for rpm package builds + * avrdude.spec.in: update the RPM spec file: + - Default to enable-doc=yes during configure. + - Move info file to docs package. + - Make building of docs package conditional. Basic + idea copied from avr-gcc. + 2005-11-29 Joerg Wunsch Submitted by someone who thinks he's called "Daper": diff --git a/avrdude.spec.in b/avrdude.spec.in index d3e31214..ff9879f6 100644 --- a/avrdude.spec.in +++ b/avrdude.spec.in @@ -7,6 +7,9 @@ %define debug_package %{nil} +%define _with_docs 1 +%{?_without_docs: %define _with_docs 0} + Summary: AVRDUDE is software for programming Atmel AVR Microcontrollers. Name: avrdude Version: @VERSION@ @@ -20,12 +23,14 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root %description AVRDUDE is software for programming Atmel AVR Microcontrollers. +%if %{_with_docs} ## The avrdude-docs subpackage %package docs Summary: Documentation for AVRDUDE. Group: Documentation %description docs -Documentation for avrdude in html, postscript and pdf formats. +Documentation for avrdude in info, html, postscript and pdf formats. +%endif %prep %setup -q @@ -33,7 +38,12 @@ Documentation for avrdude in html, postscript and pdf formats. %build ./configure --prefix=%{_prefix} --sysconfdir=/etc --mandir=%{_mandir} \ - --infodir=%{_infodir} + --infodir=%{_infodir} \ +%if %{_with_docs} + --enable-doc=yes +%else + --enable-doc=no +%endif make @@ -51,34 +61,43 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir %clean rm -rf $RPM_BUILD_ROOT -%post +%if %{_with_docs} +%post docs [ -f %{_infodir}/avrdude.info ] && \ /sbin/install-info %{_infodir}/avrdude.info %{_infodir}/dir || : [ -f %{_infodir}/avrdude.info.gz ] && \ /sbin/install-info %{_infodir}/avrdude.info.gz %{_infodir}/dir || : -%preun +%preun docs if [ $1 = 0 ]; then [ -f %{_infodir}/avrdude.info ] && \ /sbin/install-info --delete %{_infodir}/avrdude.info %{_infodir}/dir || : [ -f %{_infodir}/avrdude.info.gz ] && \ /sbin/install-info --delete %{_infodir}/avrdude.info.gz %{_infodir}/dir || : fi +%endif %files %defattr(-,root,root) %{_prefix}/bin/avrdude %{_mandir}/man1/avrdude.1.gz -%{_infodir}/*info* %attr(0644,root,root) %config /etc/avrdude.conf +%if %{_with_docs} %files docs +%doc %{_infodir}/*info* %doc doc/avrdude-html/*.html %doc doc/TODO %doc doc/avrdude.ps %doc doc/avrdude.pdf +%endif %changelog +* Fri Sep 23 2005 Galen Seitz +- Default to enable-doc=yes during configure. +- Move info file to docs package. +- Make building of docs package conditional. Basic idea copied from avr-gcc. + * Wed Aug 27 2003 Theodore A. Roth [Thanks to Artur Lipowski ] - Do not build debug package.