wok annotate wicd/receipt @ rev 24353

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Feb 03 12:55:23 2022 +0000 (2022-02-03)
parents 9e01bc6321ea
children 3abeffdae80b
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"
pascal@15363 8 LICENSE="GPL2"
jozee@2733 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
mojo@14649 10 WEB_SITE="http://wicd.sourceforge.net/"
mojo@14649 11 WGET_URL="https://launchpad.net/wicd/${VERSION:0:3}/$VERSION/+download/$TARBALL"
jozee@4976 12 TAGS="wireless ethernet"
jozee@2733 13
pascal@15363 14 DEPENDS="python dbus-python ethtool wpa_supplicant pygtk"
pascal@15363 15 BUILD_DEPENDS="python-distribute python-babel python-dev dbus-python-dev"
pascal@15363 16
pascal@24353 17 # What is the latest version available today?
pascal@24353 18 current_version()
pascal@24353 19 {
pascal@24353 20 wget -O - https://sourceforge.net/projects/wicd/files/wicd-stable/ 2>/dev/null | \
pascal@24353 21 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
pascal@24353 22 sed '/scope="row/!d;s|.*/wicd-stable/wicd-||;s|/.*||;q'
pascal@24353 23 }
pascal@24353 24
jozee@2733 25 # Rules to configure and make the package.
jozee@2733 26 compile_rules()
jozee@2733 27 {
al@18086 28 # Fix problem with new urwid FS#33378 LP#1075399
al@18086 29 patch -Np0 -i $stuff/831_830.patch
al@18086 30 patch -Np0 -i $stuff/835_834.patch
al@18086 31 patch -Np0 -i $stuff/dbus_string_fix.patch
al@18086 32 python setup.py configure
al@18086 33 #HACK for https://bugs.launchpad.net/wicd/+bug/928589
al@18086 34 mkdir -p translations/ast/LC_MESSAGES
al@18086 35 msgfmt po/ast.po -o translations/ast/LC_MESSAGES/wicd.mo
al@18086 36 python setup.py install --root=$DESTDIR
jozee@2733 37 }
jozee@2733 38
jozee@2733 39 # Rules to gen a SliTaz package suitable for Tazpkg.
jozee@2733 40 genpkg_rules()
jozee@2733 41 {
al@18086 42 mkdir -p $fs/usr $fs/etc $fs/var
al@18086 43 cp -a $install/usr/* $fs/usr
al@18086 44 cp -a $install/etc/* $fs/etc
al@18086 45 cp -a $install/var/* $fs/var
al@18086 46 rm -f -r $fs/usr/share/doc
al@18086 47 rm -f -r $fs/usr/share/man
al@18086 48 rm -f -r $fs/usr/share/icons/hicolor/*
al@18086 49 rm -f -r $fs/usr/share/locale
al@18086 50 cp -a $install/usr/share/icons/hicolor/scalable \
al@18086 51 $install/usr/share/icons/hicolor/32x32 $fs/usr/share/icons/hicolor
al@18086 52 mkdir -p $fs/etc/init.d
al@18086 53 cp -a $stuff/wicd $fs/etc/init.d
jozee@2855 54 # dhclient as fake udhcpc wrapper
al@18086 55 cp -a $stuff/dhclient $fs/usr/bin
jozee@2855 56 # set permissions
jozee@2855 57 chmod +x $fs/usr/bin/dhclient
al@18086 58
jozee@5083 59 # change bash to sh
jozee@5083 60 sed -i 's/bash/sh/' $fs/usr/sbin/wicd \
jozee@5083 61 $fs/usr/bin/wicd-client
jozee@2733 62 }
jozee@2855 63
jozee@2855 64 # edit daemons.conf.
jozee@2855 65 post_install()
jozee@2855 66 {
pascal@18730 67 if ! grep -q ^WICD_OPTIONS "$1/etc/daemons.conf"; then
pascal@18730 68 echo '# wicd options.' >> "$1/etc/daemons.conf"
pascal@18730 69 echo 'WICD_OPTIONS=""' >> "$1/etc/daemons.conf"
pascal@18730 70 echo '' >> "$1/etc/daemons.conf"
jozee@2855 71 fi
jozee@2855 72 }