Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | DESCRIPTION = "Utilities for testing Power Management" |
| 2 | HOMEPAGE = "https://wiki.linaro.org/WorkingGroups/PowerManagement/Resources/TestSuite/PmQa" |
| 3 | |
| 4 | LICENSE = "GPLv2" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 6 | |
| 7 | PV = "0.4.14" |
| 8 | |
| 9 | BRANCH ?= "master" |
| 10 | |
| 11 | # Corresponds to tag pm-qa-v0.4.14 |
| 12 | SRCREV = "9111d1930f02337394cf16e84ad2a27f33607cbb" |
| 13 | |
| 14 | SRC_URI = "git://git.linaro.org/power/pm-qa.git;protocol=git;branch=${BRANCH}" |
| 15 | |
| 16 | S = "${WORKDIR}/git" |
| 17 | |
| 18 | CFLAGS += "-pthread" |
| 19 | |
| 20 | do_compile () { |
| 21 | # Find all the .c files in this project and build them. |
| 22 | for x in `find . -name "*.c"` |
| 23 | do |
| 24 | util=`echo ${x} | sed s/.c$//` |
| 25 | oe_runmake ${util} |
| 26 | done |
| 27 | } |
| 28 | |
| 29 | do_install () { |
| 30 | install -d ${D}${bindir} |
| 31 | install -d ${D}${libdir}/${BPN} |
| 32 | |
| 33 | # Install the compiled binaries that were built in the previous step |
| 34 | for x in `find . -name "*.c"` |
| 35 | do |
| 36 | util=`echo ${x} | sed s/.c$//` |
| 37 | util_basename=`basename ${util}` |
| 38 | install -m 0755 ${util} ${D}${bindir}/${util_basename} |
| 39 | done |
| 40 | |
| 41 | # Install the helper scripts in a subdirectory of $libdir |
| 42 | for script in `find . -name "*.sh" | grep include` |
| 43 | do |
| 44 | # Remove hardcoded relative paths |
| 45 | sed -i -e 's#..\/utils\/##' ${script} |
| 46 | |
| 47 | script_basename=`basename ${script}` |
| 48 | install -m 0755 $script ${D}${libdir}/${BPN}/${script_basename} |
| 49 | done |
| 50 | |
| 51 | # Install the shell scripts NOT in the $libdir directory since those |
| 52 | # will be installed elsewhere |
| 53 | for script in `find . -name "*.sh" | grep -v include` |
| 54 | do |
| 55 | # if the script includes any helper scripts from the $libdir |
| 56 | # directory then change the source path to the absolute path |
| 57 | # to reflect the install location of the helper scripts. |
| 58 | sed -i -e "s#source ../include#source ${libdir}/${BPN}#g" ${script} |
| 59 | # Remove hardcoded relative paths |
| 60 | sed -i -e 's#..\/utils\/##' ${script} |
| 61 | |
| 62 | script_basename=`basename ${script}` |
| 63 | install -m 0755 $script ${D}${bindir}/${script_basename} |
| 64 | done |
| 65 | } |
| 66 | RDEPENDS_${PN} +="bash" |