debian/0000755000000000000000000000000012071262305007164 5ustar debian/patches/0000755000000000000000000000000012071257506010622 5ustar debian/patches/series0000644000000000000000000000005712071257221012033 0ustar string_format.patch add_ldflags_makefile.patch debian/patches/string_format.patch0000644000000000000000000000105312071257355014522 0ustar Description: Fix the bad string formatting Author: Petter Reinholdtsen --- a/src/errormng.cc +++ b/src/errormng.cc @@ -32,7 +32,8 @@ ErrorMng::ErrorMng(const char* c){ - int l = sprintf(&_buff[0], c); +// int l = sprintf(&_buff[0], c); + int l = sprintf(&_buff[0], "%s", c); _msg = &_buff[l]; } --- a/src/ezargs.cc +++ b/src/ezargs.cc @@ -316,7 +316,7 @@ } if(_givehelp){ givehelp(); exit(0); } - if(_giveversion){ printf(version()); exit(0); } + if(_giveversion){ printf("%s", version()); exit(0); } return true; } debian/patches/add_ldflags_makefile.patch0000644000000000000000000000202712071257506015725 0ustar Description: Fix the LDFLAGS variable name and variables assignment Author: Slavko --- a/Makefile +++ b/Makefile @@ -26,8 +26,8 @@ LK=g++ #CFLAGS=-I$(USBROOT)/include -I$(SRCDIR) -I$(OBJDIR) -g #LFLAGS=-L$(USBROOT)/lib -CFLAGS= -I$(SRCDIR) -I$(OBJDIR) -g -Wall -LFLAGS= +CFLAGS+= -I$(SRCDIR) -I$(OBJDIR) -g -Wall +LDFLAGS+= LIBS=-lusb -lstdc++ OBJS=$(OBJDIR)/$(MAIN).o \ @@ -38,13 +38,13 @@ $(OBJDIR)/ezargs.o $(OBJDIR)/usbscan: $(SRCDIR)/usbscan.c - gcc $(CFLAGS) $(LFLAGS) $(SRCDIR)/usbscan.c $(LIBS) -o $(OBJDIR)/usbscan + gcc $(CFLAGS) $(LDFLAGS) $(SRCDIR)/usbscan.c $(LIBS) -o $(OBJDIR)/usbscan $(OBJDIR)/$(MAIN) : $(OBJS) - $(LK) $(LFLAGS) $(OBJS) $(LIBS) -o $(OBJDIR)/$(MAIN) + $(LK) $(LDFLAGS) $(OBJS) $(LIBS) -o $(OBJDIR)/$(MAIN) $(OBJDIR)/$(MAIN).static : $(OBJS) - $(LK) -static $(LFLAGS) $(OBJS) $(LIBS) -o $(OBJDIR)/$(MAIN).static + $(LK) -static $(LDFLAGS) $(OBJS) $(LIBS) -o $(OBJDIR)/$(MAIN).static $(OBJDIR)/%.o : $(SRCDIR)/%.cc $(CC) -c $(CFLAGS) $(SRCDIR)/$*.cc -o $(OBJDIR)/$*.o debian/docs0000644000000000000000000000000711751423442010041 0ustar README debian/source/0000755000000000000000000000000011404562326010471 5ustar debian/source/format0000644000000000000000000000001411404562326011677 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000026711751412421010222 0ustar # See uscan(1) for format # Compulsory line, this is a version 3 file version=3 # Uncomment to examine a Webpage http://www-verimag.imag.fr/~raymond/edu/lego/t2n t2n-(.*)\.src\.tgz debian/t2n.10000644000000000000000000000335611404562325007764 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH T2N 1 "March 27, 2010" .\" 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 t2n \- simple command-line tool for NXT .SH SYNOPSIS .B t2n .RI [ options ] .SH DESCRIPTION This manual page documents briefly the .B t2n command. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBt2n\fP is simple command-line tool for sending commands to nxt through the USB port. .SH OPTIONS This program recognize options only with short options starting with one dash (`-'). A summary of options is included below. .TP .B \-b check battery level. .TP .B \-i print nxt info. .TP .B \-ls list files. .TP .B \-put upload file. .TP .B \-get download file. .TP .B \-v set verbose mode. .TP .B \-vv even more verbose. .TP .B \-vvv gossip. .TP .B \-help Show summary of options and exit. .TP .B \-version Show version of program and exit. .SH SEE ALSO .BR nxc (1), .BR nxttool (1). .SH AUTHOR t2n was written by Pascal Raymond. .PP This manual page was written by Slavko , for the Debian project (and may be used by others). debian/install0000644000000000000000000000002212071105446010551 0ustar obj/t2n /usr/bin debian/changelog0000644000000000000000000000047612071262260011045 0ustar t2n (0.5-1) unstable; urgency=low * added patch to fix string formatting (thanks to Petter Reinholdtsen) * patched Makefile to accept the CFLAGS and LDFLAGS variables * upload sponsored by Petter Reinholdtsen * Initial release.(Closes: #518343) -- Slavko Thu, 03 Jan 2013 11:59:57 +0100 debian/manpages0000644000000000000000000000001512071255634010705 0ustar debian/t2n.1 debian/rules0000755000000000000000000000047612071260170010251 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ override_dh_auto_build: # post hardenning options to Makefile make LDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" CFLAGS="$(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)" debian/control0000644000000000000000000000104312071256612010571 0ustar Source: t2n Section: electronics Priority: extra Maintainer: Slavko Build-Depends: debhelper (>= 8), libusb-dev Standards-Version: 3.9.3 Homepage: http://www-verimag.imag.fr/~raymond/edu/lego/ Package: t2n Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Simple command-line tool for Lego NXT Simple command-line tool for communication with your NXT brick through the USB port. . By this tool you can: * check battery level * print nxt info * list files * upload file * download file . debian/copyright0000644000000000000000000000210312071261214011111 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 Upstream-Name: t2n Source: http://www-verimag.imag.fr/~raymond/edu/lego/t2n/ Files: * Copyright: 1996-2012 Pascal Raymond License: GPL-3+ Files: debian/* Copyright: 2012 Slavko License: GPL-3+ License: GPL-3+ 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 3 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 3 can be found in "/usr/share/common-licenses/GPL-3". debian/t2n.udev0000644000000000000000000000045412071102055010552 0ustar # NXT 2.0 brick SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0694", ATTR{idProduct}=="0002", \ MODE="0660", GROUP="plugdev", SYMLINK+="nxt-%k" #, SYMLINK+="legonxt-%n" # NXT 2.0 brick in flash mode SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="03eb", \ MODE="0660", GROUP="plugdev" debian/compat0000644000000000000000000000000212071106467010370 0ustar 8