Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[vuplus_openembedded] / packages / dsplink / ti-codec-combos_3.16.bb
1 DESCRIPTION = "Codec combos for omap3530"
2 DEPENDS = "ti-codec-engine"
3 LICENCE = "unknown"
4
5 require ti-paths.inc
6
7 SRC_URI = "http://software-dl.ti.com/sdo/sdo_apps_public_sw/omap3530_dvsdk_combos_tspa/omap3530_dvsdk_combos_tspa-3_16-Linux-x86.bin \
8     "
9
10 S = "${WORKDIR}/omap3530_dvsdk_combos_3_16"
11
12 # Yes, the xdc stuff still breaks with a '.' in PWD
13 PV = "316"
14 PR = "r12"
15
16 TARGET = "all"
17
18 export CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/packages;${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools"
19
20 # Needed for now since makefile in latest package assumes this is set
21 export CODEC_INSTALL_DIR="${S}"
22
23 # Helper function to run the binary installer and unpack the tar.gz in the same place as it was before - this could be optimised later
24 do_accept_license() {
25         export HOME="${WORKDIR}"
26         chmod +x ${WORKDIR}/omap3530_dvsdk_combos_tspa-3_16-Linux-x86.bin
27         ${WORKDIR}/omap3530_dvsdk_combos_tspa-3_16-Linux-x86.bin --mode silent --prefix ${S}_install
28         cd "${S}_install"
29         tar -xzvf omap3530_dvsdk_combos_tspa_3_16.tar.gz
30         if [ -d ${S} ] ; then 
31             rm -rf ${S}
32         fi
33         mv omap3530_dvsdk_combos_tspa_3_16 ${S}
34 }
35
36 addtask accept_license after do_unpack before do_configure
37
38 do_compile() {
39
40         # For now, remove the reference to Rules.make and swap prod for eval, since this only has eval libs included
41         sed -i \
42         -e '/Rules.make/d' \
43         -e s:prod:eval:g \
44         ${S}/Makefile
45
46         # Fix-up config.bld to swap out hardcoded references to tools paths
47         sed -i -e s:/opt/dmsw/cg6x_6_0_16:${TITOOLSDIR}/${TICGTOOLSDIR}:g \
48         ${S}/config.bld
49
50         oe_runmake clean
51         oe_runmake
52 }
53
54 do_install () {
55         echo oe_runmake install
56
57         install -d ${D}/${datadir}/ti-codec-combos
58
59         cd ${S}
60
61         # grab the server executables
62         for i in $(find . -name "*.x64P") ; do
63                 install ${i} ${D}/${datadir}/ti-codec-combos
64         done
65         
66         # copy the generated data sheets as well for reference
67         for i in $(find . -name "*.DataSheet.*") ; do
68                 install ${i} ${D}/${datadir}/ti-codec-combos
69         done
70 }
71
72 do_stage () {
73         install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combos
74         cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combos
75 }
76
77 FILES_ti-codec-combos = "${datadir}/ti-codec-combos/*"
78
79 INHIBIT_PACKAGE_STRIP = "1"
80
81 PACKAGE_ARCH = "${MACHINE_ARCH}"
82