Skip to content

Commit

Permalink
Submitted by Galen Seitz:
Browse files Browse the repository at this point in the history
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
  • Loading branch information
joerg_wunsch committed Nov 29, 2005
1 parent c1e3818 commit 3632e42
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2005-11-29 Joerg Wunsch <[email protected]>

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 <[email protected]>

Submitted by someone who thinks he's called "Daper":
Expand Down
29 changes: 24 additions & 5 deletions avrdude.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@
Expand All @@ -20,20 +23,27 @@ 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

%build

./configure --prefix=%{_prefix} --sysconfdir=/etc --mandir=%{_mandir} \
--infodir=%{_infodir}
--infodir=%{_infodir} \
%if %{_with_docs}
--enable-doc=yes
%else
--enable-doc=no
%endif

make

Expand All @@ -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 <[email protected]>
- 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 <[email protected]>
[Thanks to Artur Lipowski <[email protected]>]
- Do not build debug package.
Expand Down

0 comments on commit 3632e42

Please sign in to comment.