[zeromq-dev] Debian package for 2.0.6 uploaded

Dagurashibanipal avbidder at fortytwo.ch
Wed Mar 17 22:25:45 CET 2010


From: Adrian von Bidder <avbidder at fortytwo.ch>
Date: Wed, 17 Mar 2010 22:14:49 +0100
Subject: Debian packaging for 2.0.6

Heyho!

Below the Debian packaging in 2.0.6, you may want to import it into git.

I think I'll continue to work in the hg repository I've got right now,
because I don't have the time right now to figure out a proper process
based on the git repository.  Note that sicne I work from the tarball,
zeromq as contained in the packaging repository is the result of running
autogen.sh, so packaging directly from this debian/ directory is not
possible per se in the git repository.

In my opinion, it would still make sense to ship the debian/ dir in the
tarball as it is now (maybe with a "git snapshot" entry added at the top
of debian/changelog.)  Especially now as the packaging is not
"incomplete" anymore since the language bindings were removed from the
release.

cheers
-- vbi


---
 debian/README.Debian            |   10 +-
 debian/README.source            |   37 +++++++
 debian/TODO.source              |   17 ++++
 debian/changelog                |   17 +++-
 debian/cl-zeromq.files          |    7 --
 debian/cl-zeromq.install        |    6 -
 debian/cl-zeromq.links          |    1 -
 debian/control                  |  150 ++++++++---------------------
 debian/copyright                |  105 ++++++++++++++++++--
 debian/dirs                     |    5 -
 debian/docs                     |    2 -
 debian/hgpkg                    |  203 +++++++++++++++++++++++++++++++++++++++
 debian/libzeromq-dev.files      |   37 -------
 debian/libzeromq-dev.install    |   19 ----
 debian/libzeromq-python.files   |    1 -
 debian/libzeromq-python.install |    1 -
 debian/libzeromq-ruby.files     |    1 -
 debian/libzeromq-ruby.install   |    1 -
 debian/libzeromq0.files         |    2 -
 debian/libzeromq0.install       |    1 -
 debian/libzmq-dev.install       |    5 +
 debian/libzmq-dev.manpages      |    2 +
 debian/libzmq0.install          |    1 +
 debian/libzmq0.manpages         |    5 +
 debian/rules                    |  122 ++++++++----------------
 debian/shlibs.local             |    1 -
 debian/source/format            |    1 +
 debian/source/options           |    1 +
 debian/zeromq-examples.files    |    2 -
 debian/zeromq-examples.install  |    2 -
 debian/zeromq-perf.files        |   10 --
 debian/zeromq-perf.install      |   10 --
 debian/zeromq-utils.files       |    6 -
 debian/zeromq-utils.install     |    9 +-
 debian/zeromq-utils.manpages    |    3 +
 35 files changed, 471 insertions(+), 332 deletions(-)
 create mode 100644 debian/README.source
 create mode 100644 debian/TODO.source
 delete mode 100644 debian/cl-zeromq.files
 delete mode 100644 debian/cl-zeromq.install
 delete mode 100644 debian/cl-zeromq.links
 delete mode 100644 debian/dirs
 delete mode 100644 debian/docs
 create mode 100755 debian/hgpkg
 delete mode 100644 debian/libzeromq-dev.files
 delete mode 100644 debian/libzeromq-dev.install
 delete mode 100644 debian/libzeromq-python.files
 delete mode 100644 debian/libzeromq-python.install
 delete mode 100644 debian/libzeromq-ruby.files
 delete mode 100644 debian/libzeromq-ruby.install
 delete mode 100644 debian/libzeromq0.files
 delete mode 100644 debian/libzeromq0.install
 create mode 100644 debian/libzmq-dev.install
 create mode 100644 debian/libzmq-dev.manpages
 create mode 100644 debian/libzmq0.install
 create mode 100644 debian/libzmq0.manpages
 delete mode 100644 debian/shlibs.local
 create mode 100644 debian/source/format
 create mode 100644 debian/source/options
 delete mode 100644 debian/zeromq-examples.files
 delete mode 100644 debian/zeromq-examples.install
 delete mode 100644 debian/zeromq-perf.files
 delete mode 100644 debian/zeromq-perf.install
 delete mode 100644 debian/zeromq-utils.files
 create mode 100644 debian/zeromq-utils.manpages

