debian/0000755000000000000000000000000012140204612007156 5ustar debian/patches/0000755000000000000000000000000012140160700010604 5ustar debian/patches/series0000644000000000000000000000006412140160700012021 0ustar makefile_hardenning.patch fix_ftbfs_as_needed.patch debian/patches/makefile_hardenning.patch0000644000000000000000000000144512074017347015621 0ustar Description: Modifing the SConstruct to apply the hardenning flags Author: Slavko --- a/SConstruct +++ b/SConstruct @@ -14,6 +14,10 @@ if auto_libs: BuildEnv.ParseConfig('pkg-config --cflags --libs ' + auto_libs) +BuildEnv.Append(LINKFLAGS='-z relro') +BuildEnv.Append(CCFLAGS=['-g', '-O2', '-fstack-protector', '--param=ssp-buffer-size=4', + '-Wformat', '-Werror=format-security', '-D_FORTIFY_SOURCE=2']) + BuildEnv.Command('flash_routine.h', 'flash_routine.h.base', './make_flash_header.py') @@ -24,7 +28,8 @@ LIBS='usb')) Default(BuildEnv.Program('fwflash', 'main_fwflash.c', - LIBS=['usb', 'nxt'], LIBPATH='.')) + LIBS=['usb', 'nxt'], LIBPATH='.', + )) Default(BuildEnv.Program('fwexec', 'main_fwexec.c', LIBS=['usb', 'nxt'], LIBPATH='.')) debian/patches/fix_ftbfs_as_needed.patch0000644000000000000000000000075012140160700015570 0ustar Description: Fix FTBFS with ld --as-needed. Author: Felix Geyer --- libnxt-0.3.orig/SConstruct +++ libnxt-0.3/SConstruct @@ -28,8 +28,8 @@ Default(BuildEnv.Library('nxt', LIBS='usb')) Default(BuildEnv.Program('fwflash', 'main_fwflash.c', - LIBS=['usb', 'nxt'], LIBPATH='.', + LIBS=['nxt', 'usb'], LIBPATH='.', )) Default(BuildEnv.Program('fwexec', 'main_fwexec.c', - LIBS=['usb', 'nxt'], LIBPATH='.')) + LIBS=['nxt', 'usb'], LIBPATH='.')) debian/README.Debian0000644000000000000000000000036512071635665011246 0ustar ---------------------------- Debian README file for libnxt ---------------------------- UDEV RULE ----------------- The udev rules are prepared to allow read/write to device for plugdev group, then make sure that you are member of this group. debian/docs0000644000000000000000000000000712074021027010031 0ustar README debian/source/0000755000000000000000000000000011404562417010472 5ustar debian/source/format0000644000000000000000000000001411404562417011700 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000073312074350300010214 0ustar # See uscan(1) for format # Compulsory line, this is a version 3 file version=3 # Uncomment to find new files on GooglePages #http://code.google.com/p/libnxt/downloads/list http://libnxt.googlecode.com/files/libnxt-(.*)\.tar\.gz opts=downloadurlmangle=s#.*(libnxt-([\d.]+)\.tar\.gz).*#http://libnxt.googlecode.com/files/$1#,filenamemangle=s#.*(libnxt-([\d.]+)\.tar\.gz).*#$1# \ http://code.google.com/p/libnxt/downloads/list ^.*detail\?name=libnxt-([\d.]+)\.tar\.gz.* debian/install0000644000000000000000000000004312074270226010556 0ustar fwflash /usr/bin fwexec /usr/bin debian/changelog0000644000000000000000000000071112140164013011027 0ustar libnxt (0.3-2) unstable; urgency=low * Fix the order of passed libraries, thanks to Felix Geyer (Closes: #706497) * Small fix of the package description * Upload sponsored by Petter Reinholdtsen. -- Slavko Wed, 01 May 2013 11:29:24 +0200 libnxt (0.3-1) unstable; urgency=low * Initial release (Closes: #697404) * Upload sponsored by Petter Reinholdtsen. -- Slavko Fri, 11 Jan 2013 15:48:07 +0100 debian/manpages0000644000000000000000000000004112071640553010702 0ustar debian/fwflash.1 debian/fwexec.1 debian/rules0000755000000000000000000000130112074350315010241 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ override_dh_auto_build: scons LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" CCFLAGS="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" override_dh_auto_clean: dh_auto_clean scons -c rm -f .sconsign.dblite || true %: dh $@ debian/control0000644000000000000000000000254012140157712010572 0ustar Source: libnxt Section: electronics Priority: extra Maintainer: Slavko Build-Depends: debhelper (>= 8), libusb-dev (>= 0.1.12), scons (>= 1.2) Standards-Version: 3.9.4 Homepage: http://code.google.com/p/libnxt Package: libnxt Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: utility library for talking to the LEGO Mindstorms NXT brick LibNXT is an utility library for talking to the LEGO Mindstorms NXT intelligent brick at a relatively low level. 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. . The design of LibNXT is layered, meaning you can plug into it at any level of complexityor abstraction you desire, from the lowest level USB bulk bit-pushing interface, to an API exposing the SAM-BA commandset, right up to just calling nxt_firmware_flash() and having everything taken care of! . This package provides two binary utils: * fwflash is the program that uses LibNXT. As its name hints, its purpose is to take a NXT firmware image file and flash it to a connected NXT device. * fwexec is another utility, which takes a specially compiled firmware image, uploads it to the NXT's RAM, and executes it directly from there. debian/copyright0000644000000000000000000000206412074020202011110 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: libnxt Source: http://code.google.com/p/libnxt/ Files: * Copyright: 2007 David Anderson License: GPL-2+ Files: debian/* Copyright: 2013 Slavko License: GPL-2+ License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". debian/fwflash.10000644000000000000000000000211712074350430010701 0ustar .TH FWFLASH 1 "January 12, 2013" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME fwflash \- program to flash image file to a connected NXT device .SH SYNOPSIS .B fwflash file .SH DESCRIPTION This manual page documents briefly the .B fwflash command. .PP \fBfwflash\fP is a program to flash image file to a connected NXT device by the libNXT library. .SH OPTIONS This program has not any options and take file name of the NXT firmaware to upload .SH SEE ALSO .BR nbc (1), .BR fwexec (1), .BR nexttool (1). .br .SH AUTHOR fwflash and libnxt was written by David Anderson . .PP This manual page was written by Slavko , for the Debian project (and may be used by others). debian/compat0000644000000000000000000000000212071636572010375 0ustar 8 debian/libnxt.udev0000644000000000000000000000042312074350336011355 0ustar # NXT 2.0 brick SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0694", ATTR{idProduct}=="0002", \ MODE="0660", GROUP="plugdev", SYMLINK+="nxt-%k" # NXT 2.0 brick in flash mode SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03eb", \ MODE="0660", GROUP="plugdev" debian/fwexec.10000644000000000000000000000216012074350451010531 0ustar .TH FWEXEC 1 "January 12, 2013" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME fwexec \- program to upload and rexecute image file to a connected NXT device .SH SYNOPSIS .B fwexec file .SH DESCRIPTION This manual page documents briefly the .B fwexec command. .PP \fBfwexec\fP is a program to upload image file to a connected NXT device by the libNXT library and then to execute it. .SH OPTIONS This program has not any options and take file name of the NXT firmaware to upload .SH SEE ALSO .BR nbc (1), .BR fwflash (1), .BR nexttool (1). .br .SH AUTHOR fwexec and libnxt was written by David Anderson . .PP This manual page was written by Slavko , for the Debian project (and may be used by others).