2 # Makefile for Hermes: Contacts Updated
3 # (c) Andrew Flegg 2009. Released under the Artistic Licence.
5 DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
8 #perl -pi -e "s/(WimpWorks\.__init__.*?version\s*=\s*)['\"].*?['\"]/\1'${DEBVERS}'/" src/org/maemo/wifi-assistant/gui/gtkui.py
9 perl -ni -e 'print; exit if /^XB-Maemo-Icon-26:$$/' debian/control
10 uuencode -m share/wifi-assistant-48.png - | perl -ne 'print " $$_" unless $$. == 1 or /^====$$/' >>debian/control
11 py_compilefiles `find src -type f -name '*.py'`
12 #cd po && $(MAKE) compile
16 mkdir -p ${DESTDIR}/opt/wifi-assistant/lib ${DESTDIR}/opt/wifi-assistant/bin ${DESTDIR}/opt/wifi-assistant/share
17 ln -s ../lib/config-gui.py ${DESTDIR}/opt/wifi-assistant/bin/wifi-assistant
18 cp -r src/* ${DESTDIR}/opt/wifi-assistant/lib/
19 chown -R root:root ${DESTDIR}/opt/wifi-assistant/lib/
20 install -D -m 0644 -o root -g root src/*.py* ${DESTDIR}/opt/wifi-assistant/lib/
21 install -D -m 0644 -o root -g root share/wifi-assistant-64.png ${DESTDIR}/usr/share/icons/hicolor/scalable/hildon/wifi-assistant.png
22 install -D -m 0644 -o root -g root share/wifi-assistant-48.png ${DESTDIR}/usr/share/icons/hicolor/48x48/hildon/wifi-assistant.png
23 install -D -m 0644 -o root -g root share/wifi-assistant.desktop ${DESTDIR}/usr/share/applications/hildon/wifi-assistant.desktop
24 install -D -m 0644 -o root -g root share/wifi-assistant.service ${DESTDIR}/usr/share/dbus-1/services/wifi-assistant.service
25 chmod 755 ${DESTDIR}/opt/wifi-assistant/lib/config-gui.py
26 #cd po && $(MAKE) install
29 rm -f `find src -type f -name '*.pyo' -o -name '*.pyc'`
30 rm -f build-stamp configure-stamp
31 rm -rf debian/wifi-assistant bin
32 find . -name *~ -exec rm -f {} \;
33 #cd po && $(MAKE) clean
36 dpkg-buildpackage -rfakeroot -uc -us