diff --git a/debian/README.Debian b/debian/README.Debian
index 4f447cc..cbbd2aa 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -1,6 +1,4 @@
-zeromq for Debian
------------------
-
-<possible notes regarding this package - if none, delete this file>
-
- -- Peter Busser <peter at bigboy.mirabilix.nl>  Tue, 15 Dec 2009 16:11:38 +0100
+Currently, the zeromq Debian packages provide only the C and C++
+language API.  The other language bindings are work in progress and will
+become available as time permits; help welcome (just email me at
+avbidder at fortytwo.ch.)
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..c0c7266
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,37 @@
+The source of this package is managed by using a hgpkg managed
+mercurial repository at https://fortytwo.ch/hg/pkg-zeromq.  (hgpkg is
+currently included in the debian/ directoriy here and not separately packaged,
+since it's not widely used yet.)
+
+Typically, you'd start by:
+
+ $ wget TODO get upstream tarball
+ $ hg clone https://fortytwo.ch/hg/pkg-zeromq zeromq
+ $ debian/hgpkg build
+
+Description: the repository contains an "upstream" and a "default" branch;
+"upstream" is directly imported from upstream's svn, and the default branch
+contains the directory as it is to be packed by dpkg-source.
+
+So far, the upstream source is unpatched.
+
+Upstream is at:
+    http://www.zeromq.org/
+
+Import a new upstream version:
+
+ $ debian/hgpkg import <path/to/tar>
+     (<path/to/tar> is the upstream tarball to be imported; the upstream
+      version is extracted from the tarball filename.  The import will switch to
+      the upstream branch, import, and switch back, and leave the uncommitted
+      merge on the default branch.)
+   -> now examine the merge, correct packaging issues, edit debian/changelog if
+      necessary.
+ $ hg ci -m "new package version"
+ $ debian/hgpkg build
+   -> if the package is good:
+ $ debian/hgpkg markdeb
+
+(arguably a mercurial bug: you'll get a merge conflict in .hgtags during
+upstream import which you'll have to correct manually.)
+
diff --git a/debian/TODO.source b/debian/TODO.source
new file mode 100644
index 0000000..6bc7277
--- /dev/null
+++ b/debian/TODO.source
@@ -0,0 +1,17 @@
+* ship example code in -dev packages
+* include perf tests with -utils package
+  (or: check if they build/work correctly.  See email from Martin Sustrik
+  <sustrik at 250bpm.com>, <4B598DAF.4030708 at 250bpm.com>)
+* remove rfc from openpgm tarball.
+  Or: ask upstream to do it.
+  Or: ask authors to re-license.
+* use external openpgm instead of included one
+  -> openpgm doesn't include obvious build instruction and I don't really know
+     scons or cmake.  Postponed for now.
+* use external XmlParser instead of included one
+  -> Not sure, only makes sense if it is used somewhere else.
+
+# Later:
+* non-C/C++ language bindings
+  -> possibly use separate source packages in preparation of upstream spin-off
+* package cl-iolib (mail from Peter)
diff --git a/debian/changelog b/debian/changelog
index 5c6f2c5..b9b2699 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,17 @@
-zeromq (1.9-1m) unstable; urgency=low
+zeromq (2.0.6beta.dfsg-1) unstable; urgency=low
 
-  * Initial release.
+  * New upstream version.
+    - Source doesn't include non-C/C++ language bindings anymore.
+    - New versioning: 2.0.6 is official upstream version which is a beta.
+  * Repacked orig tar: removed non-free RFC documents (closes: #567513)
+  * Improved/corrected description and copyright file, added bzip2 build
+    dependency.  Thanks to feedback from zeromq mailing list.
+  * Disable OpenPGM on non-x86 architectures (closes: #567848)
 
- -- Peter Busser <peter at mirabilix.nl>  Tue, 15 Dec 2009 16:11:38 +0100
+ -- Adrian von Bidder <cmot at debian.org>  Wed, 17 Mar 2010 10:43:40 +0100
 
+zeromq (2.0~beta2-1) unstable; urgency=low
+
+  * Initial package (closes: #566125)
+
+ -- Adrian von Bidder <cmot at debian.org>  Tue, 26 Jan 2010 19:03:39 +0100
diff --git a/debian/cl-zeromq.files b/debian/cl-zeromq.files
deleted file mode 100644
index 0f94c78..0000000
--- a/debian/cl-zeromq.files
+++ /dev/null
@@ -1,7 +0,0 @@
-usr/share/common-lisp/source/meta.lisp
-usr/share/common-lisp/source/package.lisp
-usr/share/common-lisp/source/zeromq-api.lisp
-usr/share/common-lisp/source/zeromq.asd
-usr/share/common-lisp/source/zeromq.lisp
-usr/share/common-lisp/systems/zeromq.asd
-usr/share/man/man7/zmq_cl.7
diff --git a/debian/cl-zeromq.install b/debian/cl-zeromq.install
deleted file mode 100644
index 636e923..0000000
--- a/debian/cl-zeromq.install
+++ /dev/null
@@ -1,6 +0,0 @@
-bindings/cl/meta.lisp usr/share/common-lisp/source/
-bindings/cl/package.lisp usr/share/common-lisp/source/
-bindings/cl/zeromq-api.lisp usr/share/common-lisp/source/
-bindings/cl/zeromq.asd usr/share/common-lisp/source/
-bindings/cl/zeromq.lisp usr/share/common-lisp/source/
-usr/share/man/man7/zmq_cl.7 usr/share/man/man7/
diff --git a/debian/cl-zeromq.links b/debian/cl-zeromq.links
deleted file mode 100644
index b3e79ff..0000000
--- a/debian/cl-zeromq.links
+++ /dev/null
@@ -1 +0,0 @@
-usr/share/common-lisp/source/zeromq.asd usr/share/common-lisp/systems/zeromq.asd
diff --git a/debian/control b/debian/control
index 916a675..8ceb687 100644
--- a/debian/control
+++ b/debian/control
@@ -1,43 +1,27 @@
 Source: zeromq
-Priority: extra
-Maintainer: Peter Busser <peter at mirabilix.nl>
-Build-Depends: debhelper (>= 7), uuid-dev, autoconf, pkg-config, automake, libtool, libglib2.0-dev, python-all-dev, python-dev, python-central
-Standards-Version: 3.7.3
 Section: libs
+Priority: optional
+Maintainer: Adrian von Bidder <cmot at debian.org>
+Build-Depends: debhelper (>= 7), libglib2.0-dev [amd64 i386], python [amd64 i386], uuid-dev
+Standards-Version: 3.8.3
 Homepage: http://www.zeromq.org/
-Vcs-Git: git://githumb.com/sustrik/zeromq2.git
+Vcs-Browser: https://fortytwo.ch/hg/pkg-zeromq
+Vcs-Hg: https://fortytwo.ch/hg/pkg-zeromq
 
-Package: libzeromq-dev
-Section: libdevel
+Package: libzmq0
 Architecture: any
-Depends: libzeromq0 (= ${binary:Version})
-Description: Development files and static library for the ZeroMQ library
- ZeroMQ is a very fast, thin messaging implementation which supports different
- messaging models. It reaches 13.4 microseconds end-to-end latencies and up to
- 4,100,000 messages a second today. It requires only a couple of pages in
- resident memory. It supports different wire protocols: TCP, PGM, AMQP, and
- SCTP.
- .
- There are C, C++, Lisp, Java, Python, Ruby, and .NET language APis.
- .
- It is fully distributed: no central servers to crash, millions of WAN and
- LAN nodes. It is an extensible framework: kernel-style drivers for custom
- hardware, protocols, or applications.
- .
- This package contains ZeroMQ related development libraries and header files.
-
-Package: libzeromq0
 Section: libs
-Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: zeromq-utils
 Description: The ZeroMQ library
  ZeroMQ is a very fast, thin messaging implementation which supports different
  messaging models. It reaches 13.4 microseconds end-to-end latencies and up to
- 4,100,000 messages a second today. It requires only a couple of pages in
- resident memory. It supports different wire protocols: TCP, PGM, AMQP, and
- SCTP.
+ 4,100,000 messages a second today, requires only a couple of pages in
+ resident memory and supports different wire protocols: UDP, TCP, IPC, PGM and
+ in-process.
  .
- There are C, C++, Lisp, Java, Python, Ruby, and .NET language APis.
+ There are C, C++, Common Lisp, Java, Python, Ruby and Haskell language
+ bindings.
  .
  It is fully distributed: no central servers to crash, millions of WAN and
  LAN nodes. It is an extensible framework: kernel-style drivers for custom
@@ -45,37 +29,19 @@ Description: The ZeroMQ library
  .
  This package contains the ZeroMQ shared library.
 
-Package: cl-zeromq
-Section: devel
-Architecture: all
-Depends: libzeromq0 (= ${binary:Version}), common-lisp-controller, cl-cffi, cl-trivial-garbage, cl-iolib
-Description: Common Lisp bindings for the ZeroMQ messaging library
- ZeroMQ is a very fast, thin messaging implementation which supports different
- messaging models. It reaches 13.4 microseconds end-to-end latencies and up to
- 4,100,000 messages a second today. It requires only a couple of pages in
- resident memory. It supports different wire protocols: TCP, PGM, AMQP, and
- SCTP.
- .
- There are C, C++, Lisp, Java, Python, Ruby, and .NET language APis.
- .
- It is fully distributed: no central servers to crash, millions of WAN and
- LAN nodes. It is an extensible framework: kernel-style drivers for custom
- hardware, protocols, or applications.
- .
- This package contains the ZeroMQ Common Lisp bindings.
-
 Package: zeromq-utils
-Section: utils
 Architecture: any
+Section: utils
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: Utilities for ZeroMQ
  ZeroMQ is a very fast, thin messaging implementation which supports different
  messaging models. It reaches 13.4 microseconds end-to-end latencies and up to
- 4,100,000 messages a second today. It requires only a couple of pages in
- resident memory. It supports different wire protocols: TCP, PGM, AMQP, and
- SCTP.
+ 4,100,000 messages a second today, requires only a couple of pages in
+ resident memory and supports different wire protocols: UDP, TCP, IPC, PGM and
+ in-process.
  .
- There are C, C++, Lisp, Java, Python, Ruby, and .NET language APis.
+ There are C, C++, Common Lisp, Java, Python, Ruby and Haskell language
+ bindings.
  .
  It is fully distributed: no central servers to crash, millions of WAN and
  LAN nodes. It is an extensible framework: kernel-style drivers for custom
@@ -83,79 +49,43 @@ Description: Utilities for ZeroMQ
  .
  This package contains a few ZeroMQ related utilities.
 
-Package: libzeromq-ruby
-Section: ruby
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: Ruby language bindings for the ZeroMQ messaging library
- ZeroMQ is a very fast, thin messaging implementation which supports different
- messaging models. It reaches 13.4 microseconds end-to-end latencies and up to
- 4,100,000 messages a second today. It requires only a couple of pages in
- resident memory. It supports different wire protocols: TCP, PGM, AMQP, and
- SCTP.
- .
- There are C, C++, Lisp, Java, Python, Ruby, and .NET language APis.
- .
- It is fully distributed: no central servers to crash, millions of WAN and
- LAN nodes. It is an extensible framework: kernel-style drivers for custom
- hardware, protocols, or applications.
- .
- This package contains the Ruby bindings for ZeroMQ.
-
-Package: libzeromq-python
-Section: python
+Package: libzmq-dev
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: Python language bindings for the ZeroMQ messaging library
- ZeroMQ is a very fast, thin messaging implementation which supports different
- messaging models. It reaches 13.4 microseconds end-to-end latencies and up to
- 4,100,000 messages a second today. It requires only a couple of pages in
- resident memory. It supports different wire protocols: TCP, PGM, AMQP, and
- SCTP.
- .
- There are C, C++, Lisp, Java, Python, Ruby, and .NET language APis.
- .
- It is fully distributed: no central servers to crash, millions of WAN and
- LAN nodes. It is an extensible framework: kernel-style drivers for custom
- hardware, protocols, or applications.
- .
- This package contains the Python bindings for ZeroMQ.
-
-Package: zeromq-examples
-Section: misc
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: Example programs for the ZeroMQ messaging library
+Section: libdevel
+Depends: libzmq0 (= ${binary:Version}), ${misc:Depends}
+Description: Development files and static library for the ZeroMQ library
  ZeroMQ is a very fast, thin messaging implementation which supports different
  messaging models. It reaches 13.4 microseconds end-to-end latencies and up to
- 4,100,000 messages a second today. It requires only a couple of pages in
- resident memory. It supports different wire protocols: TCP, PGM, AMQP, and
- SCTP.
+ 4,100,000 messages a second today, requires only a couple of pages in
+ resident memory and supports different wire protocols: UDP, TCP, IPC, PGM and
+ in-process.
  .
- There are C, C++, Lisp, Java, Python, Ruby, and .NET language APis.
+ There are C, C++, Common Lisp, Java, Python, Ruby and Haskell language
+ bindings.
  .
  It is fully distributed: no central servers to crash, millions of WAN and
  LAN nodes. It is an extensible framework: kernel-style drivers for custom
  hardware, protocols, or applications.
  .
- This package contains the ZeroMQ example programs.
+ This package contains ZeroMQ related development libraries and header files.
 
-Package: zeromq-perf
-Section: misc
+Package: libzmq-dbg
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: Performance tests for the ZeroMQ messaging library
+Priority: extra
+Section: debug
+Depends: libzmq0 (= ${binary:Version}), ${misc:Depends}
+Description: Debugging files for the ZeroMQ messaging library
  ZeroMQ is a very fast, thin messaging implementation which supports different
  messaging models. It reaches 13.4 microseconds end-to-end latencies and up to
- 4,100,000 messages a second today. It requires only a couple of pages in
- resident memory. It supports different wire protocols: TCP, PGM, AMQP, and
- SCTP.
+ 4,100,000 messages a second today, requires only a couple of pages in
+ resident memory and supports different wire protocols: UDP, TCP, IPC, PGM and
+ in-process.
  .
- There are C, C++, Lisp, Java, Python, Ruby, and .NET language APis.
+ There are C, C++, Common Lisp, Java, Python, Ruby and Haskell language
+ bindings.
  .
  It is fully distributed: no central servers to crash, millions of WAN and
  LAN nodes. It is an extensible framework: kernel-style drivers for custom
  hardware, protocols, or applications.
  .
- This package contains the ZeroMQ performance test programs.
-
+ This package contains the debugging synmbols of the ZeroMQ library.
diff --git a/debian/copyright b/debian/copyright
index 3839b2d..b53076f 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,18 +1,105 @@
-This package was debianized by Peter Busser <peter at mirabilix.nl> on
-Tue, 15 Dec 2009 16:11:38 +0100.
+This package was debianized by
+    Adrian von Bidder <cmot at debian.org>
+    based on earlier work by Peter Busser <peter at mirabilix.nl>
 
-It was downloaded from http://www.zeromq.org/
+    The packaging scripts are ©2009-2010 by these authors and are distributed
+    under the GPL.
 
-Upstream Author(s): iMatix Corporation
 
-Copyright:
-  Copyright (C) 2007-2010 by iMatix Corporation
+Licensing information for 0MQ
+-----------------------------
+
+Project homepage, with original source code:
+    http://www.zeromq.org/
+
+Copyright and Upstream Authors:
+
+    Copyright © 2007-2010 iMatix Corporation
+
+License:
+
+    This package is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This package 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
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this package; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU Lesser General
+Public License can be found in `/usr/share/common-licenses/LGPL'.
+
+iMatrix also offers commercial licenses for 0MQ.
+
+
+Licensing information for the included OpenPGM library
+------------------------------------------------------
+
+Project homepage, with original source code:
+    http://code.google.com/p/openpgm/
+
+Copyright and Upstream Authors:
+    Copyright © 2006-2010 Miru Limited.
+    Copyright © 1995, 1996, 2001, 2003 Free Software Foundation, Inc.
+    Copyright © 2002, 2003 Andi Kleen, SuSE Labs.
 
 License:
+    Most of OpenPGM is licensed under the terms of the GNU Lesser Public
+    License, the LGPL, see the file COPYING for details.
+
+    The ultra-high performance partial checksum & folding routines that are
+    taken from the Linux kernel and licensed under the terms of the GNU General
+    Public License, the GPL, see the file COPYING.GPL for details.
+
+    Hence you should treat the libraries libpgm, libpgmsnmp, and libpgmhttp of
+    OpenPGM as being LGPL licensed and the library libpgmplus as being GPL
+    licensed.
+
+(Packager's note: "GPL" in the context of the Linux kernel means GPL 2.  0MQ
+doesn't use those files during build or runtime, so it is not relevant for the
+license of zeromq itself.))
+
+Commercial licenses are also offered.
+
+On Debian systems, the complete text of the GNU Lesser General
+Public License can be found in `/usr/share/common-licenses/LGPL'.
+
+On Debian systems, the complete text of the GNU General Public
+License can be found in `/usr/share/common-licenses/GPL-2'.
+
+
+
+Licensing information for the included XMLParser library
+--------------------------------------------------------
+
+From xmlParser.hpp:
 
-The Debian packaging is (C) 2009, Peter Busser <peter at bigboy.mirabilix.nl>
+ Copyright (c) 2002, Frank Vanden Berghen
+ All rights reserved.
 
-It is licensed under the LGPL3, see `/usr/share/common-licenses/GPL-3' and
-`/usr/share/common-licenses/LGPL-3'.
+ The following license terms apply to projects that are in some way related to
+ the "ZeroMQ project", including applications
+ using "ZeroMQ project" and tools developed
+ for enhancing "ZeroMQ project". All other projects
+ (not related to "ZeroMQ project") have to use this
+ code under the Aladdin Free Public License (AFPL)
+ See the file "AFPL-license.txt" for more informations about the AFPL license.
+ (see http://www.artifex.com/downloads/doc/Public.htm for detailed AFPL terms)
 
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+     * Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+     * 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.
+     * Neither the name of Frank Vanden Berghen nor the
+       names of its contributors may be used to endorse or promote products
+       derived from this software without specific prior written permission.
 
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index 07fa48d..0000000
--- a/debian/dirs
+++ /dev/null
@@ -1,5 +0,0 @@
-usr/share/common-lisp/source
-usr/share/common-lisp/systems
-usr/share/zeromq/c-perf
-usr/share/zeromq/c++-perf
-usr/share/zeromq/examples
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index 50bd824..0000000
--- a/debian/docs
+++ /dev/null
@@ -1,2 +0,0 @@
-NEWS
-README
diff --git a/debian/hgpkg b/debian/hgpkg
new file mode 100755
index 0000000..e2d7017
--- /dev/null
+++ b/debian/hgpkg
@@ -0,0 +1,203 @@
+#! /bin/bash
+#
+# ©2009 Adrian von Bidder
+#
+# Manage Debian packages stored in Mercurial repositories.
+# hgpkg version 1.2.1
+# (script included here since it's not packaged [yet], maintained by avb in
+# a separate repository.  Licensing: same as zeromq's packaging.)
+#
+
+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 "$@"
diff --git a/debian/libzeromq-dev.files b/debian/libzeromq-dev.files
deleted file mode 100644
index 78f55ba..0000000
--- a/debian/libzeromq-dev.files
+++ /dev/null
@@ -1,37 +0,0 @@
-usr/include/*
-usr/lib/lib*.a
-usr/lib/lib*.so
-usr/lib/pkgconfig/*
-usr/lib/*.la
-usr/share/pkgconfig/*
-usr/share/man/man7/zmq_udp.7
-usr/share/man/man7/zmq_tcp.7
-usr/share/man/man7/zmq_pgm.7
-usr/share/man/man7/zmq.7
-usr/share/man/man7/zmq_cpp.7
-usr/share/man/man7/zmq_inproc.7
-usr/share/man/man3/zmq_msg_copy.3
-usr/share/man/man3/zmq_msg_move.3
-usr/share/man/man3/zmq_send.3
-usr/share/man/man3/zmq_flush.3
-usr/share/man/man3/zmq_msg_init_size.3
-usr/share/man/man3/zmq_msg_data.3
-usr/share/man/man3/zmq_close.3
-usr/share/man/man3/zmq_msg_close.3
-usr/share/man/man3/zmq_term.3
-usr/share/man/man3/zmq_recv.3
-usr/share/man/man3/zmq_init.3
-usr/share/man/man3/zmq_socket.3
-usr/share/man/man3/zmq_msg_init.3
-usr/share/man/man3/zmq_msg_size.3
-usr/share/man/man3/zmq_poll.3
-usr/share/man/man3/zmq_bind.3
-usr/share/man/man3/zmq_connect.3
-usr/share/man/man3/zmq_setsockopt.3
-usr/share/man/man3/zmq_strerror.3
-usr/share/man/man7/zmq_udp.7
-usr/share/man/man7/zmq_tcp.7
-usr/share/man/man7/zmq_pgm.7
-usr/share/man/man7/zmq.7
-usr/share/man/man7/zmq_cpp.7
-usr/share/man/man7/zmq_inproc.7
diff --git a/debian/libzeromq-dev.install b/debian/libzeromq-dev.install
deleted file mode 100644
index 7da7950..0000000
--- a/debian/libzeromq-dev.install
+++ /dev/null
@@ -1,19 +0,0 @@
-usr/include/* usr/include
-usr/lib/libzmq.la usr/lib
-usr/lib/libzmq.a usr/lib
-usr/lib/pkgconfig/libzmq.pc usr/lib/pkgconfig/
-usr/lib/libzmq.so usr/lib/
-usr/share/man/man3/*3 usr/share/man/man3
-usr/share/man/man7/zmq_udp.7 usr/share/man/man7
-usr/share/man/man7/zmq_tcp.7 usr/share/man/man7
-usr/share/man/man7/zmq_pgm.7 usr/share/man/man7
-usr/share/man/man7/zmq.7 usr/share/man/man7
-usr/share/man/man7/zmq_cpp.7 usr/share/man/man7
-usr/share/man/man7/zmq_inproc.7 usr/share/man/man7
-usr/share/man/man7/zmq_udp.7 usr/share/man/man7
-usr/share/man/man7/zmq_tcp.7 usr/share/man/man7
-usr/share/man/man7/zmq_pgm.7 usr/share/man/man7
-usr/share/man/man7/zmq.7 usr/share/man/man7
-usr/share/man/man7/zmq_cpp.7 usr/share/man/man7
-usr/share/man/man7/zmq_inproc.7 usr/share/man/man7
-
diff --git a/debian/libzeromq-python.files b/debian/libzeromq-python.files
deleted file mode 100644
index 74b2b29..0000000
--- a/debian/libzeromq-python.files
+++ /dev/null
@@ -1 +0,0 @@
-usr/share/man/man7/zmq_python.7
diff --git a/debian/libzeromq-python.install b/debian/libzeromq-python.install
deleted file mode 100644
index a290f70..0000000
--- a/debian/libzeromq-python.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/share/man/man7/zmq_python.7 usr/share/man/man7/
diff --git a/debian/libzeromq-ruby.files b/debian/libzeromq-ruby.files
deleted file mode 100644
index 098bac5..0000000
--- a/debian/libzeromq-ruby.files
+++ /dev/null
@@ -1 +0,0 @@
-usr/share/man/man7/zmq_ruby.7
diff --git a/debian/libzeromq-ruby.install b/debian/libzeromq-ruby.install
deleted file mode 100644
index 681ffab..0000000
--- a/debian/libzeromq-ruby.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/share/man/man7/zmq_ruby.7 usr/share/man/man7
diff --git a/debian/libzeromq0.files b/debian/libzeromq0.files
deleted file mode 100644
index f105647..0000000
--- a/debian/libzeromq0.files
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/lib/libzmq.so.0
-usr/lib/libzmq.so.0.0.0
diff --git a/debian/libzeromq0.install b/debian/libzeromq0.install
deleted file mode 100644
index b25b4ae..0000000
--- a/debian/libzeromq0.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/libzmq.so.* usr/lib
diff --git a/debian/libzmq-dev.install b/debian/libzmq-dev.install
new file mode 100644
index 0000000..108aaed
--- /dev/null
+++ b/debian/libzmq-dev.install
@@ -0,0 +1,5 @@
+usr/include/*
+usr/lib/libzmq.a
+usr/lib/libzmq.la
+usr/lib/libzmq.so
+usr/lib/pkgconfig/libzmq.pc
diff --git a/debian/libzmq-dev.manpages b/debian/libzmq-dev.manpages
new file mode 100644
index 0000000..63f4dae
--- /dev/null
+++ b/debian/libzmq-dev.manpages
@@ -0,0 +1,2 @@
+debian/tmp/usr/share/man/man3/*
+debian/tmp/usr/share/man/man7/zmq_cpp.7
diff --git a/debian/libzmq0.install b/debian/libzmq0.install
new file mode 100644
index 0000000..f63a68f
--- /dev/null
+++ b/debian/libzmq0.install
@@ -0,0 +1 @@
+usr/lib/libzmq.so.*
diff --git a/debian/libzmq0.manpages b/debian/libzmq0.manpages
new file mode 100644
index 0000000..b846209
--- /dev/null
+++ b/debian/libzmq0.manpages
@@ -0,0 +1,5 @@
+debian/tmp/usr/share/man/man7/zmq.7
+debian/tmp/usr/share/man/man7/zmq_inproc.7
+debian/tmp/usr/share/man/man7/zmq_ipc.7
+debian/tmp/usr/share/man/man7/zmq_pgm.7
+debian/tmp/usr/share/man/man7/zmq_tcp.7
diff --git a/debian/rules b/debian/rules
index bef43f1..4b40fe5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,130 +1,75 @@
 #!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-
-
-
-
-
-# shared library versions, option 1
-version=0.0.0
-major=0
-
-# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
-#version=`ls src/.libs/lib*.so.* | \
-# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
-#major=`ls src/.libs/lib*.so.* | \
-# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
 
+#export DH_VERBOSE=1
 
-pkg           := cl-zeromq
-debpkg        := cl-zeromq
-clc-source    := usr/share/common-lisp/source
-clc-systems   := usr/share/common-lisp/systems
-clc-cl-zeromq := $(clc-source)/$(pkg)
+DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
-rubydir := /usr/lib/ruby/1.8/$(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)-$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
+ifneq (,$(filter $(DEB_HOST_ARCH),i386 amd64))
+    pgm_opt := --with-pgm
+else
+    pgm_opt :=
+endif
 
 configure: configure-stamp
 configure-stamp:
 	dh_testdir
-	# Add here commands to configure the package.
 
-	./autogen.sh
-
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
-	cp -f /usr/share/misc/config.sub config.sub
-endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
-	cp -f /usr/share/misc/config.guess config.guess
-endif
+	# hack: check that we're building from dsfg-free orig tarball
+	if tar tzf foreign/openpgm/libpgm-*.tar.gz | grep -q rfc3208.txt;then \
+	    echo "Remove RFC documents from orig tar."; \
+	    exit 1; \
+	fi
 
 	./configure $(CROSS) \
-		--prefix=/usr \
-		--with-c \
-		--with-cpp \
-		--with-pgm \
-		--with-pgm-examples \
-		--with-forwarder \
-		--with-streamer \
-		--with-queue \
-		--with-perf \
-		--with-chat \
-		--mandir=\$${prefix}/share/man \
-		--infodir=\$${prefix}/share/info \
-		CFLAGS="$(CFLAGS)" \
-		LDFLAGS="-Wl,-z,defs"
+	    --prefix=/usr \
+	    $(pgm_opt) \
+	    CFLAGS="$(CFLAGS)" \
+	    LDFLAGS="-Wl,--as-needed -Wl,-z,defs" \
 
 	touch configure-stamp
 
-
 build: build-stamp
-build-stamp: configure-stamp  
+
+build-stamp: configure-stamp
 	dh_testdir
 
-	# Add here commands to compile the package.
 	$(MAKE)
 
 	touch $@
 
-clean: 
+clean:
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp configure-stamp
 
-	# Add here commands to clean up after the build process.
-#	$(MAKE) clean
+	if [ -e Makefile ]; then make distclean; fi
+	rm -rf foreign/openpgm/libpgm-2.0.20rc5 config.log
 
-	dh_clean 
+	dh_clean
 
 install: build
 	dh_testdir
 	dh_testroot
-	dh_clean -k 
+	dh_prep
 	dh_installdirs
 
-	# Add here commands to install the package into debian/tmp
 	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
 
 
-# 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_installchangelogs ChangeLog
-	dh_installdocs
-	dh_installexamples
-#	dh_install --fail-missing
-	dh_install --list-missing
-#	dh_installmenu
-#	dh_installdebconf	
-#	dh_installlogrotate
-#	dh_installemacsen
-#	dh_installpam
-#	dh_installmime
-#	dh_installinit
-#	dh_installcron
-#	dh_installinfo
+	dh_install -X/usr/share/man --fail-missing
 	dh_installman
+	dh_installchangelogs
+	dh_installdocs
+	dh_lintian
 	dh_link
-	dh_strip
+	dh_strip --dbg-package=libzmq-dbg
 	dh_compress
 	dh_fixperms
-#	dh_perl
-#	dh_python
 	dh_makeshlibs
 	dh_installdeb
 	dh_shlibdeps
@@ -134,3 +79,14 @@ binary-arch: build install
 
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure
+
+# vim: set filetype=make
+
+
+# build depends:
+#  - python[-all]-dev
+#  - ruby-dev
+#    -> figure out ruby-headersdir option automatically
+#  - openjdk-6-jdk (or whatever)
+#    -> set JAVA_HOME automatically
+#  - libglib2.0-dev
diff --git a/debian/shlibs.local b/debian/shlibs.local
deleted file mode 100644
index 0e3fa88..0000000
--- a/debian/shlibs.local
+++ /dev/null
@@ -1 +0,0 @@
-libzmq 2.0 libzeromq0 (>> 2.0-0), libzeromq0 (<< 2.0-99)
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/options b/debian/source/options
new file mode 100644
index 0000000..7423a2d
--- /dev/null
+++ b/debian/source/options
@@ -0,0 +1 @@
+single-debian-patch
diff --git a/debian/zeromq-examples.files b/debian/zeromq-examples.files
deleted file mode 100644
index f80241c..0000000
--- a/debian/zeromq-examples.files
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/share/zeromq/examples/display
-usr/share/zeromq/examples/prompt
diff --git a/debian/zeromq-examples.install b/debian/zeromq-examples.install
deleted file mode 100644
index 6031b15..0000000
--- a/debian/zeromq-examples.install
+++ /dev/null
@@ -1,2 +0,0 @@
-examples/chat/prompt /usr/share/zeromq/examples
-examples/chat/display /usr/share/zeromq/examples
diff --git a/debian/zeromq-perf.files b/debian/zeromq-perf.files
deleted file mode 100644
index 4a79636..0000000
--- a/debian/zeromq-perf.files
+++ /dev/null
@@ -1,10 +0,0 @@
-usr/share/zeromq/c-perf/local_lat
-usr/share/zeromq/c-perf/local_thr
-usr/share/zeromq/c-perf/pgmrecv
-usr/share/zeromq/c-perf/pgmsend
-usr/share/zeromq/c-perf/remote_lat
-usr/share/zeromq/c-perf/remote_thr
-usr/share/zeromq/c++-perf/local_lat
-usr/share/zeromq/c++-perf/local_thr
-usr/share/zeromq/c++-perf/remote_thr
-usr/share/zeromq/c++-perf/remote_lat
diff --git a/debian/zeromq-perf.install b/debian/zeromq-perf.install
deleted file mode 100644
index 6048756..0000000
--- a/debian/zeromq-perf.install
+++ /dev/null
@@ -1,10 +0,0 @@
-perf/c/local_lat usr/share/zeromq/c-perf/
-perf/c/local_thr usr/share/zeromq/c-perf/
-perf/c/pgmrecv usr/share/zeromq/c-perf/
-perf/c/pgmsend usr/share/zeromq/c-perf/
-perf/c/remote_lat usr/share/zeromq/c-perf/
-perf/c/remote_thr usr/share/zeromq/c-perf/
-perf/cpp/local_lat usr/share/zeromq/c++-perf/
-perf/cpp/local_thr usr/share/zeromq/c++-perf/
-perf/cpp/remote_lat usr/share/zeromq/c++-perf/
-perf/cpp/remote_thr usr/share/zeromq/c++-perf/
diff --git a/debian/zeromq-utils.files b/debian/zeromq-utils.files
deleted file mode 100644
index c112ff6..0000000
--- a/debian/zeromq-utils.files
+++ /dev/null
@@ -1,6 +0,0 @@
-usr/bin/zmq_forwarder
-usr/bin/zmq_queue
-usr/bin/zmq_streamer
-usr/share/man/man1/zmq_forwarder.1
-usr/share/man/man1/zmq_queue.1
-usr/share/man/man1/zmq_streamer.1
diff --git a/debian/zeromq-utils.install b/debian/zeromq-utils.install
index c2f5776..5c5566e 100644
--- a/debian/zeromq-utils.install
+++ b/debian/zeromq-utils.install
@@ -1,6 +1,3 @@
-usr/bin/zmq_forwarder /usr/bin
-usr/bin/zmq_queue /usr/bin
-usr/bin/zmq_streamer /usr/bin
-usr/share/man/man1/zmq_forwarder.1 /usr/share/man/man1
-usr/share/man/man1/zmq_queue.1 /usr/share/man/man1
-usr/share/man/man1/zmq_streamer.1 /usr/share/man/man1
+usr/bin/zmq_forwarder
+usr/bin/zmq_queue
+usr/bin/zmq_streamer
diff --git a/debian/zeromq-utils.manpages b/debian/zeromq-utils.manpages
new file mode 100644
index 0000000..bcc9687
--- /dev/null
+++ b/debian/zeromq-utils.manpages
@@ -0,0 +1,3 @@
+debian/tmp/usr/share/man/man1/zmq_forwarder.1
+debian/tmp/usr/share/man/man1/zmq_queue.1
+debian/tmp/usr/share/man/man1/zmq_streamer.1
-- 
1.7.0




More information about the zeromq-dev mailing list