summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2006-09-09 17:16:14 +0200
committerGuido Guenther <agx@bogon.sigxcpu.org>2006-09-09 17:16:14 +0200
commit919779e2f12062d4dc6e6fa2f59c2d53e1c782f6 (patch)
tree59ae56f6a5bcbe67fad9b29b8e4347ebbc5ecb85
parent0f963fa4c3d05e0f8b297aeb20aa5d719f7ab31d (diff)
add debian dir
-rw-r--r--debian/changelog16
-rw-r--r--debian/compat1
-rw-r--r--debian/control14
-rw-r--r--debian/copyright68
-rw-r--r--debian/docs2
-rw-r--r--debian/patches/base.patch74
-rw-r--r--debian/patches/disable-ez_setup.diff15
-rw-r--r--debian/patches/icalendar.patch83
-rw-r--r--debian/patches/series2
-rw-r--r--debian/pycompat1
-rw-r--r--debian/pyversions1
-rwxr-xr-xdebian/rules12
12 files changed, 289 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..7946c35
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,16 @@
+python-vobject (0.0.svn147-2) unstable; urgency=low
+
+ * set pyversions
+ * rm debian/dirs
+
+ -- Guido Guenther <agx@sigxcpu.org> Thu, 7 Sep 2006 16:23:55 +0200
+
+python-vobject (0.0.svn147-1) unstable; urgency=low
+
+ * Initial release (Closes: #386254)
+ * import icalendar.patch and base.patch:
+ http://trac.macosforge.org/projects/calendarserver/browser/CalendarServer/trunk/patches/vObject/base.patch
+ http://trac.macosforge.org/projects/calendarserver/browser/CalendarServer/trunk/patches/vObject/icalendar.patch
+
+ -- Guido Guenther <agx@sigxcpu.org> Wed, 6 Sep 2006 11:04:33 +0200
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7ed6ff8
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..c3c69fc
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,14 @@
+Source: python-vobject
+Section: python
+Priority: optional
+Maintainer: Guido Guenther <agx@sigxcpu.org>
+Build-Depends: cdbs, debhelper (>= 5), quilt, python-dev, python-support (>= 0.3)
+Standards-Version: 3.7.2
+
+Package: python-vobject
+Architecture: all
+Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, python-dateutil
+Description: parse iCalendar and VCards in python
+ Parses iCalendar and vCard files into Python data structures, decoding the
+ relevant encodings. Also serializes vobject data structures to valid iCalendar
+ or vCard unicode strings.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..c4a83b7
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,68 @@
+This package was debianized by Guido Guenther <agx@sigxcpu.org> on
+Wed, 6 Sep 2006 11:04:33 +0200.
+
+It was downloaded from http://svn.osafoundation.org/vobject/trunk/
+
+Upstream Author: Jeffrey Harris <jeffrey@osafoundation.org>
+
+Copyright (c) 2004-2006 Jeffrey Harris. All rights reserved.
+
+License:
+
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2004-2006 Jeffrey Harris. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ * Portions of this software are based upon public domain software
+ * originally written at the National Center for Supercomputing Applications,
+ * University of Illinois, Urbana-Champaign.
+ */
+
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..b4516e8
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,2 @@
+ACKNOWLEDGEMENTS.txt
+README.txt
diff --git a/debian/patches/base.patch b/debian/patches/base.patch
new file mode 100644
index 0000000..cd3b4bf
--- /dev/null
+++ b/debian/patches/base.patch
@@ -0,0 +1,74 @@
+Index: src/vobject/base.py
+===================================================================
+--- src/vobject/base.py (revision 147)
++++ src/vobject/base.py (working copy)
+@@ -1,5 +1,6 @@
+ """vobject module for reading vCard and vCalendar files."""
+
++import copy
+ import re
+ import sys
+ import logging
+@@ -56,6 +57,12 @@
+ self.parentBehavior = None
+ self.isNative = False
+
++ def copy(self, copyit):
++ self.group = copyit.group
++ self.behavior = copyit.behavior
++ self.parentBehavior = copyit.parentBehavior
++ self.isNative = copyit.isNative
++
+ def validate(self, *args, **kwds):
+ """Call the behavior's validate method, or return True."""
+ if self.behavior:
+@@ -250,6 +257,21 @@
+ if qp:
+ self.value = str(self.value).decode('quoted-printable')
+
++ @classmethod
++ def duplicate(clz, copyit):
++ newcopy = clz('', {}, '')
++ newcopy.copy(copyit)
++ return newcopy
++
++ def copy(self, copyit):
++ super(ContentLine, self).copy(copyit)
++ self.name = copyit.name
++ self.value = copy.copy(copyit.value)
++ self.encoded = self.encoded
++ self.params = copy.copy(copyit.params)
++ self.singletonparams = copy.copy(copyit.singletonparams)
++ self.lineNumber = copyit.lineNumber
++
+ def __eq__(self, other):
+ try:
+ return (self.name == other.name) and (self.params == other.params) and (self.value == other.value)
+@@ -361,6 +383,27 @@
+
+ self.autoBehavior()
+
++ @classmethod
++ def duplicate(clz, copyit):
++ newcopy = clz()
++ newcopy.copy(copyit)
++ return newcopy
++
++ def copy(self, copyit):
++ super(Component, self).copy(copyit)
++
++ # deep copy of contents
++ self.contents = {}
++ for key, lvalue in copyit.contents.items():
++ newvalue = []
++ for value in lvalue:
++ newitem = value.duplicate(value)
++ newvalue.append(newitem)
++ self.contents[key] = newvalue
++
++ self.name = copyit.name
++ self.useBegin = copyit.useBegin
++
+ def setProfile(self, name):
+ """Assign a PROFILE to this unnamed component.
+
diff --git a/debian/patches/disable-ez_setup.diff b/debian/patches/disable-ez_setup.diff
new file mode 100644
index 0000000..7349871
--- /dev/null
+++ b/debian/patches/disable-ez_setup.diff
@@ -0,0 +1,15 @@
+Index: python-vobject-154/setup.py
+===================================================================
+--- python-vobject-154.orig/setup.py 2006-09-06 11:16:58.000000000 +0200
++++ python-vobject-154/setup.py 2006-09-06 11:17:14.000000000 +0200
+@@ -6,10 +6,6 @@
+ Requires dateutil (https://moin.conectiva.com.br/DateUtil) 0.9 or later.
+ """
+
+-# not using setuptools until Chandler's ready for eggs
+-from ez_setup import use_setuptools
+-use_setuptools()
+-
+ from setuptools import setup, find_packages
+
+ #from distutils.core import setup
diff --git a/debian/patches/icalendar.patch b/debian/patches/icalendar.patch
new file mode 100644
index 0000000..92322f1
--- /dev/null
+++ b/debian/patches/icalendar.patch
@@ -0,0 +1,83 @@
+Index: src/vobject/icalendar.py
+===================================================================
+--- src/vobject/icalendar.py (revision 147)
++++ src/vobject/icalendar.py (working copy)
+@@ -374,8 +374,17 @@
+ try:
+ dtstart = self.dtstart.value
+ except AttributeError, KeyError:
+- # if there's no dtstart, just return None
+- return None
++ # Special for VTODO - try DUE property instead
++ try:
++ if self.name == "VTODO":
++ dtstart = self.due.value
++ else:
++ # if there's no dtstart, just return None
++ return None
++ except AttributeError, KeyError:
++ # if there's no due, just return None
++ return None
++
+ # rrulestr complains about unicode, so cast to str
+ rule = dateutil.rrule.rrulestr(str(line.value),
+ dtstart=dtstart)
+@@ -380,7 +389,7 @@
+ rule = dateutil.rrule.rrulestr(str(line.value),
+ dtstart=dtstart)
+ until = rule._until
+- if until is not None and until.tzinfo != dtstart.tzinfo:
++ if until is not None and isinstance(dtstart, datetime.datetime) and (until.tzinfo != dtstart.tzinfo):
+ # dateutil converts the UNTIL date to a datetime,
+ # check to see if the UNTIL parameter value was a date
+ vals = dict(pair.split('=') for pair in
+@@ -417,7 +426,16 @@
+ return rruleset
+
+ def setrruleset(self, rruleset):
+- dtstart = self.dtstart.value
++
++ # Get DTSTART from component (or DUE if no DTSTART in a VTODO)
++ try:
++ dtstart = self.dtstart.value
++ except AttributeError, KeyError:
++ if self.name == "VTODO":
++ dtstart = self.due.value
++ else:
++ raise
++
+ isDate = datetime.date == type(dtstart)
+ if isDate:
+ dtstart = datetime.datetime(dtstart.year,dtstart.month, dtstart.day)
+@@ -573,6 +591,8 @@
+ if obj.value.tzinfo is None:
+ obj.params['X-VOBJ-FLOATINGTIME-ALLOWED'] = ['TRUE']
+ if obj.params.get('TZID'):
++ # Keep a copy of the original TZID around
++ obj.params['X-VOBJ-ORIGINAL-TZID'] = obj.params['TZID']
+ del obj.params['TZID']
+ return obj
+
+@@ -585,6 +605,10 @@
+ obj.value = dateTimeToString(obj.value, cls.forceUTC)
+ if not cls.forceUTC and tzid is not None:
+ obj.tzid_param = tzid
++ if obj.params.get('X-VOBJ-ORIGINAL-TZID'):
++ if not hasattr(obj, 'tzid_param'):
++ obj.tzid_param = obj.params['X-VOBJ-ORIGINAL-TZID']
++ del obj.params['X-VOBJ-ORIGINAL-TZID']
+
+ return obj
+
+@@ -605,7 +629,10 @@
+ obj.value=str(obj.value)
+ obj.value=parseDtstart(obj)
+ if getattr(obj, 'value_param', 'DATE-TIME').upper() == 'DATE-TIME':
+- if hasattr(obj, 'tzid_param'): del obj.tzid_param
++ if hasattr(obj, 'tzid_param'):
++ # Keep a copy of the original TZID around
++ obj.params['X-VOBJ-ORIGINAL-TZID'] = obj.tzid_param
++ del obj.tzid_param
+ return obj
+
+ @staticmethod
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e576710
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+base.patch -p0
+icalendar.patch -p0
diff --git a/debian/pycompat b/debian/pycompat
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/debian/pycompat
@@ -0,0 +1 @@
+2
diff --git a/debian/pyversions b/debian/pyversions
new file mode 100644
index 0000000..8b253bc
--- /dev/null
+++ b/debian/pyversions
@@ -0,0 +1 @@
+2.4-
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..c2d9f6f
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,12 @@
+#!/usr/bin/make -f
+
+DEB_TAR_SRCDIR := python-vobject
+DEB_AUTO_CLEANUP_RCS := yes
+
+DEB_PYTHON_SYSTEM = pysupport
+DEB_PYTHON_CLEAN_ARGS = --all
+
+# Add here any variable or target overrides you need
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/python-distutils.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk