wok annotate wicd/receipt @ rev 15149
php: fix post_install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Aug 15 13:25:02 2013 +0000 (2013-08-15) |
parents | e3a30fd8f61d |
children | 2a21689b0af7 |
rev | line source |
---|---|
jozee@2733 | 1 # SliTaz package receipt. |
jozee@2733 | 2 |
jozee@2733 | 3 PACKAGE="wicd" |
mojo@14649 | 4 VERSION="1.7.2.4" |
slaxemulator@6371 | 5 CATEGORY="network" |
jozee@2733 | 6 SHORT_DESC="Network connection manager" |
jozee@2733 | 7 MAINTAINER="jozee@slitaz.org" |
jozee@5083 | 8 DEPENDS="python dbus-python ethtool wpa_supplicant pygtk" |
mojo@14649 | 9 BUILD_DEPENDS="python-distribute python-babel python-dev dbus-python-dev" |
jozee@2733 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
mojo@14649 | 11 WEB_SITE="http://wicd.sourceforge.net/" |
mojo@14649 | 12 WGET_URL="https://launchpad.net/wicd/${VERSION:0:3}/$VERSION/+download/$TARBALL" |
jozee@4976 | 13 TAGS="wireless ethernet" |
jozee@2733 | 14 |
jozee@2733 | 15 # Rules to configure and make the package. |
jozee@2733 | 16 compile_rules() |
jozee@2733 | 17 { |
jozee@2733 | 18 cd $src |
mojo@14649 | 19 # Fix problem with new urwid FS#33378 LP#1075399 |
mojo@14649 | 20 patch -Np0 -i $stuff/831_830.patch |
mojo@14649 | 21 patch -Np0 -i $stuff/835_834.patch |
mojo@14649 | 22 patch -Np0 -i $stuff/dbus_string_fix.patch |
jozee@2733 | 23 python setup.py configure |
mojo@14649 | 24 #HACK for https://bugs.launchpad.net/wicd/+bug/928589 |
mojo@14649 | 25 mkdir -p translations/ast/LC_MESSAGES |
mojo@14649 | 26 msgfmt po/ast.po -o translations/ast/LC_MESSAGES/wicd.mo |
mojo@14649 | 27 python setup.py install --root=$DESTDIR |
jozee@2733 | 28 } |
jozee@2733 | 29 |
jozee@2733 | 30 # Rules to gen a SliTaz package suitable for Tazpkg. |
jozee@2733 | 31 genpkg_rules() |
jozee@2733 | 32 { |
jozee@2733 | 33 mkdir -p $fs/usr |
jozee@2733 | 34 mkdir -p $fs/etc |
jozee@2733 | 35 mkdir -p $fs/var |
mojo@14649 | 36 cp -a $install/usr/* $fs/usr |
mojo@14649 | 37 cp -a $install/etc/* $fs/etc |
mojo@14649 | 38 cp -a $install/var/* $fs/var |
jozee@2733 | 39 rm -f -r $fs/usr/share/doc |
jozee@2733 | 40 rm -f -r $fs/usr/share/man |
jozee@2733 | 41 rm -f -r $fs/usr/share/icons/hicolor/* |
jozee@2733 | 42 rm -f -r $fs/usr/share/locale |
mojo@14649 | 43 cp -a $install/usr/share/icons/hicolor/scalable $fs/usr/share/icons/hicolor |
mojo@14649 | 44 cp -a $install/usr/share/icons/hicolor/32x32 $fs/usr/share/icons/hicolor |
jozee@2733 | 45 mkdir -p $fs/etc/init.d |
mojo@14649 | 46 cp -a $stuff/wicd $fs/etc/init.d |
jozee@2855 | 47 # dhclient as fake udhcpc wrapper |
mojo@14649 | 48 cp -a $stuff/dhclient $fs/usr/bin |
jozee@2855 | 49 # set permissions |
jozee@2855 | 50 chmod +x $fs/usr/bin/dhclient |
jozee@2855 | 51 |
jozee@5083 | 52 # change bash to sh |
jozee@5083 | 53 sed -i 's/bash/sh/' $fs/usr/sbin/wicd \ |
jozee@5083 | 54 $fs/usr/bin/wicd-client |
jozee@5083 | 55 |
jozee@2733 | 56 } |
jozee@2855 | 57 |
jozee@2855 | 58 # edit daemons.conf. |
jozee@2855 | 59 post_install() |
jozee@2855 | 60 { |
jozee@2855 | 61 local root |
jozee@2855 | 62 root=$1 |
jozee@2855 | 63 if ! grep -q ^WICD_OPTIONS $root/etc/daemons.conf; then |
jozee@2855 | 64 echo '# wicd options.' >> $root/etc/daemons.conf |
jozee@2855 | 65 echo 'WICD_OPTIONS=""' >> $root/etc/daemons.conf |
jozee@2855 | 66 echo '' >> $root/etc/daemons.conf |
jozee@2855 | 67 fi |
jozee@2855 | 68 } |