--- pyfiglet-0.4+dfsg.orig/debian/control +++ pyfiglet-0.4+dfsg/debian/control @@ -0,0 +1,23 @@ +Source: pyfiglet +Section: python +Priority: optional +Maintainer: Debian Python Modules Team +Uploaders: Stefano Rivera +Build-Depends: quilt (>= 0.46-7), debhelper (>= 7.0.50~), python-support +XS-Python-Version: all +Standards-Version: 3.8.4 +Homepage: http://sourceforge.net/projects/pyfiglet/ +Vcs-Svn: svn://svn.debian.org/python-modules/packages/pyfiglet/trunk/ +Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/pyfiglet/trunk/ + +Package: python-pyfiglet +Architecture: all +Depends: ${misc:Depends}, ${python:Depends} +Recommends: toilet-fonts +Suggests: figlet +Description: Python port of the FIGlet specification + FIGLet is a program that creates large characters out of ordinary screen + characters. It takes ASCII text and renders it in ASCII art fonts. + . + This is a Python port of the original C figlet. It can be used on the + commandline or as an Object Oriented driver library in your own programs. --- pyfiglet-0.4+dfsg.orig/debian/changelog +++ pyfiglet-0.4+dfsg/debian/changelog @@ -0,0 +1,11 @@ +pyfiglet (0.4+dfsg-1~ppa+8~karmic) karmic; urgency=low + + * Build for karmic + + -- Stefano Rivera Sat, 30 Jan 2010 00:58:09 +0200 + +pyfiglet (0.4+dfsg-1) unstable; urgency=low + + * Initial release (Closes: #564609) + + -- Stefano Rivera Thu, 28 Jan 2010 13:00:41 +0200 --- pyfiglet-0.4+dfsg.orig/debian/docs +++ pyfiglet-0.4+dfsg/debian/docs @@ -0,0 +1 @@ +README --- pyfiglet-0.4+dfsg.orig/debian/pyfiglet.1 +++ pyfiglet-0.4+dfsg/debian/pyfiglet.1 @@ -0,0 +1,50 @@ +.TH PYFIGLET "1" "January 2010" "pyfiglet 0.4" "User Commands" +.SH NAME +pyfiglet \- display text in large ASCII art fonts. +.SH SYNOPSIS +.B pyfiglet.py +[\fIoptions\fR] \fItext\fR... +.SH DESCRIPTION +pyFIGlet is a program that creates large characters out of ordinary +screen characters. +It takes ASCII text (\fItext\fR) and renders it in ASCII art fonts. +.P +This version of pyfiglet supports FIGlet fonts \fB.flf\fR and +the FIGlet-compatible toilet-fonts \fB.tlf\fR. +.SH OPTIONS +.TP +\fB\-\-version\fR +show program's version number and exit +.TP +\fB\-h\fR, \fB\-\-help\fR +show this help message and exit +.TP +\fB\-f\fR FONT, \fB\-\-font\fR=\fIFONT\fR +font to render with (default: future) +.TP +\fB\-d\fR DIR, \fB\-\-fontdir\fR=\fIDIR\fR +location of font files +.TP +\fB\-z\fR ZIPFILE, \fB\-\-zipfile\fR=\fIZIPFILE\fR +specify a zipfile to use instead of a directory of +fonts +.TP +\fB\-D\fR DIRECTION, \fB\-\-direction\fR=\fIDIRECTION\fR +set direction text will be formatted in (default: +auto) +.TP +\fB\-j\fR SIDE, \fB\-\-justify\fR=\fISIDE\fR +set justification, defaults to print direction +.TP +\fB\-w\fR COLS, \fB\-\-width\fR=\fICOLS\fR +set terminal width for wrapping/justification +(default: 80) +.TP +\fB\-r\fR, \fB\-\-reverse\fR +shows mirror image of output text +.TP +\fB\-F\fR, \fB\-\-flip\fR +flips rendered output text over +.SH "SEE ALSO" +.BR toilet (1), +.BR figlet (1) --- pyfiglet-0.4+dfsg.orig/debian/compat +++ pyfiglet-0.4+dfsg/debian/compat @@ -0,0 +1 @@ +7 --- pyfiglet-0.4+dfsg.orig/debian/watch +++ pyfiglet-0.4+dfsg/debian/watch @@ -0,0 +1,4 @@ +version=3 + +opts=dversionmangle=s/\+dfsg// \ +http://sf.net/pyfiglet/pyfiglet-(.*)\.tar\.bz2 --- pyfiglet-0.4+dfsg.orig/debian/copyright +++ pyfiglet-0.4+dfsg/debian/copyright @@ -0,0 +1,37 @@ +Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=135 +Name: pyfiglet +Maintainer: Christopher Jones +Source: http://sourceforge.net/projects/pyfiglet/ + +Files: * +Copyright: 2007, Christopher Jones +License: GPL-2+ +X-Repackage-Comment: + The upstream for this package includes non-distributable items is the release + tarball: + * fonts.zip - a collection of figlet fonts from ftp.figlet.org + * figfont.txt - the Figlet specification + Both clearly non-distributable, as described here http://bugs.debian.org/274950 + . + Instead of the included fonts, this package can use the fonts provided by + toilet-fonts or figlet in /usr/share/figlet. + . + Upstream bug: https://sourceforge.net/tracker/?func=detail&aid=2933719&group_id=200820&atid=975074 + +Files: debian/* +Copyright: 2010, Stefano Rivera +License: GPL-2+ + +Licence: GPL-2+ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + . + On Debian systems, the complete text of the GNU General Public License + version 2 can be found in the /usr/share/common-licenses/GPL-2 file. --- pyfiglet-0.4+dfsg.orig/debian/rules +++ pyfiglet-0.4+dfsg/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +%: + dh --with quilt $@ + +override_dh_installman: + dh_installman debian/*.1 + +get-orig-source: + VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^+]+).*,\1,p'); \ + uscan --noconf --force-download --rename --download-version=$$VER --destdir=.; \ + tar -x --exclude=fonts.zip --exclude=figfont.txt -f pyfiglet_$$VER.orig.tar.bz2; \ + tar -czf pyfiglet_$$VER+dfsg.orig.tar.gz pyfiglet-$$VER; \ + rm -f pyfiglet_$$VER.orig.tar.bz2; \ + rm -rf pyfiglet-$$VER --- pyfiglet-0.4+dfsg.orig/debian/source/format +++ pyfiglet-0.4+dfsg/debian/source/format @@ -0,0 +1 @@ +1.0 --- pyfiglet-0.4+dfsg.orig/debian/patches/dir-error-path.diff +++ pyfiglet-0.4+dfsg/debian/patches/dir-error-path.diff @@ -0,0 +1,24 @@ +Description: The directory-tree handling code is poorer quality than the Zip + file code. This corrects some non-existant variable accessing. +Author: Stefano Rivera +Forwarded: https://sourceforge.net/tracker/?func=detail&aid=2939614&group_id=200820&atid=975076 +Last Update: 2010-01-25 + +--- a/pyfiglet.py ++++ b/pyfiglet.py +@@ -104,13 +104,13 @@ + + header = data.pop(0) + if self.reMagicNumber.search(header) is None: +- raise FontError, '%s is not a valid figlet font' % fontPath ++ raise FontError, '%s is not a valid figlet font' % self.font + + header = self.reMagicNumber.sub('', header) + header = header.split() + + if len(header) < 6: +- raise FontError, 'malformed header for %s' % fontPath ++ raise FontError, 'malformed header for %s' % self.font + + hardBlank = header[0] + height, baseLine, maxLength, oldLayout, commentLines = map(int, header[1:6]) --- pyfiglet-0.4+dfsg.orig/debian/patches/tlf-support.diff +++ pyfiglet-0.4+dfsg/debian/patches/tlf-support.diff @@ -0,0 +1,79 @@ +Description: Add support for toilet's .tlf files. + There are .tlf files which are compatible with figlet. +Author: Stefano Rivera +Forwarded: https://sourceforge.net/tracker/?func=detail&aid=2939616&group_id=200820&atid=975076 +Last Update: 2010-01-25 + +--- a/pyfiglet.py ++++ b/pyfiglet.py +@@ -62,7 +62,7 @@ + self.width = {} + self.data = None + +- self.reMagicNumber = re.compile(r'^flf2.') ++ self.reMagicNumber = re.compile(r'^[ft]lf2.') + self.reEndMarker = re.compile(r'(.)\s*$') + + self.readFontFile() +@@ -73,8 +73,11 @@ + a superclass to create different font sources. + """ + def readFontFile(self): +- fontPath = '%s/%s.flf' % (self.dir, self.font) +- if os.path.exists(fontPath) is False: ++ for ext in ('flf', 'tlf'): ++ fontPath = '%s/%s.%s' % (self.dir, self.font, ext) ++ if os.path.exists(fontPath): ++ break ++ else: + raise FontNotFound, "%s doesn't exist" % fontPath + + try: +@@ -86,7 +89,8 @@ + finally: fo.close() + + def getFonts(self): +- return [font[:-4] for font in os.walk(self.dir).next()[2] if font.endswith('.flf')] ++ return [font[:-4] for font in os.walk(self.dir).next()[2] ++ if font.endswith('.flf') or font.endswith('.tlf')] + + + +@@ -228,25 +232,27 @@ + if os.path.exists(self.zipfile) is False: + raise FontNotFound, "%s doesn't exist" % self.zipfile + +- fontPath = 'fonts/%s.flf' % self.font ++ for ext in ('.flf', '.tlf'): ++ fontPath = 'fonts/%s.%s' % (self.font, ext) + +- try: +- z = ZipFile(self.zipfile, 'r') +- files = z.namelist() +- if fontPath not in files: +- raise FontNotFound, '%s not found in %s' % (self.font, self.zipfile) ++ try: ++ z = ZipFile(self.zipfile, 'r') ++ files = z.namelist() ++ if fontPath not in files: ++ raise FontNotFound, '%s not found in %s' % (self.font, self.zipfile) + +- self.data = z.read(fontPath) ++ self.data = z.read(fontPath) + +- except Exception, e: +- raise FontError, "couldn't open %s: %s" % (fontPath, e) ++ except Exception, e: ++ raise FontError, "couldn't open %s: %s" % (fontPath, e) + + def getFonts(self): + if os.path.exists(self.zipfile) is False: + raise FontNotFound, "%s doesn't exist" % self.zipfile + + z = ZipFile(self.zipfile, 'r') +- return [font[6:-4] for font in z.namelist() if font.endswith('.flf')] ++ return [font[6:-4] for font in z.namelist() ++ if font.endswith('.flf') and font.endswith('.tlf')] + + + --- pyfiglet-0.4+dfsg.orig/debian/patches/setup.py.diff +++ pyfiglet-0.4+dfsg/debian/patches/setup.py.diff @@ -0,0 +1,38 @@ +Description: No setup.py in upstream. + This is a very simple one, only really suitable for the deb. +Author: Stefano Rivera +Forwarded: https://sourceforge.net/tracker/?func=detail&aid=2933718&group_id=200820&atid=975074 +Last-Update: 2010-01-30 + +--- /dev/null ++++ b/setup.py +@@ -0,0 +1,13 @@ ++#!/usr/bin/python ++ ++from distutils.core import setup ++ ++setup(name='pyfiglet', ++ version='0.4', ++ description='Pure-python FIGlet implementation', ++ author='Christopher Jones', ++ author_email='cjones@insub.org', ++ url='http://sourceforge.net/projects/pyfiglet/', ++ py_modules=['pyfiglet'], ++ scripts=['pyfiglet'], ++) +--- /dev/null ++++ b/pyfiglet +@@ -0,0 +1,13 @@ ++#!/usr/bin/python ++ ++from sys import stderr, exit ++ ++from pyfiglet import main, FontNotFound ++ ++try: ++ main() ++except FontNotFound: ++ stderr.write('Font not found or not compatible. ' ++ 'Please install the toilet-fonts or figlet package for fonts.\n' ++ "Note that not all toilet's .tlf fonts are compatible.\n") ++ exit(1) --- pyfiglet-0.4+dfsg.orig/debian/patches/debian-defaults.diff +++ pyfiglet-0.4+dfsg/debian/patches/debian-defaults.diff @@ -0,0 +1,48 @@ +Description: Change defaults to be toilet-compatible (font: future), and set + the fontdir to the location of figlet fonts in debian: /usr/share/figlet +Author: Stefano Rivera +Forwarded: not-needed +Last-Update: 2010-01-25 + +--- a/pyfiglet.py ++++ b/pyfiglet.py +@@ -53,7 +53,7 @@ + meta-data about how it should be displayed by default + """ + class FigletFont(object): +- def __init__(self, dir='.', font='standard'): ++ def __init__(self, dir='.', font='future'): + self.dir = dir + self.font = font + +@@ -224,7 +224,7 @@ + Use this Font class if it exists inside of a zipfile. + """ + class ZippedFigletFont(FigletFont): +- def __init__(self, dir='.', font='standard', zipfile='fonts.zip'): ++ def __init__(self, dir='.', font='future', zipfile='fonts.zip'): + self.zipfile = zipfile + FigletFont.__init__(self, dir=dir, font=font) + +@@ -462,7 +462,7 @@ + Main figlet class. + """ + class Figlet(object): +- def __init__(self, dir=None, zipfile=None, font='standard', direction='auto', justify='auto', width=80): ++ def __init__(self, dir=None, zipfile=None, font='future', direction='auto', justify='auto', width=80): + self.dir = dir + self.font = font + self._direction = direction +@@ -540,10 +540,10 @@ + + parser = OptionParser(version=__version__, usage='%prog [options] text..') + +- parser.add_option( '-f', '--font', default='standard', ++ parser.add_option( '-f', '--font', default='future', + help='font to render with (default: %default)', metavar='FONT' ) + +- parser.add_option( '-d', '--fontdir', default=None, ++ parser.add_option( '-d', '--fontdir', default='/usr/share/figlet', + help='location of font files', metavar='DIR' ) + + parser.add_option( '-z', '--zipfile', default=dir+'/fonts.zip', --- pyfiglet-0.4+dfsg.orig/debian/patches/series +++ pyfiglet-0.4+dfsg/debian/patches/series @@ -0,0 +1,4 @@ +dir-error-path.diff +tlf-support.diff +debian-defaults.diff +setup.py.diff