File uisp.spec of Package uisp
#
# spec file for package uisp (Version 20050207suse)
#
# Copyright (c) 2009 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/
#
# norootforbuild
Name: uisp
BuildRequires: gcc-c++
%define use_fastpoll 1
%define upstream_version 20050207
Version: 20050207suse
Release: 139
Url: http://savannah.nongnu.org/projects/uisp
Group: Development/Tools/Other
License: GPL v2 or later
Summary: An upload tool for AVR microcontrollers
Source: http://savannah.nongnu.org/download/%{name}/%{name}-%{upstream_version}.tar.gz
Source1: resmgr.uisp_parport.conf
Source2: modprobe.uisp_parport
AutoReqProv: on
Provides: avr-programmer
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: /bin/cat /sbin/modprobe
Patch1: uisp_fastpoll_3712.patch
Patch2: uisp-20050207-2313+48.diff
Patch3: uisp-20050207-err_msg.diff
Patch4: uisp-20050207-warn-unused.diff
Patch5: uisp-20050207suse.diff
Patch6: uisp-20050207-m168-stk500-extendedFuseSupport.patch
Patch7: stk500_pgzs_shift.diff
%description
Uisp is a tool for avr microcontrollers and drives many hardware
in-system programmers. Uisp allows you to programm your microcontroller
through the parallel port of your computer.
Authors:
--------
Margarita Manterola <margamanterola@gmail.com>
Marek Michalkiewicz <marekm@amelek.gda.pl>
Theodore A. Roth <troth@openavr.org>
Uros Platise
%prep
%setup -n %{name}-%{upstream_version}
%if %{use_fastpoll}
%patch1 -p1
%else
%patch2 -p1
%endif
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
./configure --prefix=/opt/cross --mandir=/usr/share/man
make
%install
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages
mv $RPM_BUILD_ROOT/opt/cross/share/doc/%{name}-%{version} \
$RPM_BUILD_ROOT/usr/share/doc/packages/uisp
rmdir $RPM_BUILD_ROOT/opt/cross/share/doc
rmdir $RPM_BUILD_ROOT/opt/cross/share
mkdir -p $RPM_BUILD_ROOT/etc/resmgr.conf.d
# no longer works for 10.2 see bugzilla #235059
# install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/resmgr.conf.d/99-uisp_parport.conf
mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/modprobe.d/uisp_parport
%post
%if %suse_version >= 1000
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.
test -x /usr/sbin/rcresmgr && /usr/sbin/rcresmgr restart
/sbin/modprobe ppdev
fi
fi
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr (-, root, root)
%doc AUTHORS CHANGES COPYING ChangeLog INSTALL NEWS TODO
%doc /usr/share/man/man?/*.*
/opt/*
%config /etc/*
%changelog
* Mon Oct 01 2007 jw@suse.de
- fixed pgsz shift.
* Fri Mar 30 2007 jw@suse.de
- support for ATmega168 extended.
* Mon Jan 15 2007 jw@suse.de
- degrading according to bugzilla #235059
* Thu Jun 01 2006 jw@suse.de
- added support for ATmega168, savannah-8875.
added const to some 'char *' to make beta-gcc happy.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Aug 19 2005 jw@suse.de
- fix for bugzilla#105209 fixed:
modprobe now only done when YAST_IS_RUNNING
* Thu Aug 18 2005 jw@suse.de
- Wrong condition in warn-unused.diff fixed.
modprobe and resmgr support added for sl10.0
This fixes both parts of bugzilla#105209
* Wed May 11 2005 jw@suse.de
- patched around attribute warn-unused-result.
* Tue May 10 2005 jw@suse.de
- initial version: uisp-20050207