Hej

Finally we made it - Thanks to you all for helping me! I attached my bb file for that case someone is searching for a bitbake recipe for building the libhiredis

##############
SUMMARY = "libhiredis"
SECTION = "lib"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=d84d659a35c666d23233e54503aaea51"

# 0.13.3
# SRCREV = "010756025e8cefd1bc66c6d4ed3b1648ef6f1f95"
SRC_URI = "git://github.com/redis/hiredis.git;rev=v0.13.3"

S = "${WORKDIR}/git/"

# error handleing
# @PREFIX: set the path from /usr/local to /usr/
# @INSTALL: set the copy instruction from "cp -a" to "cp -r"
EXTRA_OEMAKE = "'PREFIX=${prefix}' 'INSTALL=''cp -r'''"

do_compile() {
        oe_runmake all 'CC=${CC}'
}

do_install() {
        oe_runmake install 'DESTDIR=${D}'
}
##############

regards

Stefan Jaritz
Entwickler

------------------------------------------------------------
ESA Elektroschaltanlagen Grimma GmbH
Broner Ring 30
04668 Grimma
Telefon: +49 3437 9211 176
Telefax: +49 3437 9211 26
E-Mail: s.jaritz@esa-grimma.de
Internet:
www.esa-grimma.de


Geschäftsführer:
Dipl.-Ing. Jörg Gaitzsch
Jörg Reinker

Sitz der Gesellschaft: Grimma
Ust.-ID: DE 141784437
Amtsgericht: Leipzig, HRB 5159
Steuernummer: 238/108/00755


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten
haben, informieren Sie bitte sofort den Absender und löschen Sie diese
Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail
ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please
notify the sender immediately and destroy this e-mail. Any unauthorized
copying, disclosure or distribution of the material in this e-mail is strictly
forbidden.




Von:        "Burton, Ross" <ross.burton@intel.com>
An:        S.Jaritz@esa-grimma.de
Kopie:        "yocto@yoctoproject.org" <yocto@yoctoproject.org>, YUKATHARSANI JEYACHANDRA <yukatharsanij@tataelxsi.co.in>
Datum:        29.04.2016 10:59
Betreff:        Re: Re: [yocto] Antwort: Re: how to configure the build packages of a makefile based libary




Hi Stefan,

So close :)  Some more points:

On 29 April 2016 at 08:54, <S.Jaritz@esa-grimma.de> wrote:
> LICENSE = "COPYING"

This should be the name of the license itself, not the filename.  Looks a bit like MIT to me.
 
> LIC_FILES_CHKSUM = "
file://${WORKDIR}/git/COPYING;md5=d84d659a35c666d23233e54503aaea51"

This URI is relative to ${S} so you can just do file://COPYING;md5=....
 
> EXTRA_OEMAKE = "'PREFIX=/usr/'" 

Use PREFIX=${prefix} to respect the what the distro has configured.  Annoyingly you can't override the other paths such a libdir easily, so this will break in multilib configurations or if I recall correctly, on aarch64.

The commandline outputs:
#############

NOTE: Executing RunQueue Tasks

WARNING: QA Issue: libhiredis: /libhiredis-staticdev/usr/lib/libhiredis.a is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]

WARNING: QA Issue: libhiredis: /libhiredis/usr/lib/libhiredis.so.0.13 is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]

WARNING: QA Issue: libhiredis: /libhiredis-dev/usr/lib/pkgconfig/hiredis.pc is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]

############# 
 

The upstream Makefile is using "cp -a" which preserves ownership, so as you built the package the files are owned by you.  Luckily you can override this by passing "INSTALL='cp -r' to the make install (they use cp to recursively copy directories, so you need to pass -r instead).

I've a recipe locally with these changes and it builds without warnings and is packaged correctly.

This is what happens when maintainers think autotools is too complicated and a bare makefile is just fine: they do it wrong. :)

Ross