r73779 - in /trunk/libxml-writer-simple-perl/debian: ./ changelog compat control copyright hgpkg libxml-writer-simple-perl.docs rules source/ source/format source/options watch
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Thu Apr 28 23:59:16 UTC 2011
Author: gregoa
Date: Thu Apr 28 23:59:09 2011
New Revision: 73779
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=73779
Log:
[svn-inject] Applying Debian modifications (0.05-1) to trunk
Added:
trunk/libxml-writer-simple-perl/debian/
trunk/libxml-writer-simple-perl/debian/changelog
trunk/libxml-writer-simple-perl/debian/compat
trunk/libxml-writer-simple-perl/debian/control
trunk/libxml-writer-simple-perl/debian/copyright
trunk/libxml-writer-simple-perl/debian/hgpkg (with props)
trunk/libxml-writer-simple-perl/debian/libxml-writer-simple-perl.docs
trunk/libxml-writer-simple-perl/debian/rules (with props)
trunk/libxml-writer-simple-perl/debian/source/
trunk/libxml-writer-simple-perl/debian/source/format
trunk/libxml-writer-simple-perl/debian/source/options
trunk/libxml-writer-simple-perl/debian/watch
Added: trunk/libxml-writer-simple-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-writer-simple-perl/debian/changelog?rev=73779&op=file
==============================================================================
--- trunk/libxml-writer-simple-perl/debian/changelog (added)
+++ trunk/libxml-writer-simple-perl/debian/changelog Thu Apr 28 23:59:09 2011
@@ -1,0 +1,5 @@
+libxml-writer-simple-perl (0.05-1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Adrian von Bidder <cmot at debian.org> Wed, 6 Apr 2011 11:55:54 +0200
Added: trunk/libxml-writer-simple-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-writer-simple-perl/debian/compat?rev=73779&op=file
==============================================================================
--- trunk/libxml-writer-simple-perl/debian/compat (added)
+++ trunk/libxml-writer-simple-perl/debian/compat Thu Apr 28 23:59:09 2011
@@ -1,0 +1,1 @@
+7
Added: trunk/libxml-writer-simple-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-writer-simple-perl/debian/control?rev=73779&op=file
==============================================================================
--- trunk/libxml-writer-simple-perl/debian/control (added)
+++ trunk/libxml-writer-simple-perl/debian/control Thu Apr 28 23:59:09 2011
@@ -1,0 +1,17 @@
+Source: libxml-writer-simple-perl
+Section: perl
+Priority: optional
+Build-Depends: debhelper (>= 7)
+Build-Depends-Indep: perl, libxml-dt-perl, libxml-dtdparser-perl
+Maintainer: Adrian von Bidder <cmot at debian.org>
+Standards-Version: 3.9.1
+Homepage: http://search.cpan.org/dist/XML-Writer-Simple/
+Vcs-Browser: https://fortytwo.ch/hg/avbidder/pkg-libxml-writer-simple-perl/
+Vcs-Hg: https://fortytwo.ch/hg/avbidder/pkg-libxml-writer-simple-perl/
+
+Package: libxml-writer-simple-perl
+Architecture: all
+Depends: ${misc:Depends}, ${perl:Depends}
+Description: simple API to create XML files
+ This module takes some ideas from CGI to make easier the life for those who
+ need to generated XML code.
Added: trunk/libxml-writer-simple-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-writer-simple-perl/debian/copyright?rev=73779&op=file
==============================================================================
--- trunk/libxml-writer-simple-perl/debian/copyright (added)
+++ trunk/libxml-writer-simple-perl/debian/copyright Thu Apr 28 23:59:09 2011
@@ -1,0 +1,28 @@
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Maintainer: Alberto Simoes <ambs at cpan.org>
+Source: http://search.cpan.org/dist/XML-Writer-Simple/
+Name: XML-Writer-Simple
+
+Files: *
+Copyright: 2006, Alberto Simoes <ambs at cpan.org>
+License: Artistic or GPL-1
+
+Files: debian/*
+Copyright: 2011, Adrian von Bidder <cmot at debian.org>
+License: Artistic or GPL-1+
+
+License: Artistic
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the Artistic License, which comes with Perl.
+ .
+ On Debian systems, the complete text of the Artistic License can be
+ found in `/usr/share/common-licenses/Artistic'.
+
+License: GPL-1+
+ 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 1, or (at your option)
+ any later version.
+ .
+ On Debian systems, the complete text of version 1 of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL-1'.
Added: trunk/libxml-writer-simple-perl/debian/hgpkg
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-writer-simple-perl/debian/hgpkg?rev=73779&op=file
==============================================================================
--- trunk/libxml-writer-simple-perl/debian/hgpkg (added)
+++ trunk/libxml-writer-simple-perl/debian/hgpkg Thu Apr 28 23:59:09 2011
@@ -1,0 +1,202 @@
+#! /bin/bash
+#
+# ©2009 Adrian von Bidder
+#
+# Manage Debian packages stored in Mercurial repositories.
+# Included here since it's not packaged at this time
+# hgpkg version 1.2.1
+#
+
+set -e
+#set -x
+
+###
+# general helpers
+
+function onlinehelp() {
+ echo "Commands:
+ import <path> <version>: import new upstream source
+ buildfull: build the orig.tar.bz2 and the Debian package
+ build: build the Debian package
+ markdeb: tag a version (after upload)"
+}
+
+# get package name from Debian changelog and
+# check that 'hg st' generates no output
+function preparedir() {
+ lines=`hg st | wc -l`
+ if [ "$lines" != "0" ]; then
+ echo "Error: Mercurial repository is not clean."
+ exit 1
+ fi
+
+ branch=`hg branch`
+ if [ "$branch" == "upstream" ]; then
+ echo "Warning: called in upstream branch, switching to default."
+ hg update -r default >> "$LOG"
+ branch=`hg branch`
+ fi
+ if [ "$branch" != "default" ]; then
+ echo "Error: must be called in default branch of repository."
+ exit 1
+ fi
+
+ # need to be in root dir:
+ root=`hg root`
+ cd "$root"
+
+ PKGNAME=`dpkg-parsechangelog 2>> "$LOG" | grep ^Source: | cut -f 2 -d \ `
+ if [ -z "$PKGNAME" ]; then
+ echo "Error: can't find package name."
+ exit 1
+ fi
+}
+
+###
+# subcommands
+
+# import new upstream version from subversion
+function cmd_import() {
+ srcpath="$1"
+ srcver="$2"
+
+ # need to convert srcpath to an absolute path
+ if [ ! -d "$srcpath" ]; then
+ echo "Error: $srcpath doesn't exist."
+ rm -rf "$WORKDIR"
+ exit 1
+ fi
+ srcpath=`cd "$srcpath"; pwd`
+
+ # check: is source a svn dir?
+ if [ -d "$srcpath/.svn" ]; then
+ svn="yes"
+ fi
+
+ # switching to upstream may leave .hgignore'd files around that will then
+ # be included. Work on a cloned repo instead:
+ hg clone . "$WORKDIR"/"$PKGNAME" >> "$LOG"
+ pushd . >/dev/null
+ cd "$WORKDIR"/"$PKGNAME"
+
+ # switch to upstream branch
+ hg update -r upstream >> "$LOG"
+ br=`hg branch`
+ if [ "$br" != "upstream" ]; then
+ echo "Unexpected: I'm not in the upstream branch after update!"
+ exit 1
+ fi
+
+ # check: do we already know about this version?
+ tag="UPSTREAM_${PKGNAME}_$srcver"
+ if hg tags | grep -q "$tag"; then
+ echo "Error: Version already imported: tag '$tag' already exists."
+ popd >/dev/null
+ rm -rf "$WORKDIR" # since this is just a user error...
+ exit 1
+ fi
+
+ # ok, now let's be brave:
+ # if we did right, we're at the root of the cloned repo
+ # at the tip of the upstream branch.
+ rm -rf ./*
+
+ # import (--force is needed because .hg dir is still in current dir.)
+ if [ "$svn" == "yes" ]; then
+ svn export --force "$srcpath" . >> "$LOG"
+ else
+ cp -r "$srcpath"/* .
+ fi
+
+ lines=`hg st | wc -l`
+ if [ "$lines" == "0" ]; then
+ echo "Error: no changes imported."
+ popd >/dev/null
+ rm -rf "$WORKDIR" # since this is just a user error...
+ exit 1
+ fi
+
+ # and commit
+ hg addremove
+ hg ci -m "hgpkg import: $PKGNAME $srcver"
+ hg tag "$tag"
+
+ # push upstream changes back into the working repo and merge
+ # usually creates a new head, so --force.
+ hg push -f >> "$LOG"
+ popd > /dev/null
+ # TODO: find a way to auto-fix the expected merge conflict in .hgtags
+ hg merge upstream || \
+ echo "Warning: merge failed."
+ dch -D UNRELEASED -v "$srcver-1" "New upstream version."
+ # TODO dch fails if version is older than last version.
+ # Proper fix would be to check this right at the start of import...
+ # Leaving this right now since dch fails loudly and the error message
+ # seems clear enough.
+ echo "Success: default (Debian) branch left with ucommitted merge."
+}
+
+# build orig tar and build package
+function cmd_buildfull() {
+ # TODO use latest UPSTREAM tag instead? Or at least learn sed properly
+ # and get rid of the separate grep.
+ upstream=`dpkg-parsechangelog \
+ | grep ^Version: | sed -e's/^Version: \(.*\)-.*/\1/'`
+
+ # use hg archive to build tar
+ archive="../${PKGNAME}_$upstream.orig.tar.gz"
+ rm -f "$archive"
+ hg update -r upstream >> "$LOG"
+ hg archive -t tgz -X .hgtags -p "$PKGNAME-$upstream" "$archive"
+
+ # run debuild
+ hg update -r default >> "$LOG"
+ cmd_build
+}
+
+# just build the Debian package, assume the orig exists and is up to date.
+function cmd_build() {
+ # we're in tip of "default" branch in a clean repository, and mercurial is
+ # in debuild's default ignore patterns
+ set +e
+ debuild -i -I
+}
+
+function cmd_markdeb() {
+ version=`dpkg-parsechangelog \
+ | grep ^Version: | sed -e's/^Version: \(.*\)/\1/'`
+ hg tag "DEBIAN_${PKGNAME}_$version"
+}
+
+###
+# main
+
+function main() {
+ cmd="$1"
+ shift || true
+ if [ "$cmd" == "import" -a -n "$1" -a -n "$2" ]; then
+ runcmd="cmd_import"
+ elif [ "$cmd" == "buildfull" ]; then
+ runcmd="cmd_buildfull"
+ elif [ "$cmd" == "build" ]; then
+ runcmd="cmd_build"
+ elif [ "$cmd" == "markdeb" ]; then
+ runcmd="cmd_markdeb"
+ else
+ onlinehelp
+ exit
+ fi
+
+ # for now: save output of certain commands
+ WORKDIR=`mktemp -t -d hgpkg.XXXX`
+ LOG="$WORKDIR/log"
+
+ preparedir
+
+ $runcmd "$@"
+
+ # on success:
+ rm -rf "$WORKDIR"
+}
+
+main "$@"
Propchange: trunk/libxml-writer-simple-perl/debian/hgpkg
------------------------------------------------------------------------------
svn:executable = *
Added: trunk/libxml-writer-simple-perl/debian/libxml-writer-simple-perl.docs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-writer-simple-perl/debian/libxml-writer-simple-perl.docs?rev=73779&op=file
==============================================================================
--- trunk/libxml-writer-simple-perl/debian/libxml-writer-simple-perl.docs (added)
+++ trunk/libxml-writer-simple-perl/debian/libxml-writer-simple-perl.docs Thu Apr 28 23:59:09 2011
@@ -1,0 +1,1 @@
+README
Added: trunk/libxml-writer-simple-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-writer-simple-perl/debian/rules?rev=73779&op=file
==============================================================================
--- trunk/libxml-writer-simple-perl/debian/rules (added)
+++ trunk/libxml-writer-simple-perl/debian/rules Thu Apr 28 23:59:09 2011
@@ -1,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
Propchange: trunk/libxml-writer-simple-perl/debian/rules
------------------------------------------------------------------------------
svn:executable = *
Added: trunk/libxml-writer-simple-perl/debian/source/format
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-writer-simple-perl/debian/source/format?rev=73779&op=file
==============================================================================
--- trunk/libxml-writer-simple-perl/debian/source/format (added)
+++ trunk/libxml-writer-simple-perl/debian/source/format Thu Apr 28 23:59:09 2011
@@ -1,0 +1,1 @@
+3.0 (quilt)
Added: trunk/libxml-writer-simple-perl/debian/source/options
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-writer-simple-perl/debian/source/options?rev=73779&op=file
==============================================================================
--- trunk/libxml-writer-simple-perl/debian/source/options (added)
+++ trunk/libxml-writer-simple-perl/debian/source/options Thu Apr 28 23:59:09 2011
@@ -1,0 +1,1 @@
+single-debian-patch
Added: trunk/libxml-writer-simple-perl/debian/watch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-writer-simple-perl/debian/watch?rev=73779&op=file
==============================================================================
--- trunk/libxml-writer-simple-perl/debian/watch (added)
+++ trunk/libxml-writer-simple-perl/debian/watch Thu Apr 28 23:59:09 2011
@@ -1,0 +1,2 @@
+version=3
+http://search.cpan.org/dist/XML-Writer-Simple/ .*/XML-Writer-Simple-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$
More information about the Pkg-perl-cvs-commits
mailing list