c6541d0a651e23dd51a910373b63185f36f6feba
[openpandora.oe.git] / recipes / c64_tools / c64-tools.bb
1 DESCRIPTION = "Tools and libraries to support the C64+ DSP found in TI's OMAP3 hardware."
2 HOMEPAGE="http://tkscript.de/c64_tools/"
3 LICENSE = "LGPL GPL"
4
5 PV_TAR = "02Nov2013_dist"
6 PV = "20131102"
7 PR = "r0"
8
9 SRC_URI = " \
10   http://tkscript.de/c64_tools/c64_tools-${PV_TAR}.tar.gz \
11   file://c64_tools.rules \
12   file://op_dsp_c64.sh \
13   file://99_c64_tools \
14 "
15
16 S = "${WORKDIR}/c64_tools"
17
18 TARGET_CFLAGS += "-Wall -I../include "
19 PARALLEL_MAKE = ""
20
21
22 do_compile() {
23   cd ${S}/libc64/
24   # TARGET_SHARED=libc64.so.1
25   oe_runmake -f makefile.linux clean bin
26   ln -fs libc64.so.1 libc64.so
27   cd ${S}/c64_load/
28   touch libc64 # :(
29   oe_runmake -f makefile.linux clean bin
30 }
31
32 do_install() {
33   install -d ${D}${libdir}/
34   install -m 0755 ${S}/libc64/libc64.so.1 ${D}${libdir}/
35   install -d ${D}${sbindir}
36   install -m 0755 ${S}/c64_load/c64_load ${D}${sbindir}/
37
38   # dsp images
39   install -d ${D}${base_libdir}/dsp
40   install -m 0644 ${S}/dsp/core/core.out ${D}${base_libdir}/dsp/
41
42   # script, udev rule, sudoers
43   install -d ${D}${prefix}/pandora/scripts/
44   #install -m 0755 ${S}/scripts/go64.sh ${D}${prefix}/pandora/scripts/op_dsp_c64.sh
45   install -m 0755 ${WORKDIR}/op_dsp_c64.sh ${D}${prefix}/pandora/scripts/
46   install -d ${D}${base_libdir}/udev/rules.d/
47   install -m 0644 ${WORKDIR}/c64_tools.rules ${D}${base_libdir}/udev/rules.d/
48   install -d ${D}${sysconfdir}/sudoers.d/
49   install -m 440 ${WORKDIR}/99_c64_tools ${D}${sysconfdir}/sudoers.d/
50
51   # -dev stuff
52   install -d ${D}${includedir}/c64_tools/include
53   install -d ${D}${includedir}/c64_tools/dsp/libc64_dsp/include
54   install -m 0644 ${S}/include/*.h ${D}${includedir}/c64_tools/include
55   install -m 0644 dsp/libc64_dsp/include/com.h ${D}${includedir}/c64_tools/dsp/libc64_dsp/include/com.h
56   install -m 0644 ${S}/libc64/libc64.a ${D}${libdir}/
57   cp -a ${S}/libc64/libc64.so ${D}${libdir}/
58 }
59
60 FILES_${PN} += " \
61   ${base_libdir}/dsp ${prefix}/pandora/scripts \
62   ${base_libdir}/udev/rules.d ${sysconfdir}/sudoers.d/ \
63 "
64
65 PACKAGE_ARCH = "${MACHINE_ARCH}"
66 COMPATIBLE_MACHINE = "omap3-pandora"
67
68 SRC_URI[md5sum] = "cc0004af013ff880e8d21608ae2b8f27"
69 SRC_URI[sha256sum] = "05e1fd3b9b81c476b542bf605ec3d6e54dfc515f6a20ee131e107d9029280721"