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@558 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2005-11-29 20:28:51 +00:00
parent 70fdf3082e
commit 0b197a6c6f
2 changed files with 34 additions and 5 deletions

View File

@ -1,3 +1,13 @@
2005-11-29 Joerg Wunsch <j@uriah.heep.sax.de>
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 <j@uriah.heep.sax.de>
Submitted by someone who thinks he's called "Daper":

View File

@ -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 <galens@seitzassoc.com>
- 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 <troth@openavr.org>
[Thanks to Artur Lipowski <LAL@pro.onet.pl>]
- Do not build debug package.