File avrdude.spec of Package avrdude
#
# spec file for package avrdude (Version 5.11)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: avrdude
BuildRequires: bison flex libusb-devel readline-devel libftdi1-devel
Version: 5.11.1
Release: 1
Url: http://savannah.nongnu.org/projects/avrdude
Group: Development/Tools/Other
License: GPL-2.0+
Summary: Upload tool for AVR microcontrollers
Source0: http://savannah.nongnu.org/download/%name/%name-%version.tar.gz
Source1: http://savannah.nongnu.org/download/%name/%name-doc-%version.tar.gz
Source2: http://savannah.nongnu.org/download/%name/%name-doc-%version.pdf
Source3: modprobe.avrdude_parport
Source4: avrdude-udev.rules
Patch0: avrdude-5.11-no-builddate.diff
Patch1: avrdude-use-serial-device-for-serbb.patch
Provides: avr-programmer
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: /bin/cat /sbin/modprobe
PreReq: %install_info_prereq
%description
avrdude is a tool for avr microcontrollers and drives many hardware
in-system programmers. avrdude allows you to program your
microcontroller through USB or parallel port of your computer.
%prep
%setup -q -a 1
cp -a %{S:2} %name.pdf
mv %name-html html
# avrdude-5.11-no-builddate.diff
%patch0 -p1
# avrdude-use-serial-device-for-serbb.patch
%patch1 -p1
touch lexer.l
%build
%configure
make %{?_smp_mflags}
%install
make DESTDIR=$RPM_BUILD_ROOT install
make DESTDIR=$RPM_BUILD_ROOT -C doc install-info
install -D -m 644 %{S:3} $RPM_BUILD_ROOT/etc/modprobe.d/avrdude_parport.conf
install -D -m 644 %{S:4} $RPM_BUILD_ROOT/etc/udev/rules.d/98-avrdude.rules
install -d $RPM_BUILD_ROOT/usr/bin
%post
%if %{?suse_version:1}0
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
if [ "$1" -eq 1 ]; then
# $1==0 is binary uninstall.
# $1==1 is binary install.
# $1==2 is during build
if [ "$YAST_IS_RUNNING" = "yes" ]; then
# make life trivial for yast users.
/sbin/modprobe ppdev
fi
fi
%endif
%postun
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%files
%defattr (-, root, root)
%doc AUTHORS COPYING NEWS README html %name.pdf
%doc %_mandir/*/*
%doc %_infodir/%{name}.info.gz
%_bindir/*
%config /etc/*
%changelog