From: David-John Willis Date: Tue, 19 May 2009 15:31:06 +0000 (+0100) Subject: Add libpnd to the packages. X-Git-Tag: Release-2010-05/1~199 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c21c04b0f33cf617f4910fe5b102d84db0d6bb28;p=openpandora.oe.git Add libpnd to the packages. --- diff --git a/recipes/pandora-system/pandora-libpnd.bb b/recipes/pandora-system/pandora-libpnd.bb index 50a13c8..ef0976d 100755 --- a/recipes/pandora-system/pandora-libpnd.bb +++ b/recipes/pandora-system/pandora-libpnd.bb @@ -1,29 +1,63 @@ DESCRIPTION = "Support for the PND format in Pandora images (lib, daemon, init script etc.)" LICENSE = "lGPL" -PR = "r1" +PR = "r1.7" + +PARALLEL_MAKE = "" SRC_URI = " \ git://openpandora.org/pandora-libraries.git;protocol=git;branch=master \ + file://rc.libpnd \ " -SRCREV = "886aeeeba3b074ebb92be3d9ac1d961a156163a9" +SRCREV = "b2d3c0871614632279192ef86e5affd75312f01b" S = "${WORKDIR}/git" +inherit update-rc.d -SRC_URI += " \ -# file://wlan_cu_makefile.patch;patch=1 \ -" +TARGET_CC_ARCH += "${LDFLAGS}" +TARGET_CFLAGS += "-Wall -I./include" + +INITSCRIPT_NAME = "libpnd-init" +INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ." do_compile_prepend() { - cd ${S}/ + cd ${S}/ +} + +#EXTRA_OEMAKE = "all" + +do_compile() { + oe_runmake + oe_runmake deploy } do_install() { - install -d ${D}${bindir} - install -m 0755 ${S}/wlan_cu ${D}${bindir} -# install -m 0755 ${S}/tiwlan_loader ${D}${bindir} + install -d ${D}${sysconfdir}/pandora/conf/ + install ${S}/deployment/etc/pandora/conf/apps ${D}${sysconfdir}/pandora/conf/apps + install ${S}/deployment/etc/pandora/conf/desktop ${D}${sysconfdir}/pandora/conf/desktop + + install -d ${D}${libdir}/ + cp -pP ${S}/deployment/usr/lib/libpnd.so.1.0.1 ${D}${libdir}/libpnd.so.1.0.1 + cp -pP ${S}/deployment/usr/lib/libpnd.a ${D}${libdir}/libpnd.a + + install -d ${D}${bindir}/ + cp -pP ${S}/deployment/usr/bin/pndnotifyd ${D}${bindir}/pndnotifyd + + install -d ${D}${prefix}/pandora/ + install -d ${D}${prefix}/pandora/apps/ + cp -pP ${S}/deployment/usr/pandora/apps/.* ${D}${prefix}/pandora/apps/ + install -d ${D}${prefix}/pandora/scripts/ + cp -pP ${S}/deployment/usr/pandora/scripts/*.* ${D}${prefix}/pandora/scripts/ + + install -d ${D}${sysconfdir}/init.d/ + cp -pP ${WORKDIR}/rc.libpnd ${D}${sysconfdir}/init.d/libpnd-init +} + +pkg_postinst() { +#!/bin/sh +ln -sf /usr/lib/libpnd.so.1.0.1 /usr/lib/libpnd.so.1 } -FILES_${PN} += "${bindir} ${sbindir} ${bindir}/wlan_cu ${bindir}/tiwlan_loader" +FILES_${PN} += "${bindir} ${sbindir}" diff --git a/recipes/pandora-system/pandora-libpnd/rc.libpnd b/recipes/pandora-system/pandora-libpnd/rc.libpnd new file mode 100755 index 0000000..03f076f --- /dev/null +++ b/recipes/pandora-system/pandora-libpnd/rc.libpnd @@ -0,0 +1,44 @@ +#! /bin/sh +# +### BEGIN INIT INFO +# Provides: pndnotifyd +# Required-Start: #adjust +# Required-Stop: #adjust +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO + +PID=`pidof -o %PPID -x pndnotifyd` +PNDNOTIFY='/usr/bin/pndnotifyd' #adjust + +case "$1" in +start) + # Start daemon. + echo "starting $PID" + if [ $PID ] + then + echo "pndnotifyd already running." + else + $PNDNOTIFY -d + echo "started pndnotifyd" + fi + + ;; +stop) + # Stop daemon. + kill $PID + ;; +reload) + kill -HUP $PID + ;; +restart|force-reload) + $0 stop + $0 start + ;; +*) + echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2 + exit 2 + ;; +esac +exit 0 +