[openamq-dev] proposal & patch: Debian packaging
Copyright (c) 2008 Esteve Fernandez <esteve.fernandez@gmail.com>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
=== added directory 'debian'
=== added file 'debian/changelog'
--- OpenAMQ-1.2c4.old/debian/changelog 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/changelog 2008-01-22 18:22:21 +0000
@@ -0,0 +1,6 @@
+openamq (1.2c4-1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Esteve Fernandez <esteve.fernandez@gmail.com> Mon, 21 Jan 2008 14:55:56 -0600
+
=== added file 'debian/compat'
--- OpenAMQ-1.2c4.old/debian/compat 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/compat 2008-01-22 18:22:21 +0000
@@ -0,0 +1,1 @@
+4
=== added file 'debian/conffiles'
--- OpenAMQ-1.2c4.old/debian/conffiles 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/conffiles 2008-01-22 18:22:21 +0000
@@ -0,0 +1,1 @@
+/etc/openamq/amq_server_base.cfg
=== added file 'debian/control'
--- OpenAMQ-1.2c4.old/debian/control 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/control 2008-01-22 18:57:16 +0000
@@ -0,0 +1,28 @@
+Source: openamq
+Section: net
+Priority: optional
+Maintainer: Esteve Fernandez <esteve.fernandez@gmail.com>
+Build-Depends: debhelper (>= 4.0.0), build-essential
+Standards-Version: 3.6.2
+
+Package: openamq
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Original reference implementation of AMQP, written in C/C++.
+ OpenAMQ is the original reference implementation of AMQP,
+ written in C/C++ by iMatix.
+ .
+ It's a complete AMQ message queueing broker that aims for performance,
+ ease of use, and high reliability.
+
+Package: openamq-doc
+Architecture: all
+Description: Documentation for openamq
+ OpenAMQ is the original reference implementation of AMQP,
+ written in C/C++ by iMatix.
+ .
+ It's a complete AMQ message queueing broker that aims for performance,
+ ease of use, and high reliability.
+ .
+ This package contains the reference documentation for OpenAMQ and all
+ the related components.
=== added file 'debian/copyright'
--- OpenAMQ-1.2c4.old/debian/copyright 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/copyright 2008-01-22 18:25:43 +0000
@@ -0,0 +1,10 @@
+This package was debianized by Esteve Fernandez <esteve.fernandez@gmail.com> on
+Mon, 21 Jan 2008 14:55:56 -0600.
+
+It was downloaded from http://openamq.org/download/OpenAMQ-1.2c4.tar.gz
+
+Copyright Holder: iMatix Corporation.
+
+License:
+
+Distributed under the GNU General Public License.
=== added file 'debian/dirs'
--- OpenAMQ-1.2c4.old/debian/dirs 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/dirs 2008-01-22 18:24:03 +0000
@@ -0,0 +1,1 @@
+usr/bin
=== added file 'debian/docs'
--- OpenAMQ-1.2c4.old/debian/docs 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/docs 2008-01-22 18:23:35 +0000
@@ -0,0 +1,1 @@
+readme.txt
=== added file 'debian/openamq-doc.docs'
--- OpenAMQ-1.2c4.old/debian/openamq-doc.docs 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/openamq-doc.docs 2008-01-22 18:22:21 +0000
@@ -0,0 +1,1 @@
+debian/openamq-build/doc/
=== added file 'debian/openamq-doc.install'
=== added file 'debian/openamq.default'
--- OpenAMQ-1.2c4.old/debian/openamq.default 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/openamq.default 2008-01-22 18:22:21 +0000
@@ -0,0 +1,10 @@
+# Defaults for openamq initscript
+# sourced by /etc/init.d/openamq
+# installed at /etc/default/openamq by the maintainer scripts
+
+#
+# This is a POSIX shell fragment
+#
+
+# Additional options that are passed to the Daemon.
+DAEMON_OPTS="--trace 1 -s /etc/openamq/amq_server_base.cfg"
=== added file 'debian/openamq.dirs'
--- OpenAMQ-1.2c4.old/debian/openamq.dirs 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/openamq.dirs 2008-01-22 18:22:21 +0000
@@ -0,0 +1,1 @@
+etc/openamq
=== added file 'debian/openamq.docs'
--- OpenAMQ-1.2c4.old/debian/openamq.docs 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/openamq.docs 2008-01-22 18:22:21 +0000
@@ -0,0 +1,1 @@
+readme.txt
=== added file 'debian/openamq.init'
--- OpenAMQ-1.2c4.old/debian/openamq.init 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/openamq.init 2008-01-22 18:22:21 +0000
@@ -0,0 +1,75 @@
+#! /bin/sh
+#
+# skeleton example file to build /etc/init.d/ scripts.
+# This file should be used to construct scripts for /etc/init.d.
+#
+# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+# Modified for Debian
+# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#
+# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/amq_server
+NAME=openamq
+DESC=openamq
+USER=openamq
+GROUP=openamq
+
+test -x $DAEMON || exit 0
+
+# Include openamq defaults if available
+if [ -f /etc/default/openamq ] ; then
+ . /etc/default/openamq
+fi
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon -m -b --chuid $USER:$GROUP --start --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon --chuid $USER:$GROUP --stop --pidfile /var/run/$NAME.pid
+ echo "$NAME."
+ ;;
+ #reload)
+ #
+ # If the daemon can reload its config files on the fly
+ # for example by sending it SIGHUP, do it here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this a do-nothing entry.
+ #
+ # echo "Reloading $DESC configuration files."
+ # start-stop-daemon --stop --signal 1 --quiet --pidfile \
+ # /var/run/$NAME.pid --exec $DAEMON
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart".
+ #
+ echo -n "Restarting $DESC: "
+ start-stop-daemon --chuid $USER:$GROUP --stop --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON
+ sleep 1
+ start-stop-daemon --chuid $USER:$GROUP --start --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
=== added file 'debian/openamq.install'
--- OpenAMQ-1.2c4.old/debian/openamq.install 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/openamq.install 2008-01-22 18:22:21 +0000
@@ -0,0 +1,2 @@
+debian/tmp/usr/bin
+debian/tmp/etc/openamq
=== added file 'debian/openamq.postinst'
--- OpenAMQ-1.2c4.old/debian/openamq.postinst 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/openamq.postinst 2008-01-22 18:22:21 +0000
@@ -0,0 +1,24 @@
+#!/bin/sh
+case "$1" in
+ configure)
+ if ! getent passwd openamq>/dev/null; then
+ echo "Creating/updating openamq user/group account..."
+ adduser --home /var/lib/openamq \
+ --gecos "OpenAMQ system user" \
+ --system \
+ --quiet --group --disabled-password openamq
+ fi
+ chown -R openamq:openamq /var/lib/openamq
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
=== added file 'debian/rules'
--- OpenAMQ-1.2c4.old/debian/rules 1970-01-01 00:00:00 +0000
+++ OpenAMQ-1.2c4/debian/rules 2008-01-22 18:22:21 +0000
@@ -0,0 +1,126 @@
+#!/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.
+#
+# Modified to make a template file for a multi-binary package with separated
+# build-arch and build-indep targets by Bill Allombert 2001
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+
+ touch configure-stamp
+
+
+#Architecture
+build: build-arch build-indep
+
+build-arch: build-arch-stamp
+build-arch-stamp: configure-stamp
+
+ # Add here commands to compile the arch part of the package.
+ #$(MAKE)
+ IBASE=$(CURDIR)/debian/openamq-build sh build.sh
+ touch build-arch-stamp
+
+build-indep: build-indep-stamp
+build-indep-stamp: configure-stamp
+
+ # Add here commands to compile the indep part of the package.
+ #$(MAKE) doc
+ touch build-indep-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
+
+ # Add here commands to clean up after the build process.
+ rm -rf $(CURDIR)/debian/openamq-build
+
+ dh_clean
+
+install: install-indep install-arch
+install-indep:
+ dh_testdir
+ dh_testroot
+ dh_clean -k -i
+ dh_installdirs -i
+
+ # Add here commands to install the indep part of the package into
+ # debian/<package>-doc.
+ #INSTALLDOC#
+
+ dh_install -i
+
+install-arch:
+ dh_testdir
+ dh_testroot
+ dh_clean -k -s
+ dh_installdirs -s
+
+ # Add here commands to install the arch part of the package into
+ # debian/tmp.
+ mkdir -p $(CURDIR)/debian/tmp/usr/bin
+ mkdir -p $(CURDIR)/debian/tmp/etc/openamq
+ #mkdir -p $(CURDIR)/debian/openamq/usr/share/doc/openamq
+ cp -a $(CURDIR)/debian/openamq-build/bin/amq_client $(CURDIR)/debian/tmp/usr/bin
+ cp -a $(CURDIR)/debian/openamq-build/bin/amq_server $(CURDIR)/debian/tmp/usr/bin
+ cp -a $(CURDIR)/debian/openamq-build/bin/amq_shell $(CURDIR)/debian/tmp/usr/bin
+ cp -a $(CURDIR)/debian/openamq-build/bin/amq_server_base.cfg $(CURDIR)/debian/tmp/etc/openamq
+ #cp -a $(CURDIR)/debian/openamq-build/doc $(CURDIR)/debian/openamq/usr/share/doc/openamq/docs
+
+ dh_install -s
+# Must not depend on anything. This is to be called by
+# binary-arch/binary-indep
+# in another 'make' thread.
+binary-common:
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+ dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_python
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+# Build architecture independant packages using the common target.
+binary-indep: build-indep install-indep
+ $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+# Build architecture dependant packages using the common target.
+binary-arch: build-arch install-arch
+ $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
+
+binary: binary-arch binary-indep
+.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
unfold
[openamq-dev] proposal & patch: Debian packaging by
esteve, 1201193386|%e %b %Y, %H:%M %Z|agohover
