added test for per SSID URL in GConf
[wifi-assistant] / package / Makefile
1 #
2 # Makefile for Wifi Assistant
3 # (c) Fredrik Wendt 2010. Released under the Artistic Licence.
4 # Based on Hermes' Makefile, written by Andrew Flegg.
5 #
6
7 DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: 1://p')
8
9 compile:
10         sed -i -e 's/VERSION = .*/VERSION = "${DEBVERS}"/' src/wifi_assistant/gui/about_dialog.py
11         perl -ni -e 'print; exit if /^XB-Maemo-Icon-26:$$/' debian/control
12         uuencode -m share/wifi-assistant-48.png - | perl -ne 'print " $$_" unless $$. == 1 or /^====$$/' >>debian/control
13         py_compilefiles `find src -type f -name '*.py'`
14         #cd po && $(MAKE) compile
15         mkdir bin
16
17 install:
18         mkdir -p ${DESTDIR}/opt/wifi-assistant/lib ${DESTDIR}/opt/wifi-assistant/bin ${DESTDIR}/opt/wifi-assistant/share
19         ln -s ../lib/gui.sh ${DESTDIR}/opt/wifi-assistant/bin/wifi-assistant
20         ln -s ../lib/daemon.sh ${DESTDIR}/opt/wifi-assistant/bin/wifi-assistant-daemon
21         cp -r src/* ${DESTDIR}/opt/wifi-assistant/lib/
22         chown -R root:root ${DESTDIR}/opt/wifi-assistant/lib/
23         install -D -m 0644 -o root -g root src/wifi_assistant/*.py* ${DESTDIR}/opt/wifi-assistant/lib/wifi_assistant/
24         install -D -m 0644 -o root -g root src/*.sh* ${DESTDIR}/opt/wifi-assistant/lib/
25         install -D -m 0644 -o root -g root share/wifi-assistant-64.png ${DESTDIR}/usr/share/icons/hicolor/scalable/hildon/wifi-assistant.png
26         install -D -m 0644 -o root -g root share/wifi-assistant-48.png ${DESTDIR}/usr/share/icons/hicolor/48x48/hildon/wifi-assistant.png
27         install -D -m 0644 -o root -g root share/wifi-assistant.desktop ${DESTDIR}/usr/share/applications/hildon/wifi-assistant.desktop
28 #       install -D -m 0644 -o root -g root share/wifi-assistant.service ${DESTDIR}/usr/share/dbus-1/services/wifi-assistant.service
29         install -D -m 0644 -o root -g root share/upstart ${DESTDIR}/etc/event.d/wifi-assistant
30         chmod 755 ${DESTDIR}/opt/wifi-assistant/lib/gui.sh
31         chmod 755 ${DESTDIR}/opt/wifi-assistant/lib/daemon.sh
32         #cd po && $(MAKE) install 
33
34 clean:
35         rm -f `find src -type f -name '*.pyo' -o -name '*.pyc'`
36         rm -f build-stamp configure-stamp
37         rm -rf debian/wifi-assistant bin
38         find . -name *~ -exec rm -f {} \;
39         #cd po && $(MAKE) clean
40
41 package:
42         dpkg-buildpackage -rfakeroot -uc -us