Message ID | 1360340189-4409-1-git-send-email-laurent.cans@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
On 02/08/2013 01:16 PM, Laurent Cans wrote:
> + select BR2_PACKAGE_WI
WI?
There's no such package in buildroot.
And it's not in DEPENDENCIES either...
Regards.
Dear Laurent Cans, Thanks, this looks pretty good; A few comments below. On Fri, 8 Feb 2013 17:16:29 +0100, Laurent Cans wrote: > Aircrack-ng is a set of tools for auditing wireless security. > > Although the last version is 1.1, I choose to package last svn version due to a fixed bug which fix a failed compilation. Please wrap lines at ~80 columns. > diff --git a/package/aircrack-ng/Config.in b/package/aircrack-ng/Config.in > new file mode 100644 > index 0000000..1efa8e6 > --- /dev/null > +++ b/package/aircrack-ng/Config.in > @@ -0,0 +1,9 @@ > +config BR2_PACKAGE_AIRCRACK_NG > + bool "aircrack-ng" > + depends on BR2_LARGEFILE > + select BR2_PACKAGE_OPENSSL > + select BR2_PACKAGE_WI > + help > + A set of tools for auditing wireless networks > + > + http://www.aircrack-ng.org/ Since your package depends on BR2_LARGEFILE, you must add a comment: comment "aircrack-ng needs a toolchain with largefile support" depends on !BR2_LARGEFILE Like we do for all other packages. > diff --git a/package/aircrack-ng/aircrack-ng.mk b/package/aircrack-ng/aircrack-ng.mk > new file mode 100644 > index 0000000..29f638c > --- /dev/null > +++ b/package/aircrack-ng/aircrack-ng.mk > @@ -0,0 +1,34 @@ > +############################################################# > +# > +# Aircrack-ng > +# > +############################################################# > +AIRCRACK_NG_VERSION = 2245 One empty line between the header and the first variable definition. > +AIRCRACK_NG_SITE = http://trac.aircrack-ng.org/svn/trunk > +AIRCRACK_NG_SITE_METHOD = svn > +AIRCRACK_NG_LICENSE = GPLv2 License is GPLv2+ > +AIRCRACK_NG_LICENSE_FILES = LICENSE > +AIRCRACK_NG_DEPENDENCIES = openssl > + > +ifeq($(BR2_PACKAGE_SQLITE),y) > + AIRCRACK_NG_OPTS = sqlite=true > + AIRCRACK_NG_DEPENDENCIES += sqlite > +endif The src/Makefile contains: ifeq ($(subst TRUE,true,$(filter TRUE true,$(sqlite) $(SQLITE))),true) LIBSQL = -L/usr/local/lib -lsqlite3 else LIBSQL = endif This -L/usr/local/lib isn't really nice since this is not where sqlite will be installed, and it may cause issues when cross-compiling. > + > +define AIRCRACK_NG_BUILD_CMDS > + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) $(AIRCRACK_NG_OPTS) all > +endef Use $(TARGET_CONFIGURE_OPTS) : $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(AIRCRACK_NG_OPTS) all And ditto for the other commands. Best regards, Thomas
Am 08.02.2013 16:32, schrieb Thomas Petazzoni: > Dear Laurent Cans, > > Thanks, this looks pretty good; A few comments below. > > On Fri, 8 Feb 2013 17:16:29 +0100, Laurent Cans wrote: >> Aircrack-ng is a set of tools for auditing wireless security. >> >> Although the last version is 1.1, I choose to package last svn version due to a fixed bug which fix a failed compilation. > Please wrap lines at ~80 columns. > >> diff --git a/package/aircrack-ng/Config.in b/package/aircrack-ng/Config.in >> new file mode 100644 >> index 0000000..1efa8e6 >> --- /dev/null >> +++ b/package/aircrack-ng/Config.in >> @@ -0,0 +1,9 @@ >> +config BR2_PACKAGE_AIRCRACK_NG >> + bool "aircrack-ng" >> + depends on BR2_LARGEFILE >> + select BR2_PACKAGE_OPENSSL >> + select BR2_PACKAGE_WI >> + help >> + A set of tools for auditing wireless networks >> + >> + http://www.aircrack-ng.org/ > Since your package depends on BR2_LARGEFILE, you must add a comment: > > comment "aircrack-ng needs a toolchain with largefile support" > depends on !BR2_LARGEFILE > > Like we do for all other packages. > >> diff --git a/package/aircrack-ng/aircrack-ng.mk b/package/aircrack-ng/aircrack-ng.mk >> new file mode 100644 >> index 0000000..29f638c >> --- /dev/null >> +++ b/package/aircrack-ng/aircrack-ng.mk >> @@ -0,0 +1,34 @@ >> +############################################################# >> +# >> +# Aircrack-ng >> +# >> +############################################################# >> +AIRCRACK_NG_VERSION = 2245 > One empty line between the header and the first variable definition. Someone should fix this in the manual. I'll do this and provide a patch. Regards Stephan > >> +AIRCRACK_NG_SITE = http://trac.aircrack-ng.org/svn/trunk >> +AIRCRACK_NG_SITE_METHOD = svn >> +AIRCRACK_NG_LICENSE = GPLv2 > License is GPLv2+ > >> +AIRCRACK_NG_LICENSE_FILES = LICENSE >> +AIRCRACK_NG_DEPENDENCIES = openssl >> + >> +ifeq($(BR2_PACKAGE_SQLITE),y) >> + AIRCRACK_NG_OPTS = sqlite=true >> + AIRCRACK_NG_DEPENDENCIES += sqlite >> +endif > The src/Makefile contains: > > ifeq ($(subst TRUE,true,$(filter TRUE true,$(sqlite) $(SQLITE))),true) > LIBSQL = -L/usr/local/lib -lsqlite3 > else > LIBSQL = > endif > > This -L/usr/local/lib isn't really nice since this is not where sqlite > will be installed, and it may cause issues when cross-compiling. > >> + >> +define AIRCRACK_NG_BUILD_CMDS >> + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) $(AIRCRACK_NG_OPTS) all >> +endef > Use $(TARGET_CONFIGURE_OPTS) : > > $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(AIRCRACK_NG_OPTS) all > > And ditto for the other commands. > > Best regards, > > Thomas
Hi Laurent You mean 1.1 did not compile with latest buildroot ? Here's mine from 2012.05 days but ofcourse it needs fixing and cleanup .... ############################################################# # # aircrack-ng # ############################################################# AIRCRACK_NG_VERSION = 1.1 AIRCRACK_NG_SOURCE = aircrack-ng-$(AIRCRACK_NG_VERSION).tar.gz AIRCRACK_NG_SITE = http://download.aircrack-ng.org AIRCRACK_NG_DEPENDENCIES = openssl sqlite define AIRCRACK_NG_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" LD="$(TARGET_LD)" -C $(@D) sqlite=true unstable=true strip endef define AIRCRACK_NG_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) sqlite=true unstable=true install endef $(eval $(call GENTARGETS)) 8.2.2013 18:16, Laurent Cans kirjoitti: > Aircrack-ng is a set of tools for auditing wireless security. > > Although the last version is 1.1, I choose to package last svn version due to a fixed bug which fix a failed compilation. > > Signed-off-by: Laurent Cans <laurent.cans@gmail.com> > --- > package/Config.in | 1 + > package/aircrack-ng/Config.in | 9 +++++++++ > package/aircrack-ng/aircrack-ng.mk | 34 ++++++++++++++++++++++++++++++++++ > 3 files changed, 44 insertions(+) > create mode 100644 package/aircrack-ng/Config.in > create mode 100644 package/aircrack-ng/aircrack-ng.mk > > diff --git a/package/Config.in b/package/Config.in > index 8588951..c820d68 100644 > --- a/package/Config.in > +++ b/package/Config.in > @@ -612,6 +612,7 @@ source "package/sound-theme-freedesktop/Config.in" > endmenu > > menu "Networking applications" > +source "package/aircrack-ng/Config.in" > source "package/argus/Config.in" > source "package/arptables/Config.in" > source "package/avahi/Config.in" > diff --git a/package/aircrack-ng/Config.in b/package/aircrack-ng/Config.in > new file mode 100644 > index 0000000..1efa8e6 > --- /dev/null > +++ b/package/aircrack-ng/Config.in > @@ -0,0 +1,9 @@ > +config BR2_PACKAGE_AIRCRACK_NG > + bool "aircrack-ng" > + depends on BR2_LARGEFILE > + select BR2_PACKAGE_OPENSSL > + select BR2_PACKAGE_WI > + help > + A set of tools for auditing wireless networks > + > + http://www.aircrack-ng.org/ > diff --git a/package/aircrack-ng/aircrack-ng.mk b/package/aircrack-ng/aircrack-ng.mk > new file mode 100644 > index 0000000..29f638c > --- /dev/null > +++ b/package/aircrack-ng/aircrack-ng.mk > @@ -0,0 +1,34 @@ > +############################################################# > +# > +# Aircrack-ng > +# > +############################################################# > +AIRCRACK_NG_VERSION = 2245 > +AIRCRACK_NG_SITE = http://trac.aircrack-ng.org/svn/trunk > +AIRCRACK_NG_SITE_METHOD = svn > +AIRCRACK_NG_LICENSE = GPLv2 > +AIRCRACK_NG_LICENSE_FILES = LICENSE > +AIRCRACK_NG_DEPENDENCIES = openssl > + > +ifeq($(BR2_PACKAGE_SQLITE),y) > + AIRCRACK_NG_OPTS = sqlite=true > + AIRCRACK_NG_DEPENDENCIES += sqlite > +endif > + > +define AIRCRACK_NG_BUILD_CMDS > + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) $(AIRCRACK_NG_OPTS) all > +endef > + > +define AIRCRACK_NG_CLEAN_CMDS > + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) $(AIRCRACK_NG_OPTS) clean > +endef > + > +define AIRCRACK_NG_INSTALL_TARGET_CMDS > + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) $(AIRCRACK_NG_OPTS) install > +endef > + > +define AIRCRACK_NG_UNINSTALL_TARGET_CMDS > + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) $(AIRCRACK_NG_OPTS) uninstall > +endef > + > +$(eval $(generic-package))
Hi Spelling mistake : BR2_PACKAGE_IW This error was hidden by my test configuration which has this option selected I will fix this this 2013/2/8 Gustavo Zacarias <gustavo@zacarias.com.ar>: > On 02/08/2013 01:16 PM, Laurent Cans wrote: > >> + select BR2_PACKAGE_WI > > WI? > There's no such package in buildroot. > And it's not in DEPENDENCIES either... > Regards. >
On 08/02/13 16:32, Thomas Petazzoni wrote: > Dear Laurent Cans, > > Thanks, this looks pretty good; A few comments below. Yep, don't be discouraged by the large amount of feedback :-) > On Fri, 8 Feb 2013 17:16:29 +0100, Laurent Cans wrote: >> Aircrack-ng is a set of tools for auditing wireless security. >> >> Although the last version is 1.1, I choose to package last svn version due to a fixed bug which fix a failed compilation. It would be good to repeat this comment in the .mk file. That helps to see if a certain packaged upstream version is in fact more recent than what is already there. [snip] >> +ifeq($(BR2_PACKAGE_SQLITE),y) >> + AIRCRACK_NG_OPTS = sqlite=true I prefer AIRCRACK_NG_MAKE_OPTS. >> + AIRCRACK_NG_DEPENDENCIES += sqlite >> +endif I would add an else branch that explicitly sets sqlite=false, to make sure it doesn't leak in through the environment. > > The src/Makefile contains: > > ifeq ($(subst TRUE,true,$(filter TRUE true,$(sqlite) $(SQLITE))),true) > LIBSQL = -L/usr/local/lib -lsqlite3 > else > LIBSQL = > endif > > This -L/usr/local/lib isn't really nice since this is not where sqlite > will be installed, and it may cause issues when cross-compiling. The solution is simple: AIRCRACK_NG_MAKE_OPTS += LIBSQL="-lsqlite3" (no -L is needed because libsqlite3.a is in the default library search path). > >> + >> +define AIRCRACK_NG_BUILD_CMDS >> + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) $(AIRCRACK_NG_OPTS) all >> +endef > > Use $(TARGET_CONFIGURE_OPTS) : > > $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(AIRCRACK_NG_OPTS) all If it works, I prefer to put the TARGET_CONFIGURE_OPTS in the environment instead: $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(AIRCRACK_NG_MAKE_OPTS) all That gives the Makefile the possibility to append to CFLAGS and LDFLAGS, if necessary. However, some Makefiles unconditionally set CFLAGS or LDFLAGS (or even CC), in that case passing through the environment doesn't work. Regards, Arnout > And ditto for the other commands. > > Best regards, > > Thomas >
2013/2/8 Stefan Fröberg <stefan.froberg@petroprogram.com>: > Hi Laurent > > You mean 1.1 did not compile with latest buildroot ? I faced a problem with gcc4.5 referenced by the project with this issue : http://trac.aircrack-ng.org/ticket/762 > > Here's mine from 2012.05 days but ofcourse it needs fixing and cleanup .... > > ############################################################# > # > # aircrack-ng > # > ############################################################# > > AIRCRACK_NG_VERSION = 1.1 > AIRCRACK_NG_SOURCE = aircrack-ng-$(AIRCRACK_NG_VERSION).tar.gz > AIRCRACK_NG_SITE = http://download.aircrack-ng.org > AIRCRACK_NG_DEPENDENCIES = openssl sqlite > > define AIRCRACK_NG_BUILD_CMDS > $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) > CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" LD="$(TARGET_LD)" -C $(@D) > sqlite=true unstable=true strip > endef > > define AIRCRACK_NG_INSTALL_TARGET_CMDS > $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) > sqlite=true unstable=true install > endef > > $(eval $(call GENTARGETS)) > > > > 8.2.2013 18:16, Laurent Cans kirjoitti: >> Aircrack-ng is a set of tools for auditing wireless security. >> >> Although the last version is 1.1, I choose to package last svn version due to a fixed bug which fix a failed compilation. >> >> Signed-off-by: Laurent Cans <laurent.cans@gmail.com> >> --- >> package/Config.in | 1 + >> package/aircrack-ng/Config.in | 9 +++++++++ >> package/aircrack-ng/aircrack-ng.mk | 34 ++++++++++++++++++++++++++++++++++ >> 3 files changed, 44 insertions(+) >> create mode 100644 package/aircrack-ng/Config.in >> create mode 100644 package/aircrack-ng/aircrack-ng.mk >> >> diff --git a/package/Config.in b/package/Config.in >> index 8588951..c820d68 100644 >> --- a/package/Config.in >> +++ b/package/Config.in >> @@ -612,6 +612,7 @@ source "package/sound-theme-freedesktop/Config.in" >> endmenu >> >> menu "Networking applications" >> +source "package/aircrack-ng/Config.in" >> source "package/argus/Config.in" >> source "package/arptables/Config.in" >> source "package/avahi/Config.in" >> diff --git a/package/aircrack-ng/Config.in b/package/aircrack-ng/Config.in >> new file mode 100644 >> index 0000000..1efa8e6 >> --- /dev/null >> +++ b/package/aircrack-ng/Config.in >> @@ -0,0 +1,9 @@ >> +config BR2_PACKAGE_AIRCRACK_NG >> + bool "aircrack-ng" >> + depends on BR2_LARGEFILE >> + select BR2_PACKAGE_OPENSSL >> + select BR2_PACKAGE_WI >> + help >> + A set of tools for auditing wireless networks >> + >> + http://www.aircrack-ng.org/ >> diff --git a/package/aircrack-ng/aircrack-ng.mk b/package/aircrack-ng/aircrack-ng.mk >> new file mode 100644 >> index 0000000..29f638c >> --- /dev/null >> +++ b/package/aircrack-ng/aircrack-ng.mk >> @@ -0,0 +1,34 @@ >> +############################################################# >> +# >> +# Aircrack-ng >> +# >> +############################################################# >> +AIRCRACK_NG_VERSION = 2245 >> +AIRCRACK_NG_SITE = http://trac.aircrack-ng.org/svn/trunk >> +AIRCRACK_NG_SITE_METHOD = svn >> +AIRCRACK_NG_LICENSE = GPLv2 >> +AIRCRACK_NG_LICENSE_FILES = LICENSE >> +AIRCRACK_NG_DEPENDENCIES = openssl >> + >> +ifeq($(BR2_PACKAGE_SQLITE),y) >> + AIRCRACK_NG_OPTS = sqlite=true >> + AIRCRACK_NG_DEPENDENCIES += sqlite >> +endif >> + >> +define AIRCRACK_NG_BUILD_CMDS >> + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) $(AIRCRACK_NG_OPTS) all >> +endef >> + >> +define AIRCRACK_NG_CLEAN_CMDS >> + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) $(AIRCRACK_NG_OPTS) clean >> +endef >> + >> +define AIRCRACK_NG_INSTALL_TARGET_CMDS >> + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) $(AIRCRACK_NG_OPTS) install >> +endef >> + >> +define AIRCRACK_NG_UNINSTALL_TARGET_CMDS >> + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) $(AIRCRACK_NG_OPTS) uninstall >> +endef >> + >> +$(eval $(generic-package)) >
Hi Laurent 9.2.2013 0:38, Laurent CANS kirjoitti: > 2013/2/8 Stefan Fröberg <stefan.froberg@petroprogram.com>: >> Hi Laurent >> >> You mean 1.1 did not compile with latest buildroot ? > I faced a problem with gcc4.5 referenced by the project with this issue : > > http://trac.aircrack-ng.org/ticket/762 Hmmm... I could swear that I was using 4.5 when compiling that 1.1 version ages ago. But i tried compiling it with only 32-bit x86 target. Regards Stefan
9.2.2013 13:36, Stefan Fröberg kirjoitti: > Hi Laurent > > 9.2.2013 0:38, Laurent CANS kirjoitti: >> 2013/2/8 Stefan Fröberg <stefan.froberg@petroprogram.com>: >>> Hi Laurent >>> >>> You mean 1.1 did not compile with latest buildroot ? >> I faced a problem with gcc4.5 referenced by the project with this issue : >> >> http://trac.aircrack-ng.org/ticket/762 Ah, but now I see it. That -Werror thing. I always define -Wno-error in my buildroot CFLAGS because I hate it when people think that their code is perfect (it newer is, and neither is my code) and stop compiling because warnings. That's why my compilationg with 4.5 succeeded. So lil patch to makefile to get rid of that Werror thing should be good to get it compiled with any gcc. Regards Stefan > Hmmm... I could swear that I was using 4.5 when compiling that 1.1 > version ages ago. But i tried compiling > it with only 32-bit x86 target. > > Regards > Stefan > > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot
Dear Stefan Fröberg, On Sat, 09 Feb 2013 13:45:39 +0200, Stefan Fröberg wrote: > Ah, but now I see it. > That -Werror thing. > I always define -Wno-error in my buildroot CFLAGS because > I hate it when people think that their code is perfect (it newer is, > and neither is my code) and > stop compiling because warnings. > That's why my compilationg with 4.5 succeeded. Indeed, if the reason the compilation fails is because of -Werror, then remove -Werror from the compilation flags, and use the stable 1.1 release rather than the SVN version. Best regards, Thomas
Hi Thomas 9.2.2013 14:01, Thomas Petazzoni kirjoitti: > Dear Stefan Fröberg, > > On Sat, 09 Feb 2013 13:45:39 +0200, Stefan Fröberg wrote: > >> Ah, but now I see it. >> That -Werror thing. >> I always define -Wno-error in my buildroot CFLAGS because >> I hate it when people think that their code is perfect (it newer is, >> and neither is my code) and >> stop compiling because warnings. >> That's why my compilationg with 4.5 succeeded. > Indeed, if the reason the compilation fails is because of -Werror, then > remove -Werror from the compilation flags, and use the stable 1.1 > release rather than the SVN version. > > Best regards, > > Thomas I Agree. It's always good to take the latest stable version (if there is any) as starting point and included in buildroot. And after that is kosher, then maybe go for the latest and greatest bleeding edge version. Regards Stefan
Arnout, Thomas, I tried to use $(TARGET_CONFIGURE_OPTS) passed by variable or by environment but the 2 methods fails. What is the correct methode to handle this? - Correct package makefiles - Don't use $(TARGET_CONFIGURE_OPTS) but CC and LD fixed by variable - Another solution Best regards, Laurent 2013/2/8 Arnout Vandecappelle <arnout@mind.be>: > On 08/02/13 16:32, Thomas Petazzoni wrote: >> >> Dear Laurent Cans, >> >> Thanks, this looks pretty good; A few comments below. > > > Yep, don't be discouraged by the large amount of feedback :-) > > >> On Fri, 8 Feb 2013 17:16:29 +0100, Laurent Cans wrote: >>> >>> Aircrack-ng is a set of tools for auditing wireless security. >>> >>> Although the last version is 1.1, I choose to package last svn version >>> due to a fixed bug which fix a failed compilation. > > > It would be good to repeat this comment in the .mk file. That helps to see > if a certain packaged upstream version is in fact more recent than what is > already there. > > [snip] > >>> +ifeq($(BR2_PACKAGE_SQLITE),y) >>> + AIRCRACK_NG_OPTS = sqlite=true > > > I prefer AIRCRACK_NG_MAKE_OPTS. > > >>> + AIRCRACK_NG_DEPENDENCIES += sqlite >>> +endif > > > I would add an else branch that explicitly sets sqlite=false, to make sure > it doesn't leak in through the environment. > > >> >> The src/Makefile contains: >> >> ifeq ($(subst TRUE,true,$(filter TRUE true,$(sqlite) $(SQLITE))),true) >> LIBSQL = -L/usr/local/lib -lsqlite3 >> else >> LIBSQL = >> endif >> >> This -L/usr/local/lib isn't really nice since this is not where sqlite >> will be installed, and it may cause issues when cross-compiling. > > > The solution is simple: > > AIRCRACK_NG_MAKE_OPTS += LIBSQL="-lsqlite3" > > (no -L is needed because libsqlite3.a is in the default library search > path). > > >> >>> + >>> +define AIRCRACK_NG_BUILD_CMDS >>> + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) >>> $(AIRCRACK_NG_OPTS) all >>> +endef >> >> >> Use $(TARGET_CONFIGURE_OPTS) : >> >> $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(AIRCRACK_NG_OPTS) all > > > If it works, I prefer to put the TARGET_CONFIGURE_OPTS in the environment > instead: > > $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(AIRCRACK_NG_MAKE_OPTS) all > > That gives the Makefile the possibility to append to CFLAGS and LDFLAGS, if > necessary. However, some Makefiles unconditionally set CFLAGS or LDFLAGS (or > even CC), in that case passing through the environment doesn't work. > > > Regards, > Arnout > > > >> And ditto for the other commands. >> >> Best regards, >> >> Thomas >> > > > -- > Arnout Vandecappelle arnout at mind be > Senior Embedded Software Architect +32-16-286500 > Essensium/Mind http://www.mind.be > G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven > LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle > GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
On 10/02/13 16:08, Laurent CANS wrote: > Arnout, Thomas, > > I tried to use $(TARGET_CONFIGURE_OPTS) passed by variable or by > environment but the 2 methods fails. > > What is the correct methode to handle this? > - Correct package makefiles > - Don't use $(TARGET_CONFIGURE_OPTS) but CC and LD fixed by variable > - Another solution > > Best regards, > > Laurent Laurent, First of all, please don't top-post, but cut down the quoted message to the relevant parts and reply under them, like below. > > 2013/2/8 Arnout Vandecappelle <arnout@mind.be>: >> On 08/02/13 16:32, Thomas Petazzoni wrote: >>> On Fri, 8 Feb 2013 17:16:29 +0100, Laurent Cans wrote: [snip] >>>> + >>>> +define AIRCRACK_NG_BUILD_CMDS >>>> + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) >>>> $(AIRCRACK_NG_OPTS) all >>>> +endef >>> >>> >>> Use $(TARGET_CONFIGURE_OPTS) : >>> >>> $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(AIRCRACK_NG_OPTS) all >> >> >> If it works, I prefer to put the TARGET_CONFIGURE_OPTS in the environment >> instead: >> >> $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(AIRCRACK_NG_MAKE_OPTS) all >> >> That gives the Makefile the possibility to append to CFLAGS and LDFLAGS, if >> necessary. However, some Makefiles unconditionally set CFLAGS or LDFLAGS (or >> even CC), in that case passing through the environment doesn't work. If setting $(TARGET_CONFIGURE_OPTS) in the environment doesn't work, then you can try setting it on the command line instead. If that doesn't work either, it indicates that something funny is done in the Makefile and it's important to find out what exactly. Probably it's a matter of CFLAGS or LDFLAGS that need to be set, but are now overridden from the command line. In that case, the best option is to fix the Makefile (and upstream the fix). A less preferred option is something like: $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ CC="$(TARGET_CC)" LD="$(TARGET_LD)" $(AIRCRACK_NG_MAKE_OPTS) all i.e. use the command line to force CC and LD and pass the things that the Makefile needs to have control over (CFLAGS and LDFLAGS) through the environment. Regards, Arnout
diff --git a/package/Config.in b/package/Config.in index 8588951..c820d68 100644 --- a/package/Config.in +++ b/package/Config.in @@ -612,6 +612,7 @@ source "package/sound-theme-freedesktop/Config.in" endmenu menu "Networking applications" +source "package/aircrack-ng/Config.in" source "package/argus/Config.in" source "package/arptables/Config.in" source "package/avahi/Config.in" diff --git a/package/aircrack-ng/Config.in b/package/aircrack-ng/Config.in new file mode 100644 index 0000000..1efa8e6 --- /dev/null +++ b/package/aircrack-ng/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_AIRCRACK_NG + bool "aircrack-ng" + depends on BR2_LARGEFILE + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_WI + help + A set of tools for auditing wireless networks + + http://www.aircrack-ng.org/ diff --git a/package/aircrack-ng/aircrack-ng.mk b/package/aircrack-ng/aircrack-ng.mk new file mode 100644 index 0000000..29f638c --- /dev/null +++ b/package/aircrack-ng/aircrack-ng.mk @@ -0,0 +1,34 @@ +############################################################# +# +# Aircrack-ng +# +############################################################# +AIRCRACK_NG_VERSION = 2245 +AIRCRACK_NG_SITE = http://trac.aircrack-ng.org/svn/trunk +AIRCRACK_NG_SITE_METHOD = svn +AIRCRACK_NG_LICENSE = GPLv2 +AIRCRACK_NG_LICENSE_FILES = LICENSE +AIRCRACK_NG_DEPENDENCIES = openssl + +ifeq($(BR2_PACKAGE_SQLITE),y) + AIRCRACK_NG_OPTS = sqlite=true + AIRCRACK_NG_DEPENDENCIES += sqlite +endif + +define AIRCRACK_NG_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) $(AIRCRACK_NG_OPTS) all +endef + +define AIRCRACK_NG_CLEAN_CMDS + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) $(AIRCRACK_NG_OPTS) clean +endef + +define AIRCRACK_NG_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) $(AIRCRACK_NG_OPTS) install +endef + +define AIRCRACK_NG_UNINSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) $(AIRCRACK_NG_OPTS) uninstall +endef + +$(eval $(generic-package))
Aircrack-ng is a set of tools for auditing wireless security. Although the last version is 1.1, I choose to package last svn version due to a fixed bug which fix a failed compilation. Signed-off-by: Laurent Cans <laurent.cans@gmail.com> --- package/Config.in | 1 + package/aircrack-ng/Config.in | 9 +++++++++ package/aircrack-ng/aircrack-ng.mk | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 package/aircrack-ng/Config.in create mode 100644 package/aircrack-ng/aircrack-ng.mk