added startup scripts, updated Makefile
authorFredrik Wendt <fredrik@wendt.se>
Wed, 28 Jul 2010 21:09:43 +0000 (22:09 +0100)
committerFredrik Wendt <fredrik@wendt.se>
Wed, 28 Jul 2010 21:09:43 +0000 (22:09 +0100)
package/Makefile
package/src/daemon.sh [new file with mode: 0755]
package/src/gui.sh [new file with mode: 0755]
package/src/upstart [new file with mode: 0755]

index 567dac3..2e345ac 100644 (file)
@@ -1,11 +1,13 @@
 #
-# Makefile for Hermes: Contacts Updated
-# (c) Andrew Flegg 2009. Released under the Artistic Licence.
+# Makefile for Wifi Assistant
+# (c) Fredrik Wendt 2010. Released under the Artistic Licence.
+# Based on Hermes' Makefile, written by Andrew Flegg.
+#
 
 DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
 
 compile:
-       #perl -pi -e "s/(WimpWorks\.__init__.*?version\s*=\s*)['\"].*?['\"]/\1'${DEBVERS}'/" src/org/maemo/wifi-assistant/gui/gtkui.py
+       #perl -pi -e "s/(WimpWorks\.__init__.*?version\s*=\s*)['\"].*?['\"]/\1'${DEBVERS}'/" src/wifi-assistant/config-gui.py
        perl -ni -e 'print; exit if /^XB-Maemo-Icon-26:$$/' debian/control
        uuencode -m share/wifi-assistant-48.png - | perl -ne 'print " $$_" unless $$. == 1 or /^====$$/' >>debian/control
        py_compilefiles `find src -type f -name '*.py'`
@@ -14,15 +16,18 @@ compile:
 
 install:
        mkdir -p ${DESTDIR}/opt/wifi-assistant/lib ${DESTDIR}/opt/wifi-assistant/bin ${DESTDIR}/opt/wifi-assistant/share
-       ln -s ../lib/config-gui.py ${DESTDIR}/opt/wifi-assistant/bin/wifi-assistant
+       ln -s ../lib/gui.sh ${DESTDIR}/opt/wifi-assistant/bin/wifi-assistant
+       ln -s ../lib/daemon.sh ${DESTDIR}/opt/wifi-assistant/bin/wifi-assistant-daemon
        cp -r src/* ${DESTDIR}/opt/wifi-assistant/lib/
        chown -R root:root ${DESTDIR}/opt/wifi-assistant/lib/
-       install -D -m 0644 -o root -g root src/*.py* ${DESTDIR}/opt/wifi-assistant/lib/
+       install -D -m 0644 -o root -g root src/wifi_assistant/*.py* ${DESTDIR}/opt/wifi-assistant/lib/wifi-assistant/
+       install -D -m 0644 -o root -g root src/*.sh* ${DESTDIR}/opt/wifi-assistant/lib/
        install -D -m 0644 -o root -g root share/wifi-assistant-64.png ${DESTDIR}/usr/share/icons/hicolor/scalable/hildon/wifi-assistant.png
        install -D -m 0644 -o root -g root share/wifi-assistant-48.png ${DESTDIR}/usr/share/icons/hicolor/48x48/hildon/wifi-assistant.png
        install -D -m 0644 -o root -g root share/wifi-assistant.desktop ${DESTDIR}/usr/share/applications/hildon/wifi-assistant.desktop
        install -D -m 0644 -o root -g root share/wifi-assistant.service ${DESTDIR}/usr/share/dbus-1/services/wifi-assistant.service
-       chmod 755 ${DESTDIR}/opt/wifi-assistant/lib/config-gui.py
+       chmod 755 ${DESTDIR}/opt/wifi-assistant/lib/gui.sh
+       chmod 755 ${DESTDIR}/opt/wifi-assistant/lib/daemon.sh
        #cd po && $(MAKE) install 
 
 clean:
diff --git a/package/src/daemon.sh b/package/src/daemon.sh
new file mode 100755 (executable)
index 0000000..9c3a676
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+run-standalone.sh python2.5 /opt/wifi-assistant/lib/wifi_assistant/daemon.py
\ No newline at end of file
diff --git a/package/src/gui.sh b/package/src/gui.sh
new file mode 100755 (executable)
index 0000000..289f43b
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+run-standalone.sh python2.5 /opt/wifi-assistant/lib/wifi_assistant/config-gui.py
\ No newline at end of file
diff --git a/package/src/upstart b/package/src/upstart
new file mode 100755 (executable)
index 0000000..dcfdc2c
--- /dev/null
@@ -0,0 +1,12 @@
+description "wifi-assistant-daemon"
+author "Fredrik Wendt <fredrik@wendt.se">
+
+
+start on started hildon-desktop
+stop on stopped dbus
+
+console logged
+
+exec /opt/wifi-assistant/bin/wifi-assistant-daemon
+
+respawn