#Maintainer: George Vlahavas (vlahavas@gmail.com, gapan@zenwalk forums) pkgname=wicd pkgver=1.4.2 pkgrel=2 zenver=52 arch=noarch source=("http://downloads.sourceforge.net/wicd/wicd_1.4.2-src.tar.bz2" "http://users.zenwalk.org/user-accounts/gapan/wicd/wicd.desktop" "http://users.zenwalk.org/user-accounts/gapan/wicd/rc.wicd" "http://users.zenwalk.org/user-accounts/gapan/wicd/wicd" "http://users.zenwalk.org/user-accounts/gapan/wicd/wicd.txt" "http://users.zenwalk.org/user-accounts/gapan/wicd/icons.tar.gz" "http://users.zenwalk.org/user-accounts/gapan/wicd/zen-closeresolv-1.4.2.patch" "http://users.zenwalk.org/user-accounts/gapan/wicd/zen-bssid-1.4.2.patch") url=http://wicd.sourceforge.net/ options=('norequiredbuilder' 'keepdepfile') doinst() { # Remove old .pyc files rm usr/share/wicd/*.pyc 2> /dev/null } slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "wicd - A complete network connection manager" "wicd supports wired and wireless networks, and capable of creating and" "tracking profiles for both. It has a template-based wireless" "encryption system, which allows the user to easily add encryption" "methods used. It ships with some common encryption types, such as WPA" "and WEP. Wicd will automatically connect at startup to any preferred" "network within range." ) build() { cd $startdir/src/ # Remove broken and unwanted files rm -rf opt/wicd/tray-dapper.py rm -rf opt/wicd/tray-edgy.py rm -rf opt/wicd/dapper.py rm -rf opt/wicd/data/wicd.png rm -rf opt/wicd/images/wicd.png rm -rf usr/share/pixmaps/ rm -rf usr/share/applications/* rm -rf etc/init.d # Replace /opt with correct path sed -i -e "s|os.chdir (\"/opt/wicd\")|os.chdir (\"/usr/share/wicd\")|g" $startdir/src/opt/wicd/gui.py # Install in temp dir mkdir -p $startdir/pkg/usr/share cp -r opt/* $startdir/pkg/usr/share cp -r usr $startdir/pkg/ install -d -m755 $startdir/pkg/etc/rc.d/ install -D -m755 $startdir/src/etc/dbus-1/system.d/wicd.conf $startdir/pkg/etc/dbus-1/system.d/wicd.conf ( cd $startdir/pkg/usr/share/wicd/images/; ln -sf wicd-blue.png wicd.png ) ( cd $startdir/pkg/usr/share/wicd/data/; ln -sf ../images/wicd-blue.png wicd.png ) mkdir -p $startdir/pkg/usr/bin cp $startdir/src/wicd $startdir/pkg/usr/bin chmod 755 $startdir/pkg/usr/bin/wicd cp $startdir/src/rc.wicd $startdir/pkg/etc/rc.d mkdir -p $startdir/pkg/etc/rc.d/desc.d cp $startdir/src/wicd.txt $startdir/pkg/etc/rc.d/desc.d # Replace dhclient with dhcpcd and ip with route sed -i -e "s/dhclient /dhcpcd /g" $startdir/pkg/usr/share/wicd/networking.py sed -i -e "s/ip route flush dev/route del dev/g" $startdir/pkg/usr/share/wicd/networking.py # Replace init.d service start with the Zenwalk equivalent in an error message sed -i -e "s|sudo /etc/init.d/wicd start|service start wicd|" $startdir/pkg/usr/share/wicd/misc.py # Patch for closing the resolv.conf file cd $startdir/pkg/usr/share/wicd patch -p0<$startdir/src/zen-closeresolv-1.4.2.patch # Patch for multiple APs patch -p0<$startdir/src/zen-bssid-1.4.2.patch # Remove another useless file rm -rf $startdir/pkg/usr/share/wicd/networking.py~ # Copy icons to the right place ICONSIZES="128 72 64 48 32 24 22 16" for i in $ICONSIZES; do mkdir -p $startdir/pkg/usr/share/icons/hicolor/$i\x$i/apps; mv $startdir/src/$pkgname-$i.png $startdir/pkg/usr/share/icons/hicolor/$i\x$i/apps/$pkgname.png; done; }