Adding dsme recipe with horrible do_install
authorKirtika Ruchandani <kirtibr@gmail.com>
Sun, 28 Jun 2009 21:24:41 +0000 (02:54 +0530)
committerKirtika Ruchandani <kirtibr@gmail.com>
Sun, 28 Jun 2009 21:24:41 +0000 (02:54 +0530)
dsme/mer-changes.patch [new file with mode: 0644]
dsme_0.60.4.bb [new file with mode: 0644]

diff --git a/dsme/mer-changes.patch b/dsme/mer-changes.patch
new file mode 100644 (file)
index 0000000..2c45b56
--- /dev/null
@@ -0,0 +1,120 @@
+--- dsme-0.60.4+0m5/dsme-cal.c
++++ dsme-0.60.4+0m5/dsme-cal.c
+@@ -26,18 +26,17 @@
+ #include "dsme/dsme-cal.h"
+ #include "dsme/logging.h"
+-#include <cal.h>
+-
+ static void dsme_cal_debug(int level, const char *str);
+ static void dsme_cal_error(const char *str);
++
+ int dsme_cal_init(void) {
+-      cal_debug_log = dsme_cal_debug;
++/*    cal_debug_log = dsme_cal_debug;
+       cal_error_log = dsme_cal_error;
+-
++*/
+       return 0;
+ }
+@@ -53,3 +52,4 @@
+       dsme_log(LOG_ERR, "CAL ERROR: %s", str);
+ }
++
+--- dsme-0.60.4+0m5/Makefile
++++ dsme-0.60.4+0m5/Makefile
+@@ -38,10 +38,10 @@
+ # C_DBGFLAGS are not used for normal builds
+ #
+ C_GENFLAGS     := -DPRG_VERSION=$(VERSION) -g \
+-                  -Wall -Wwrite-strings -Wmissing-prototypes -Werror# -pedantic
++                  -Wall -Wwrite-strings -Wmissing-prototypes -D_GNU_SOURCE # -pedantic
+ C_OPTFLAGS     := -O2 -s
+ C_DBGFLAGS     := -g -DDEBUG -DDSME_LOG_ENABLE
+-C_DEFINES      := DSME_POSIX_TIMER DSME_WD_SYNC DSME_BMEIPC
++C_DEFINES      := DSME_POSIX_TIMER DSME_WD_SYNC
+ C_INCDIRS      := $(TOPDIR)/include $(TOPDIR)/modules $(TOPDIR) 
+ MKDEP_INCFLAGS := $$(pkg-config --cflags-only-I glib-2.0)
+@@ -70,7 +70,7 @@
+                            logging.o oom.o mainloop.o \
+                            dsme-cal.o dsmesock.o
+ dsme_SO_LIBS            := dsme
+-dsme_LIBS               := dl cal
++dsme_LIBS               := dl
+ dsme: LD_EXTRA_GENFLAGS := -rdynamic
+ #logging.o:   C_EXTRA_DEFINES :=      USE_STDERR
+--- dsme-0.60.4+0m5/util/kicker.c
++++ dsme-0.60.4+0m5/util/kicker.c
+@@ -94,7 +94,7 @@
+               return -1;
+       }
+-      ret = cal_read_block(kicker_cal, "r&d_mode", &vptr, &len, CAL_FLAG_USER);
++      ret = cal_read_block(kicker_cal, "r&d_mode", &vptr, &len, 0);
+       if (ret < 0) {
+               fprintf(stderr, "Kicker: error reading R&D mode flags, watchdog enabled\n");
+               cal_finish(kicker_cal);
+--- dsme-0.60.4+0m5/util/Makefile
++++ dsme-0.60.4+0m5/util/Makefile
+@@ -20,9 +20,9 @@
+ waitfordsme_SO_LIBS   :=      dsme
+ kicker_C_OBJS         :=      kicker.o
+ kicker_SO_LIBS        :=      dsme
+-kicker_LIBS     :=      cal
++kicker_LIBS     :=      
+ thermaltool_C_OBJS := thermaltool.o
+-thermaltool_LIBS   := cal
++thermaltool_LIBS   := 
+ #
+ # Install files in this directory
+--- dsme-0.60.4+0m5/debian/control
++++ dsme-0.60.4+0m5/debian/control
+@@ -3,7 +3,7 @@
+ Priority: optional
+ Maintainer: Semi Malinen <semi.malinen@nokia.com>
+ Uploaders: Ismo Laitinen <ismo.laitinen@nokia.com>, David Weinehall <david.weinehall@nokia.com>, Philippe De Swert <philippe.de-swert@nokia.com>
+-Build-Depends: debhelper (>= 4.1.0), libbmeipc-dev, libcal-dev (>= 0.2.0), pkg-config, libglib2.0-dev, libdbus-1-dev (>= 1.0), libdbus-glib-1-dev, upstart-dev
++Build-Depends: debhelper (>= 4.1.0), pkg-config, libglib2.0-dev, libdbus-1-dev (>= 1.0), libdbus-glib-1-dev, upstart-dev
+ Standards-Version: 3.7.2
+ Package: dsme
+--- dsme-0.60.4+0m5/debian/changelog
++++ dsme-0.60.4+0m5/debian/changelog
+@@ -1,3 +1,9 @@
++dsme (0.60.4+0m5-mer1) jaunty; urgency=low
++
++  * Make it compile under Mer.
++
++ -- Carsten V. Munk <cvm@cs.au.dk>  Wed, 27 May 2009 16:27:10 +0000
++
+ dsme (0.60.4+0m5) unstable; urgency=low
+   * This entry has been added by BIFH queue processor
+--- dsme-0.60.4+0m5/include/cal.h
++++ dsme-0.60.4+0m5/include/cal.h
+@@ -0,0 +1,16 @@
++#ifndef __CAL_H
++#define __CAL_H
++
++struct cal;
++
++static void cal_debug(int a, const char *b) {}
++static void cal_error(const char *a) {}
++static void cal_finish(struct cal *a) {}
++static int cal_init(struct cal **a) { return -1; }
++static int cal_lock_otp_area(struct cal *a, unsigned int b) { return -1; }
++static int cal_read_block(struct cal *a, const char *b, void **c, long unsigned int *d, long unsigned int e) { return -1; };
++static int cal_write_block(struct cal *a, const char *b, const void *c, long unsigned int d, long unsigned int e) { return -1; };
++
++#define CAL_FLAG_USER 0
++
++#endif
diff --git a/dsme_0.60.4.bb b/dsme_0.60.4.bb
new file mode 100644 (file)
index 0000000..0960720
--- /dev/null
@@ -0,0 +1,125 @@
+# Copyright (C) 2009 Kirtika Ruchandani <kirtibr@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Device state management entity for service monitoring, process watchdog and inactivity tracking"
+HOMEPAGE = "http://maemo.org"
+LICENSE = "GNU Lesser General Public License-version 2.1"
+SECTION = "misc"
+DEPENDS = "glib-2.0 dbus dbus-glib upstart"
+
+PR = "r0"
+
+SRC_URI = "http://repository.maemo.org/pool/fremantle/free/d/${PN}/${PN}_${PV}+0m5.tar.gz  \
+           file://dsme/mer-changes.patch;patch=1"
+
+S= "${WORKDIR}/${PN}-${PV}+0m5"
+
+inherit autotools pkgconfig
+
+do_configure(){
+    :
+}
+
+do_make(){
+    oe_runmake
+}
+
+
+#FIXME :  Get the issue with the () flags 
+#for install solved.
+do_install(){
+    install -d ${D}${libdir}  ${D}${includedir} ${D}${includedir}/dsme ${D}${sysconfdir}/dsme ${D}${base_sbindir} ${D}${libdir}/dsme
+    install -m 755  ${S}/libdsme.so.0.2.0 ${D}${libdir}
+    ln -sf ${D}${libdir}/libdsme.so.0.2.0 ${D}${libdir}/libdsme.so
+    install -m 0755 ${S}/dsme ${D}${base_sbindir}
+    install -m 755  ${S}/libdsme_dbus_if.so.0.2.0 ${D}${libdir}
+    ln -sf ${D}${libdir}/libdsme_dbus_if.so.0.2.0 ${D}${libdir}/libdsme_dbus_if.so
+
+    install -m 0644  ${S}/include/dsme/protocol.h ${D}${includedir}/dsme
+    install -m 0644  ${S}/include/dsme/messages.h ${D}${includedir}/dsme
+    install -m 0600  ${S}/lifeguard.uids ${D}${sysconfdir}/dsme
+    
+
+    install -m 0755  ${S}/util/batttest  ${D}${sbindir}
+    install -m 0755  ${S}/util/dsmetool ${D}${sbindir}
+    install -m 0755  ${S}/util/bootstate ${D}${sbindir}
+    install -m 0755  ${S}/util/waitfordsme ${D}${sbindir}
+    install -m 0755  ${S}/util/dsmetest ${D}${sbindir}
+    install -m 0755  ${S}/util/kicker ${D}${sbindir}
+    install -m 0755  ${S}/util/thermaltool ${D}${sbindir}
+    install -m 0755  ${S}/util/dsmetool-session ${D}${sbindir}
+     
+    
+    
+    install -m 755  ${S}/modules/libstartup.so.0.0.0 ${D}${libdir}/dsme
+    ln -sf ${D}${libdir}/dsme/libstartup.so.0.0.0 ${D}${libdir}/dsme/libstartup.so
+
+
+    install -m 644  ${S}/modules/processwd.h ${D}${includedir}/dsme 
+
+
+    install -m 755  ${S}/modules/libprocesswd.so.0.0.0 ${D}${libdir}/dsme
+    ln -sf ${D}${libdir}/dsme/libprocesswd.so.0.0.0 ${D}${libdir}/dsme/libprocesswd.so
+
+
+
+
+
+    install -m 755  ${S}/modules/libhwwd.so.0.0.0 ${D}${libdir}/dsme
+    ln -sf ${D}${libdir}/dsme/libhwwd.so.0.0.0 ${D}${libdir}/dsme/libhwwd.so
+
+
+
+
+    install -m 644  ${S}/modules/state.h ${D}${includedir}/dsme 
+    install -m 644  ${S}/modules/state_states.h ${D}${includedir}/dsme 
+    install -m 755  ${S}/modules/liblifeguard.so.0.0.0 ${D}${libdir}/dsme
+    ln -sf ${D}${libdir}/dsme/liblifeguard.so.0.0.0 ${D}${libdir}/dsme/liblifeguard.so
+
+  
+    install -m 755  ${S}/modules/libstate.so.0.0.0 ${D}${libdir}/dsme
+    ln -sf ${D}${libdir}/dsme/libstate.so.0.0.0 ${D}${libdir}/dsme/libstate.so
+
+    install -m 755  ${S}/modules/librunlevel.so.0.0.0 ${D}${libdir}/dsme
+    ln -sf ${D}${libdir}/dsme/librunlevel.so.0.0.0 ${D}${libdir}/dsme/librunlevel.so
+
+
+    install -m 644  ${S}/modules/dsme_dbus_if.h ${D}${includedir}/dsme 
+
+    install -m 755  ${S}/modules/libdbusproxy.so.0.0.0 ${D}${libdir}/dsme
+    ln -sf ${D}${libdir}/dsme/libdbusproxy.so.0.0.0 ${D}${libdir}/dsme/libdbusproxy.so
+
+    install -m 755  ${S}/modules/libalarmtracker.so.0.0.0 ${D}${libdir}/dsme
+    ln -sf ${D}${libdir}/dsme/libalarmtracker.so.0.0.0 ${D}${libdir}/dsme/libalarmtracker.so
+
+    install -m 755  ${S}/modules/libthermalmanager.so.0.0.0 ${D}${libdir}/dsme
+    ln -sf ${D}${libdir}/dsme/libthermalmanager.so.0.0.0 ${D}${libdir}/dsme/libthermalmanager.so
+
+
+    install -m 755  ${S}/modules/libemergencycalltracker.so.0.0.0 ${D}${libdir}/dsme
+    ln -sf ${D}${libdir}/dsme/libemergencycalltracker.so.0.0.0 ${D}${libdir}/dsme/libemergencycalltracker.so
+
+
+
+
+
+#    oe_libinstall -so  ${S}/modules/libdbusproxy ${D}${libdir}/dsme 
+#    oe_libinstall -so  ${S}/modules/libalarmtracker ${D}${libdir}/dsme 
+#    oe_libinstall -so  ${S}/modules/libthermalmanager ${D}${libdir}/dsme 
+#    oe_libinstall -so  ${S}/modules/libemergencycalltracker ${D}${libdir}/dsme 
+    
+}
+
+
+
+do_stage(){
+    autotools_stage_all
+}
+
+
+