2003-02-27 06:56:03 +00:00
|
|
|
## -*- mode: rpm-spec; -*-
|
|
|
|
##
|
|
|
|
## $Id$
|
|
|
|
##
|
|
|
|
## @configure_input@
|
|
|
|
##
|
|
|
|
|
2003-08-28 04:43:50 +00:00
|
|
|
%define debug_package %{nil}
|
|
|
|
|
2005-11-29 20:28:51 +00:00
|
|
|
%define _with_docs 1
|
|
|
|
%{?_without_docs: %define _with_docs 0}
|
|
|
|
|
2003-02-27 06:56:03 +00:00
|
|
|
Summary: AVRDUDE is software for programming Atmel AVR Microcontrollers.
|
|
|
|
Name: avrdude
|
|
|
|
Version: @VERSION@
|
|
|
|
Release: 1
|
|
|
|
URL: http://savannah.nongnu.org/projects/avrdude
|
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
License: GPL
|
|
|
|
Group: Development/Tools
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
|
|
|
|
%description
|
|
|
|
AVRDUDE is software for programming Atmel AVR Microcontrollers.
|
|
|
|
|
2005-11-29 20:28:51 +00:00
|
|
|
%if %{_with_docs}
|
2003-03-06 08:15:47 +00:00
|
|
|
## The avrdude-docs subpackage
|
|
|
|
%package docs
|
|
|
|
Summary: Documentation for AVRDUDE.
|
|
|
|
Group: Documentation
|
|
|
|
%description docs
|
2005-11-29 20:28:51 +00:00
|
|
|
Documentation for avrdude in info, html, postscript and pdf formats.
|
|
|
|
%endif
|
2003-03-06 08:15:47 +00:00
|
|
|
|
2003-02-27 06:56:03 +00:00
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
2003-03-06 08:15:47 +00:00
|
|
|
./configure --prefix=%{_prefix} --sysconfdir=/etc --mandir=%{_mandir} \
|
2005-11-29 20:28:51 +00:00
|
|
|
--infodir=%{_infodir} \
|
|
|
|
%if %{_with_docs}
|
|
|
|
--enable-doc=yes
|
|
|
|
%else
|
|
|
|
--enable-doc=no
|
|
|
|
%endif
|
2003-02-27 06:56:03 +00:00
|
|
|
|
|
|
|
make
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
make prefix=$RPM_BUILD_ROOT%{_prefix} \
|
|
|
|
sysconfdir=$RPM_BUILD_ROOT/etc \
|
|
|
|
mandir=$RPM_BUILD_ROOT%{_mandir} \
|
2003-03-06 08:15:47 +00:00
|
|
|
infodir=$RPM_BUILD_ROOT%{_infodir} \
|
2003-02-27 06:56:03 +00:00
|
|
|
install
|
|
|
|
|
2003-08-28 04:43:50 +00:00
|
|
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
|
|
|
|
2003-02-27 06:56:03 +00:00
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2005-11-29 20:28:51 +00:00
|
|
|
%if %{_with_docs}
|
|
|
|
%post docs
|
2003-03-06 08:15:47 +00:00
|
|
|
[ -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 || :
|
|
|
|
|
2005-11-29 20:28:51 +00:00
|
|
|
%preun docs
|
2003-03-06 08:15:47 +00:00
|
|
|
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
|
2005-11-29 20:28:51 +00:00
|
|
|
%endif
|
2003-03-06 08:15:47 +00:00
|
|
|
|
2003-02-27 06:56:03 +00:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_prefix}/bin/avrdude
|
|
|
|
%{_mandir}/man1/avrdude.1.gz
|
|
|
|
%attr(0644,root,root) %config /etc/avrdude.conf
|
|
|
|
|
2005-11-29 20:28:51 +00:00
|
|
|
%if %{_with_docs}
|
2003-03-06 08:15:47 +00:00
|
|
|
%files docs
|
2005-11-29 20:28:51 +00:00
|
|
|
%doc %{_infodir}/*info*
|
2003-08-28 04:43:50 +00:00
|
|
|
%doc doc/avrdude-html/*.html
|
|
|
|
%doc doc/TODO
|
2003-03-06 08:15:47 +00:00
|
|
|
%doc doc/avrdude.ps
|
|
|
|
%doc doc/avrdude.pdf
|
2005-11-29 20:28:51 +00:00
|
|
|
%endif
|
2003-02-27 06:56:03 +00:00
|
|
|
|
|
|
|
%changelog
|
2005-11-29 20:28:51 +00:00
|
|
|
* 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.
|
|
|
|
|
2003-08-28 04:43:50 +00:00
|
|
|
* Wed Aug 27 2003 Theodore A. Roth <troth@openavr.org>
|
|
|
|
[Thanks to Artur Lipowski <LAL@pro.onet.pl>]
|
|
|
|
- Do not build debug package.
|
|
|
|
- Remove files not packaged to quell RH9 rpmbuild complaints.
|
|
|
|
|
2003-03-06 08:15:47 +00:00
|
|
|
* Wed Mar 05 2003 Theodore A. Roth <troth@openavr.org>
|
|
|
|
- Add docs sub-package.
|
|
|
|
- Add %post and %preun scriptlets for handling info files.
|
|
|
|
|
2003-02-27 06:56:03 +00:00
|
|
|
* Wed Feb 26 2003 Theodore A. Roth <troth@openavr.org>
|
|
|
|
- Initial build.
|
|
|
|
|
|
|
|
|