Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 5acfd0285705f2b2444a1331556a2ba8 > files > 7

libnxt-0.3-2.fc14.1.src.rpm

Summary: Utility for flashing LEGO Mindstorms NXT firmware
Name: libnxt
Version: 0.3
Release: 2%{?dist}.1
License: GPLv2+
Group: Development/Tools
URL: http://code.google.com/p/libnxt/
Source0: http://libnxt.googlecode.com/files/%{name}-%{version}.tar.gz
# Short document describing how to reflash the NXT firmware
Source1: libnxt-NXT-REFLASH-HOWTO
# Use appropriate tool's names (as per arm-gp2x-linux-gcc package)
Patch0: libnxt-flash-write-makefile.patch
# Use the hashlib module instead of the deprecated sha module
Patch1: libnxt-hashlib.patch
# Removes the following compilation warning and make the code
# endian-independent:
# samba.c: In function 'nxt_read_common':
# samba.c:90: warning: dereferencing type-punned pointer will break
# strict-aliasing rules
Patch2: libnxt-samba-endian-independent.patch
# Respect CFLAGS and LDFLAGS environment variables during the build
Patch3: libnxt-sconstruct-optflags.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libusb-devel
BuildRequires: scons
BuildRequires: arm-gp2x-linux-gcc


%description
LibNXT is an utility library for talking to the LEGO Mindstorms NXT.
 It currently does:
 * Handling USB communication and locating the NXT in the USB tree.
 * Interaction with the Atmel AT91SAM boot assistant.
 * Flashing of a firmware image to the NXT.
 * Execution of code directly in RAM.


%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
cp -p %{SOURCE1} NXT-REFLASH-HOWTO
make -C flash_write clean # to be sure that we will regenerate the flash.bin


%build
make -C flash_write
export CFLAGS="%{optflags}"
export LDFLAGS="%{optflags}"
scons %{?_smp_mflags}


%install
rm -rf %{buildroot}
install -D -m 755 fwexec %{buildroot}%{_bindir}/nxt-fwexec
install -D -m 755 fwflash %{buildroot}%{_bindir}/nxt-fwflash


%clean
rm -rf %{buildroot}


%files
%defattr(-, root, root, -)
%doc COPYING README NXT-REFLASH-HOWTO
%{_bindir}/nxt-fwexec
%{_bindir}/nxt-fwflash


%changelog
* Tue Oct 05 2010 jkeating - 0.3-2.1
- Rebuilt for gcc bug 634757

* Sun Sep 13 2010 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.3-2
- Fix for respecting CFLAGS and LDFLAGS during the build,
- Fix for strict-aliasing rules problem,
- Describe purpose of the patches,
- Firmware reflash HOWTO added.

* Mon Jul 19 2010 Damian Wrobel <dwrobel@ertelnet.rybnik.pl> - 0.3-1
- Initial RPM release