Add libpnd to the packages.
[openpandora.oe.git] / recipes / pandora-system / pandora-libpnd.bb
1 DESCRIPTION = "Support for the PND format in Pandora images (lib, daemon, init script etc.)"
2 LICENSE = "lGPL"
3
4 PR = "r1.7"
5
6 PARALLEL_MAKE = ""
7
8 SRC_URI = " \
9           git://openpandora.org/pandora-libraries.git;protocol=git;branch=master \
10           file://rc.libpnd \
11 "
12
13 SRCREV = "b2d3c0871614632279192ef86e5affd75312f01b"
14
15 S = "${WORKDIR}/git"
16
17 inherit update-rc.d
18
19 TARGET_CC_ARCH += "${LDFLAGS}"
20 TARGET_CFLAGS += "-Wall -I./include"
21
22 INITSCRIPT_NAME = "libpnd-init"
23 INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ."
24
25 do_compile_prepend() {
26           cd ${S}/
27 }
28
29 #EXTRA_OEMAKE = "all"
30
31 do_compile() {
32           oe_runmake 
33           oe_runmake deploy
34 }
35
36 do_install() {
37           install -d ${D}${sysconfdir}/pandora/conf/
38           install ${S}/deployment/etc/pandora/conf/apps ${D}${sysconfdir}/pandora/conf/apps
39           install ${S}/deployment/etc/pandora/conf/desktop ${D}${sysconfdir}/pandora/conf/desktop
40
41           install -d ${D}${libdir}/
42           cp -pP ${S}/deployment/usr/lib/libpnd.so.1.0.1 ${D}${libdir}/libpnd.so.1.0.1
43           cp -pP ${S}/deployment/usr/lib/libpnd.a ${D}${libdir}/libpnd.a
44           
45           install -d ${D}${bindir}/
46           cp -pP ${S}/deployment/usr/bin/pndnotifyd ${D}${bindir}/pndnotifyd
47                    
48           install -d ${D}${prefix}/pandora/
49           install -d ${D}${prefix}/pandora/apps/
50           cp -pP ${S}/deployment/usr/pandora/apps/.* ${D}${prefix}/pandora/apps/
51           install -d ${D}${prefix}/pandora/scripts/
52           cp -pP ${S}/deployment/usr/pandora/scripts/*.* ${D}${prefix}/pandora/scripts/
53           
54           install -d ${D}${sysconfdir}/init.d/
55           cp -pP ${WORKDIR}/rc.libpnd ${D}${sysconfdir}/init.d/libpnd-init
56 }
57
58 pkg_postinst() {
59 #!/bin/sh
60 ln -sf /usr/lib/libpnd.so.1.0.1 /usr/lib/libpnd.so.1 
61 }
62
63 FILES_${PN} += "${bindir} ${sbindir}"