1*4882a593SmuzhiyunDESCRIPTION = "Utilities for testing Power Management" 2*4882a593SmuzhiyunHOMEPAGE = "https://wiki.linaro.org/WorkingGroups/PowerManagement/Resources/TestSuite/PmQa" 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunLICENSE = "GPL-2.0-only" 5*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunPV = "0.5.2" 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunBRANCH ?= "master" 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunSRCREV = "05710ec5032be4c8edafb4109d4d908d31243906" 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunSRC_URI = "git://git.linaro.org/power/pm-qa.git;protocol=git;branch=${BRANCH}" 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunS = "${WORKDIR}/git" 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunCFLAGS += "-pthread" 18*4882a593Smuzhiyun 19*4882a593Smuzhiyundo_compile () { 20*4882a593Smuzhiyun # Find all the .c files in this project and build them. 21*4882a593Smuzhiyun for x in `find . -name "*.c"` 22*4882a593Smuzhiyun do 23*4882a593Smuzhiyun util=`echo ${x} | sed s/.c$//` 24*4882a593Smuzhiyun oe_runmake ${util} 25*4882a593Smuzhiyun done 26*4882a593Smuzhiyun} 27*4882a593Smuzhiyun 28*4882a593Smuzhiyundo_install () { 29*4882a593Smuzhiyun install -d ${D}${bindir} 30*4882a593Smuzhiyun install -d ${D}${libdir}/${BPN} 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun # Install the compiled binaries that were built in the previous step 33*4882a593Smuzhiyun for x in `find . -name "*.c"` 34*4882a593Smuzhiyun do 35*4882a593Smuzhiyun util=`echo ${x} | sed s/.c$//` 36*4882a593Smuzhiyun util_basename=`basename ${util}` 37*4882a593Smuzhiyun install -m 0755 ${util} ${D}${bindir}/${util_basename} 38*4882a593Smuzhiyun done 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun # Install the helper scripts in a subdirectory of $libdir 41*4882a593Smuzhiyun for script in `find . -name "*.sh" | grep include` 42*4882a593Smuzhiyun do 43*4882a593Smuzhiyun # Remove hardcoded relative paths 44*4882a593Smuzhiyun sed -i -e 's#..\/utils\/##' ${script} 45*4882a593Smuzhiyun sed -i -e 's#. ..\/Switches#${bindir}#g' ${script} 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun script_basename=`basename ${script}` 48*4882a593Smuzhiyun install -m 0755 $script ${D}${libdir}/${BPN}/${script_basename} 49*4882a593Smuzhiyun done 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun # Install the shell scripts NOT in the $libdir directory since those 52*4882a593Smuzhiyun # will be installed elsewhere 53*4882a593Smuzhiyun for script in `find . -name "*.sh" | grep -v include` 54*4882a593Smuzhiyun do 55*4882a593Smuzhiyun # if the script includes any helper scripts from the $libdir 56*4882a593Smuzhiyun # directory then change the source path to the absolute path 57*4882a593Smuzhiyun # to reflect the install location of the helper scripts. 58*4882a593Smuzhiyun sed -i -e "s#. ../include#. ${libdir}/${BPN}#g" ${script} 59*4882a593Smuzhiyun # Remove hardcoded relative paths 60*4882a593Smuzhiyun sed -i -e 's#..\/utils\/##' ${script} 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun script_basename=`basename ${script}` 63*4882a593Smuzhiyun install -m 0755 $script ${D}${bindir}/${script_basename} 64*4882a593Smuzhiyun done 65*4882a593Smuzhiyun} 66*4882a593SmuzhiyunRDEPENDS:${PN} +="bash" 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun# http://errors.yoctoproject.org/Errors/Details/186956/ 69*4882a593SmuzhiyunCOMPATIBLE_HOST:libc-musl = 'null' 70