Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=xfcetesting.git;a=commitdiff;h=5251a0dbbabf1ce26be97f4eca836f45c1258610

commit 5251a0dbbabf1ce26be97f4eca836f45c1258610
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Sun Jan 30 16:16:09 2011 +0100

wicd-1.7.0-1-i686
*back to stable version
*added patch for python 2.7
*fixes rc script
*added systemd support
*I've restarted sometimes all works (with systemd)
*now wait if users will already cry for some dbus errors

diff --git a/source/xapps-extra/wicd/FrugalBuild 
b/source/xapps-extra/wicd/FrugalBuild
index 8de8e5c..286ff34 100644
--- a/source/xapps-extra/wicd/FrugalBuild
+++ b/source/xapps-extra/wicd/FrugalBuild
@@ -2,21 +2,23 @@
# Maintainer: bouleetbil <bouleet...@frogdev.info>

pkgname=wicd
-pkgver=1.7.1b2
-pkgrel=2
+pkgver=1.7.0
+pkgrel=1
pkgdesc="A wired and wireless network manager for Linux"
depends=('dbus-python' 'pygtk' 'dhcp' 'dhcpcd' 'wireless_tools' 
'wpa_supplicant'\
'ethtool' 'python>=2.7' 'urwid' 'python-wpactrl' 'python-iwscan')
groups=('xapps-extra')
archs=('i686' 'x86_64' 'ppc')
-options=('scriptlet')
+options=('scriptlet' 'force')
_F_gnome_iconcache="y"
_F_gnome_desktop="y"
_F_sourceforge_realname="wicd-stable"
Finclude sourceforge gnome-scriptlet
-source=($source rc.wicd)
-sha1sums=('a7349537c6d3a2fdd0729b369f4ee6d33a6528a9' \
-          '3c4a5da2f7fa818517029921e0a389cc443e993e')
+source=($source rc.wicd wicd.service deopcopy.diff)
+sha1sums=('76d9c0ad7b020ff1abac5c92c301739a04d5595e' \
+          '09c87f876e24b42ad1512277256b01638a182db9' \
+          '682d90437dadd5e7043f9d82c98bd9dab3985582' \
+          '90c81ca12ef5cf7ebca6fed700af45a3af226645')

build() {
Fcd
@@ -25,5 +27,7 @@ build() {
python ./setup.py build || Fdie
Fmakeinstall
Frcd2 wicd
+       Fmkdir lib/systemd/system/
+       Finstall 0644 wicd.service /lib/systemd/system/wicd.service
Fbuild_gnome_scriptlet
}
diff --git a/source/xapps-extra/wicd/deopcopy.diff 
b/source/xapps-extra/wicd/deopcopy.diff
new file mode 100644
index 0000000..47989e8
--- /dev/null
+++ b/source/xapps-extra/wicd/deopcopy.diff
@@ -0,0 +1,50 @@
+diff -up wicd-1.7.0/wicd/configmanager.py.deepcopy 
wicd-1.7.0/wicd/configmanager.py
+--- wicd-1.7.0/wicd/configmanager.py.deepcopy  2010-01-14 18:49:11.000000000 
-1000
++++ wicd-1.7.0/wicd/configmanager.py   2010-10-22 10:18:14.000000000 -1000
+@@ -25,6 +25,7 @@ reusable for other purposes as well.
+ #
+
+ import os, copy
++import cPickle
+
+ from ConfigParser import RawConfigParser
+
+@@ -35,7 +36,7 @@ from dbus import Int32
+ class ConfigManager(RawConfigParser):
+     """ A class that can be used to manage a given configuration file. """
+     def __init__(self, path, debug=False, mark_whitespace="`'`"):
+-        RawConfigParser.__init__(self)
++        RawConfigParser.__init__(self, allow_no_value = True)
+         self.config_file = path
+         self.debug = debug
+         self.mrk_ws = mark_whitespace
+@@ -67,7 +68,7 @@ class ConfigManager(RawConfigParser):
+             if value.startswith(' ') or value.endswith(' '):
+                 value = "%(ws)s%(value)s%(ws)s" % {"value" : value,
+                                                    "ws" : self.mrk_ws}
+-        RawConfigParser.set(self, section, str(option), value)
++        RawConfigParser.set(self, section, str(option), "None" if value is 
None else value)
+         if write:
+             self.write()
+
+@@ -176,9 +177,7 @@ class ConfigManager(RawConfigParser):
+
+
+     def _copy_section(self, name):
+-        # Yes, deepcopy sucks, but it is robust to changes in both
+-        # this class and RawConfigParser.
+-        p = copy.deepcopy(self)
++        p = cPickle.loads(cPickle.dumps(self, -1))
+         for sname in p.sections():
+             if sname != name:
+                 p.remove_section(sname)
+@@ -188,8 +187,7 @@ class ConfigManager(RawConfigParser):
+
+     def write(self):
+         """ Writes the loaded config file to disk. """
+-        # Really don't like this deepcopy.
+-        p = copy.deepcopy(self)
++        p = cPickle.loads(cPickle.dumps(self, -1))
+         for sname in p.sections():
+             fname = p.get_option(sname, '_filename_')
+             if fname and fname != self.config_file:
diff --git a/source/xapps-extra/wicd/rc.wicd b/source/xapps-extra/wicd/rc.wicd
index 434066a..0c87809 100644
--- a/source/xapps-extra/wicd/rc.wicd
+++ b/source/xapps-extra/wicd/rc.wicd
@@ -31,8 +31,7 @@ rc_stop()
{
stop_msg
if [[ "$(eval $pid)" != "" ]] ; then
-               killall wicd
-               rm -f /var/run/wicd/wicd.pid
+               /usr/sbin/wicd -k
ok $?
else
ok 999
diff --git a/source/xapps-extra/wicd/wicd.service 
b/source/xapps-extra/wicd/wicd.service
new file mode 100644
index 0000000..f30fc3a
--- /dev/null
+++ b/source/xapps-extra/wicd/wicd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Wicd a wireless and wired network manager for Linux
+After=syslog.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/wicd
+ExecStop=/usr/sbin/wicd -k
+
+[Install]
+WantedBy=multi-user.target
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to