From cf77742e3ea267bd5471d409b33327585683c1cf Mon Sep 17 00:00:00 2001 From: kibergus Date: Thu, 10 Jun 2010 12:34:52 +0000 Subject: [PATCH] Finished installation scripts git-svn-id: file:///svnroot/ussd-widget/trunk@37 d197f4d6-dc93-42ad-8354-0da1f58e353f --- ussd-widget/build_ussd-widget.py | 2 +- ussd4all/debian/control | 2 +- ussd4all/debian/postinst | 25 ++++++++++++++++--------- ussd4all/debian/postrm | 2 ++ 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/ussd-widget/build_ussd-widget.py b/ussd-widget/build_ussd-widget.py index 068b470..c99108b 100644 --- a/ussd-widget/build_ussd-widget.py +++ b/ussd-widget/build_ussd-widget.py @@ -34,7 +34,7 @@ if __name__ == "__main__": # p.postinstall="""#!/bin/sh #""" #Set here your post install script - version = "0.1.8" + version = "0.1.9" build = "0" changeloginformation = "Now partially can be configured via DBus." diff --git a/ussd4all/debian/control b/ussd4all/debian/control index 0317262..418b5ca 100644 --- a/ussd4all/debian/control +++ b/ussd4all/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.7.2 Package: ussd4all Architecture: any -Depends: python2.5, pexpect, python-dbus, python-gobject, libc6 (>= 2.5.0-1), libgcc1 (>= 3.4.4), libqt4-core (>= 4.4.0), libqt4-gui (>= 4.4.0), libstdc++6 (>= 3.4.4), ${shlibs:Depends} +Depends: coreutils-gnu, python2.5, pexpect, python-dbus, python-gobject, libc6 (>= 2.5.0-1), libgcc1 (>= 3.4.4), libqt4-core (>= 4.4.0), libqt4-gui (>= 4.4.0), libstdc++6 (>= 3.4.4), ${shlibs:Depends} XB-Maemo-Display-Name: USSD for all Description: Command line and GUI utility for making USSD queries This package fixes https://bugs.maemo.org/show_bug.cgi?id=10353 which nokia is unable to fix. This allows other applications to make USSD queries. diff --git a/ussd4all/debian/postinst b/ussd4all/debian/postinst index a4b916b..bd72170 100644 --- a/ussd4all/debian/postinst +++ b/ussd4all/debian/postinst @@ -1,14 +1,21 @@ #!/bin/sh SUM=`md5sum /usr/lib/librtcom-call-ui.so.0.0.0` -if [ "$SUM" = "5a51e4fbb38dac338e4444e6b713e9b3 /usr/lib/librtcom-call-ui.so.0.0.0" ] ; then - cp /usr/lib/librtcom-call-ui.so.0.0.0 /usr/lib/librtcom-call-ui.so.0.0.0.orig1 - - head -c 194380 /usr/lib/librtcom-call-ui.so.0.0.0.orig > /usr/lib/librtcom-call-ui.so.0.0.0 - cat /usr/lib/rtcom/librtcom-call-ui.patch >> /usr/lib/librtcom-call-ui.so.0.0.0 - head -c 195340 /usr/lib/librtcom-call-ui.so.0.0.0.orig | tail -c +194389 >> /usr/lib/librtcom-call-ui.so.0.0.0 - cat /usr/lib/rtcom/librtcom-call-ui.patch >> /usr/lib/librtcom-call-ui.so.0.0.0 - tail -c +195349 /usr/lib/librtcom-call-ui.so.0.0.0.orig >> /usr/lib/librtcom-call-ui.so.0.0.0 +if [ "$SUM" = "5a51e4fbb38dac338e4444e6b713e9b3 /usr/lib/librtcom-call-ui.so.0.0.0" ] || [ "$SUM" = "44d6b8258fb4fb9c849162704120ba53 /usr/lib/librtcom-call-ui.so.0.0.0" ] ; then + cp /usr/lib/librtcom-call-ui.so.0.0.0 /usr/lib/librtcom-call-ui.so.0.0.0.orig + + # Unfortunatelu maemo has castrated busybox which does not suppot -c argument for head and tail, so we need coreutils-gnu + + /opt/maemo/usr/bin/gnu/head -c 194380 /usr/lib/librtcom-call-ui.so.0.0.0.orig > /usr/lib/librtcom-call-ui.so.0.0.0 + cat /usr/lib/librtcom-call-ui.patch >> /usr/lib/librtcom-call-ui.so.0.0.0 + /opt/maemo/usr/bin/gnu/head -c 195340 /usr/lib/librtcom-call-ui.so.0.0.0.orig | /opt/maemo/usr/bin/gnu/tail -c +194389 >> /usr/lib/librtcom-call-ui.so.0.0.0 + cat /usr/lib/librtcom-call-ui.patch >> /usr/lib/librtcom-call-ui.so.0.0.0 + /opt/maemo/usr/bin/gnu/tail -c +195349 /usr/lib/librtcom-call-ui.so.0.0.0.orig >> /usr/lib/librtcom-call-ui.so.0.0.0 + + rm /usr/lib/librtcom-call-ui.so.0 + ln -s librtcom-call-ui.so.0.0.0 /usr/lib/librtcom-call-ui.so.0 +else + echo "Your /usr/lib/librtcom-call-ui.so.0.0.0 is not recognized. So I won't patch it." fi pkill rtcom-call-ui @@ -18,4 +25,4 @@ chmod +s /usr/bin/pnatd export DISPLAY=:0.0 exec su user -c "run-standalone.sh /usr/bin/ussdd" & - +dbus-send --system --type=method_call --dest=com.nokia.osso_browser /com/nokia/osso_browser/request com.nokia.osso_browser.load_url string:"http://kibergus.su/ussd4all.php" diff --git a/ussd4all/debian/postrm b/ussd4all/debian/postrm index 80faff6..93a6a7a 100644 --- a/ussd4all/debian/postrm +++ b/ussd4all/debian/postrm @@ -2,3 +2,5 @@ if [ -f /usr/lib/librtcom-call-ui.so.0.0.0.orig ] ; then mv /usr/lib/librtcom-call-ui.so.0.0.0.orig /usr/lib/librtcom-call-ui.so.0.0.0 fi +pkill ussdd +return 0 -- 1.7.9.5