[oe] Looking for some help on making a recipe -- newbie needing help

Frans Meulenbroeks fransmeulenbroeks at gmail.com
Tue Jul 20 21:09:40 UTC 2010


2010/7/20 J. L. <vwyodapink at gmail.com>

> First sorry for the basic questions here,
> I am in the process of trying to figure out how to make my own recipe
> for a new version of a program than what exists. I am trying to write
> a recipe for aircrack-ng 1.1, Where I am now is its failing unable to
> find some files. I think this is because i am missing something in my
> recipe. I tried looking at the previous versions and patch files but I
> do not understand how to put whats in the patch file into my new
> recipe so it would build in a similar manner. Is there a way I can
> take what they patched to the original recipe and incorporate it into
> my recipe? Or is there an easy way to read whats in the patch file and
> incorporate it into a new recipe? I have posted both the recipe I
> wrote and the patch from the original recipe. I am not looking to get
> spoon fed but I am at a total loss here and would really like to get a
> grasp on this as there a bunch of existing recipes that I would like
> to update to more current versions, and I am sure once I get through
> one or two of making my own I will get it better. I have read the OE
> manual and also the examples from gumstix. I am running my OE on the
> overo branch if that makes any difference. Thanks for your time and
> any help you can share with me. Hope to be more useful to the cause
> soon. Lastly if any of this didn't make sense let me know so I can try
> and clarify it better for everyone.
>

Basically you can always try to see if the patch applies properly.
If not you need to verify if the patch does not apply because it is already
merged upstream and not needed any more.
If the code hasn't changed much you could create your own patch.
I like to use quilt for that but you can also copy the file to (in your
case) Makefile.sav (or copy the whole tree) then make the change manually
then make a diff (in the top level dir otherwise the patch will not apply).
make sure to use the proper diff options (-urN springs to mind).
The add the patch to the dir for the recipe and add a reference to it in the
recipe.

Btw you might also visit #oe on freenode for advise.

>
> my aircrack-ng recipe:
> DESCRIPTION = "Aircrack-ng is a set of tools for wep key statistical
> cracking"
> HOMEPAGE = "http://www.aircrack-ng.org/"
> SECTION = "console/network"
> LICENSE = "GPLv2"
> DEPENDS = "openssl zlib sqlite3"
> PR = "r0"
> PN = "aircrack-ngtest"
>
> SRC_URI = "http://download.aircrack-ng.org/aircrack-ng-1.1.tar.gz"
>
you can use things like ${PV} in file specifications. See the 0.9.3 recipe.

>
> S = "${WORKDIR}"
>
I don't think this is needed. suggest to try without

> OETMP = ${OVEROTOP}/tmp
>

This OETMP is something that definitely does not belong in a recipe. You do
not even use it.

>
> SBINFILES = "airodump-ng aireplay-ng airmon-ng airtun-ng"
> BINFILES = "aircrack-ng airdecap-ng packetforge-ng ivstools kstats makeivs"
>
> do_install() {
>        install -d ${D}/${sbindir}
>        for i in ${SBINFILES}; do
>                install -m 0755 $i ${D}/${sbindir}
>        done
>
>        install -d ${D}/${bindir}
>        for i in ${BINFILES}; do
>                install -m 0755 $i ${D}/${bindir}
>        done
> }
>
And not sure if the install is needed; please give it a try without it.

Good luck! Frans

>
>
> SRC_URI[md5sum] = "f7a24ed8fad122c4187d06bfd6f998b4"
> SRC_URI[sha256sum] =
> "b136b549b7d2a2751c21793100075ea43b28de9af4c1969508bb95bcc92224ad"
>
>
>
> Here is the patch from the original .9.3  aircrack-ng recipe:
> diff -urN aircrack-ng-0.9.3.orig/Makefile aircrack-ng-0.9.3/Makefile
> --- aircrack-ng-0.9.3.orig/Makefile     2008-02-24 20:22:35.000000000 +0100
> +++ aircrack-ng-0.9.3/Makefile  2009-04-09 07:53:12.000000000 +0200
> @@ -3,7 +3,7 @@
>
>  CC              = gcc
>  CFLAGS          ?= -g -W -Wall -O3
> -OPTFLAGS        = -D_FILE_OFFSET_BITS=64
> +OPTFLAGS        = -D_FILE_OFFSET_BITS=64 $(LDFLAGS)
>
>  iCC             = /opt/intel/cc/9.0/bin/icc
>  iCFLAGS         = -w -mcpu=pentiumpro -march=pentiumpro
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



More information about the Openembedded-devel mailing list