[libperlio-eol-perl] 01/11: Imported Debian patch 0.14-1

gregor herrmann gregoa at debian.org
Fri Sep 13 14:34:53 UTC 2013


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libperlio-eol-perl.

commit bcc80fb6983b3860b5b400cc806aa274afec69e8
Author: Bastian Blank <waldi at debian.org>
Date:   Sun Apr 20 21:21:07 2008 +0200

    Imported Debian patch 0.14-1
---
 debian/bin/genorig.py |  116 +++++++++++++++++++++++++++++++++++++++++++++++++
 debian/changelog      |   20 +++++++++
 debian/compat         |    1 +
 debian/control        |   13 ++++++
 debian/copyright      |   18 ++++++++
 debian/rules          |  101 ++++++++++++++++++++++++++++++++++++++++++
 debian/watch          |    2 +
 7 files changed, 271 insertions(+)

diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py
new file mode 100644
index 0000000..98dd07f
--- /dev/null
+++ b/debian/bin/genorig.py
@@ -0,0 +1,116 @@
+#!/usr/bin/env python
+
+import os, os.path, re, shutil, sys
+
+class Changelog(list):
+    _rules = r"""
+^
+(?P<source>
+    \w[-+0-9a-z.]+
+)
+\ 
+\(
+(?P<version>
+    [^\(\)\ \t]+
+)
+\)
+\s+
+(?P<distribution>
+    [-+0-9a-zA-Z.]+
+)
+\;
+"""
+    _re = re.compile(_rules, re.X)
+
+    class Entry(object):
+        __slot__ = 'distribution', 'source', 'version'
+
+        def __init__(self, distribution, source, version):
+            self.distribution, self.source, self.version = distribution, source, version
+
+    def __init__(self, dir):
+        f = file(os.path.join(dir, "debian/changelog"))
+        while True:
+            line = f.readline()
+            if not line:
+                break
+            match = self._re.match(line)
+            if not match:
+                continue
+            self.append(self.Entry(match.group('distribution'), match.group('source'), match.group('version')))
+
+class GenOrig(object):
+    log = sys.stdout.write
+
+    def __init__(self, root, orig, input_tar, version):
+        self.orig, self.input_tar, self.version = orig, input_tar, version
+
+        changelog = Changelog(root)
+        self.source = changelog[0].source
+
+    def __call__(self):
+        import tempfile
+        self.dir = tempfile.mkdtemp(prefix = 'genorig', dir = 'debian')
+        try:
+            self.orig_dir = "%s-%s" % (self.source, self.version)
+            self.orig_tar = "%s_%s.orig.tar.gz" % (self.source, self.version)
+
+            self.do_upstream()
+            self.do_orig()
+        finally:
+            shutil.rmtree(self.dir)
+
+    def do_upstream(self):
+        self.log("Extracting tarball %s\n" % self.input_tar)
+        match = re.match(r'(^|.*/)(?P<dir>[^/]+)\.(t|tar\.)(?P<extension>(gz|bz2))$', self.input_tar)
+        if not match:
+            raise RuntimeError("Can't identify name of tarball")
+        cmdline = ['tar -xf', self.input_tar, '-C', self.dir]
+        extension = match.group('extension')
+        if extension == 'bz2':
+            cmdline.append('-j')
+        elif extension == 'gz':
+            cmdline.append('-z')
+        if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]):
+            raise RuntimeError("Can't extract tarball")
+        os.rename(os.path.join(self.dir, match.group('dir')), os.path.join(self.dir, self.orig_dir))
+
+    def do_orig(self):
+        self.log("Generating tarball %s\n" % self.orig_tar)
+        out = os.path.join(self.orig, self.orig_tar)
+
+        try:
+            os.mkdir(self.orig)
+        except OSError: pass
+        try:
+            os.stat(out)
+        except OSError: pass
+        else:
+            raise RuntimeError("Destination already exists (%s)" % out)
+
+        cmdline = ['tar -czf', out, '-C', self.dir, self.orig_dir]
+        try:
+            if os.spawnv(os.P_WAIT, '/bin/sh', ['sh', '-c', ' '.join(cmdline)]):
+                raise RuntimeError("Can't patch source")
+            os.chmod(out, 0644)
+        except:
+            try:
+                os.unlink(out)
+            except OSError:
+                pass
+            raise
+
+if __name__ == '__main__':
+    from optparse import OptionParser
+    p = OptionParser(usage = "%prog TAR VERSION")
+    options, args = p.parse_args(sys.argv)
+
+    if len(args) < 2:
+        raise RuntimeError("Need more arguments")
+
+    root = os.path.realpath(os.path.join(sys.path[0], '..', '..'))
+    orig = os.path.realpath(os.path.join(root, '..', 'orig'))
+    input_tar = args[1]
+    version = args[2]
+
+    GenOrig(root, orig, input_tar, version)()
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..4759356
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,20 @@
+libperlio-eol-perl (0.14-1) unstable; urgency=low
+
+  * New upstream version.
+  * Use external orig.
+
+ -- Bastian Blank <waldi at debian.org>  Sun, 20 Apr 2008 21:21:07 +0200
+
+libperlio-eol-perl (0.13-1.1) unstable; urgency=low
+
+  * Non-maintainer upload for the Perl 5.10 transition.
+  * Don't try to remove /usr/share/perl5 if it doesn't exist. (Closes: #463458)
+
+ -- Niko Tyni <ntyni at debian.org>  Wed, 02 Apr 2008 20:47:00 +0300
+
+libperlio-eol-perl (0.13-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Bastian Blank <waldi at debian.org>  Fri, 26 Nov 2004 13:05:56 +0100
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..b8626c4
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+4
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..f563aa8
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,13 @@
+Source: libperlio-eol-perl
+Section: perl
+Priority: optional
+Build-Depends: debhelper (>= 4.0.2), perl (>= 5.8.0-7)
+Maintainer: Bastian Blank <waldi at debian.org>
+Standards-Version: 3.6.1
+
+Package: libperlio-eol-perl
+Architecture: any
+Depends: ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}, 
+Description: PerlIO layer for normalizing line endings
+ This layer normalizes any of CR, LF, CRLF and Native encoding into the
+ designated line ending.  It works for both input and output handles.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..2dc78d4
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,18 @@
+This is the debian package for the PerlIO::eof module.
+
+It was downloaded from the Comprehensive Perl Archive Network (CPAN).
+Visit <http://www.perl.com/CPAN/> to find a CPAN site near you.
+
+The upstream author is:  Autrijus Tang <autrijus at autrijus.org>
+
+Copyright 2004 by Autrijus Tang <autrijus at autrijus.org>
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself..
+
+See http://www.perl.com/perl/misc/Artistic.html
+
+Perl is distributed under your choice of the GNU General Public License or
+the Artistic License.  On Debian GNU/Linux systems, the complete text of the
+GNU General Public License can be found in `/usr/share/common-licenses/GPL'
+and the Artistic Licence in `/usr/share/common-licenses/Artistic'.
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..646742b
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,101 @@
+#!/usr/bin/make -f
+
+SOURCE := $(shell dpkg-parsechangelog | sed -ne 's,^Source: *\(.*\)$$,\1,p')
+VERSION_DEBIAN := $(shell dpkg-parsechangelog | sed -ne 's,^Version: *\(.*\)$$,\1,p')
+VERSION := $(shell echo "$(VERSION_DEBIAN)" | sed -e 's,^[0-9]*:,,' -e 's,-[^-]*$$,,')
+
+# If set to a true value then MakeMaker's prompt function will
+# always return the default without waiting for user input.
+export PERL_MM_USE_DEFAULT=1
+
+PACKAGE = $(shell dh_listpackages)
+
+ifndef PERL
+PERL = /usr/bin/perl
+endif
+
+TMP = $(CURDIR)/debian/$(PACKAGE)
+
+CFLAGS = -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+        CFLAGS += -O0
+else
+        CFLAGS += -O2
+endif
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+
+	$(PERL) Makefile.PL INSTALLDIRS=vendor
+	$(MAKE) OPTIMIZE="$(CFLAGS)" LD_RUN_PATH=""
+
+	touch $@
+
+clean:
+	dh_testdir
+	rm -f build-stamp
+
+	-$(MAKE) realclean
+
+	dh_clean
+
+install:
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+
+	$(MAKE) test
+	$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
+	
+	[ ! -d $(TMP)/usr/share/perl5 ] || rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/share/perl5
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs 
+	dh_installexamples 
+#	dh_installmenu
+#	dh_installcron
+#	dh_installman
+	dh_installchangelogs Changes
+	dh_link
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	dh_strip
+endif
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+	dh_perl 
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+
+maintainerclean:
+	rm -rf $(filter-out .svn .svk debian, $(wildcard * .[^.]*))
+
+DIR_ORIG = ../orig/$(SOURCE)-$(VERSION)
+TAR_ORIG_NAME = $(SOURCE)_$(VERSION).orig.tar.gz
+TAR_ORIG = $(firstword $(wildcard ../$(TAR_ORIG_NAME)) $(wildcard ../orig/$(TAR_ORIG_NAME)))
+
+orig: $(DIR_ORIG)
+	rsync --delete --exclude debian --exclude .svk --exclude .svn --link-dest=$(DIR_ORIG)/ -a $(DIR_ORIG)/ .
+
+$(DIR_ORIG):
+ifeq ($(TAR_ORIG),)
+	$(error Cannot find orig tarball $(TAR_ORIG_NAME))
+else
+	mkdir -p ../orig
+	tar -C ../orig -xzf $(TAR_ORIG)
+endif
+
+.PHONY: build clean binary-indep binary-arch binary
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..c549505
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://search.cpan.org/CPAN/authors/id/A/AU/AUDREYT/PerlIO-eol-(.*)\.tar.gz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libperlio-eol-perl.git



More information about the Pkg-perl-cvs-commits mailing list