--- malamute-1.0+git20170721.orig/debian/format
+++ malamute-1.0+git20170721/debian/format
@@ -0,0 +1,1 @@
+3.0 (quilt)
--- malamute-1.0+git20170721.orig/debian/libmlm-dev.install
+++ malamute-1.0+git20170721/debian/libmlm-dev.install
@@ -0,0 +1,4 @@
+usr/include/*
+usr/lib/*/libmlm.so
+usr/lib/*/pkgconfig/libmlm.pc
+usr/share/zproject
--- malamute-1.0+git20170721.orig/debian/libmlm-dev.manpages
+++ malamute-1.0+git20170721/debian/libmlm-dev.manpages
@@ -0,0 +1,2 @@
+debian/tmp/usr/share/man/man3/*
+debian/tmp/usr/share/man/man7/*
--- malamute-1.0+git20170721.orig/debian/control
+++ malamute-1.0+git20170721/debian/control
@@ -0,0 +1,83 @@
+#
+#    malamute - ZeroMQ Message Broker
+#
+#    Copyright (c) the Contributors as noted in the AUTHORS file.       
+#    This file is part of the Malamute Project.                         
+#                                                                       
+#    This Source Code Form is subject to the terms of the Mozilla Public
+#    License, v. 2.0. If a copy of the MPL was not distributed with this
+#    file, You can obtain one at http://mozilla.org/MPL/2.0/.           
+
+Source:         malamute
+Section:        net
+Priority:       optional
+Maintainer:     malamute Developers <zeromq-dev@lists.zeromq.org>
+Standards-Version: 4.0.0
+Build-Depends: debhelper (>= 9),
+    pkg-config,
+    libzmq3-dev,
+    libczmq-dev,
+    systemd,
+    dh-systemd,
+    dh-python,
+    python-all-dev, python-cffi, python-setuptools,
+    python3-all-dev, python3-cffi, python3-setuptools,
+    asciidoc-base | asciidoc, xmlto,
+    dh-autoreconf
+
+Package: libmlm1
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: malamute shared library
+ This package contains shared library for malamute:
+ zeromq message broker
+
+Package: libmlm-dev
+Architecture: any
+Section: libdevel
+Depends:
+    ${misc:Depends},
+    libzmq3-dev,
+    libczmq-dev,
+    libmlm1 (= ${binary:Version})
+Description: malamute development tools
+ This package contains development files for malamute:
+ zeromq message broker
+
+Package: malamute
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends},
+Description: runnable binaries from malamute
+ Main package for malamute:
+ zeromq message broker
+
+Package: malamute-dbg
+Architecture: any
+Section: debug
+Priority: extra
+Depends:
+    malamute (= ${binary:Version}),
+    ${misc:Depends}
+Description: malamute debugging symbols
+ This package contains the debugging symbols for malamute:
+ zeromq message broker.
+
+Package: python-malamute-cffi
+Architecture: any
+Section: python
+Depends:
+    libmlm1 (= ${binary:Version}),
+    ${misc:Depends}, ${shlibs:Depends},
+    ${python:Depends}, python-cffi,
+Description: Python CFFI bindings for malamute
+ This package contains Python CFFI bindings for malamute.
+
+Package: python3-malamute-cffi
+Architecture: any
+Section: python
+Depends:
+    libmlm1 (= ${binary:Version}),
+    ${misc:Depends}, ${shlibs:Depends},
+    ${python3:Depends}, python3-cffi,
+Description: Python 3 CFFI bindings for malamute
+ This package contains Python 3 CFFI bindings for malamute.
--- malamute-1.0+git20170721.orig/debian/changelog
+++ malamute-1.0+git20170721/debian/changelog
@@ -0,0 +1,5 @@
+malamute (1.0+git20170721-0) UNRELEASED; urgency=low
+
+  * Initial packaging.
+
+ -- malamute Developers <zeromq-dev@lists.zeromq.org>  Wed, 31 Dec 2014 00:00:00 +0000
--- malamute-1.0+git20170721.orig/debian/rules
+++ malamute-1.0+git20170721/debian/rules
@@ -0,0 +1,94 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+DRAFTS=no
+DOCS=yes
+
+# OBS build: add
+#   Macros:
+#   %_with_drafts 1
+# at the BOTTOM of the OBS prjconf
+OBS_BUILD_CFG=/.build/build.dist
+ifeq ("$(wildcard $(OBS_BUILD_CFG))","")
+BUILDCONFIG=$(shell ls -1 /usr/src/packages/SOURCES/_buildconfig* | head -n 1)
+endif
+ifneq ("$(wildcard $(OBS_BUILD_CFG))","")
+ifneq ("$(shell grep drafts $(OBS_BUILD_CFG))","")
+DRAFTS=yes
+endif
+ifneq ("$(shell grep python_cffi $(OBS_BUILD_CFG))","")
+PYTHON_CFFI=yes
+endif
+endif
+
+# User build: DEB_BUILD_OPTIONS=drafts dpkg-buildpackage
+ifneq (,$(findstring drafts,$(DEB_BUILD_OPTIONS)))
+DRAFTS=yes
+endif
+
+ifneq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
+DOCS=no
+endif
+ifneq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
+DOCS=no
+endif
+
+# User build: DEB_BUILD_OPTIONS=python_cffi dpkg-buildpackage
+ifneq (,$(findstring python_cffi,$(DEB_BUILD_OPTIONS)))
+ifeq (,$(findstring nopython,$(DEB_BUILD_OPTIONS)))
+ifeq (,$(findstring nopython,$(DEB_BUILD_PROFILES)))
+PYTHON_CFFI=yes
+WITH_PYTHON = --with=python2,python3
+endif
+endif
+endif
+
+ifeq (yes,$(PYTHON_CFFI))
+export PYBUILD_NAME=malamute-cffi
+export PKG_CONFIG_PATH=$(CURDIR)/bindings/python_cffi:$PKG_CONFIG_PATH
+
+override_dh_auto_build:
+	dh_auto_build
+	# Problem: we need pkg-config points to built and not yet installed copy of malamute
+	# Solution: chicken-egg problem - let's make "fake" pkg-config file
+	sed -e "s@^libdir.*@libdir=$(CURDIR)/src/.libs@" 		-e "s@^includedir.*@includedir=$(CURDIR)/include@" 		src/libmlm.pc > bindings/python_cffi/libmlm.pc
+	dh_auto_build --sourcedirectory=bindings/python_cffi -O--buildsystem=pybuild
+
+override_dh_auto_install:
+	dh_auto_install
+	dh_auto_install --sourcedirectory=bindings/python_cffi -O--buildsystem=pybuild
+
+override_dh_auto_clean:
+	dh_auto_clean
+	dh_auto_clean -O--buildsystem=pybuild
+	rm -f bindings/python_cffi/*.pc
+	rm -rf bindings/python_cffi/*.egg-info/
+else
+WITH_PYTHON =
+# This tells debhelper to avoid building the python CFFI packages
+DH_OPTIONS += -Npython-malamute-cffi
+DH_OPTIONS += -Npython3-malamute-cffi
+export DH_OPTIONS
+endif
+
+# Workaround for automake < 1.14 bug
+$(shell dpkg --compare-versions `dpkg-query -W -f='$${Version}\n' automake` lt 1:1.14 && mkdir -p config)
+$(shell test -f src/Makemodule-local.am || touch src/Makemodule-local.am)
+
+override_dh_strip:
+	dh_strip --dbg-package=malamute-dbg
+
+override_dh_auto_test:
+	echo "Skipped for now"
+
+override_dh_auto_configure:
+	dh_auto_configure -- \
+		--with-systemd-units \
+		--with-docs=$(DOCS) \
+		--enable-drafts=$(DRAFTS)
+
+%:
+	dh $@ \
+		--with systemd \
+		$(WITH_PYTHON) \
+		--with autoreconf
--- malamute-1.0+git20170721.orig/debian/compat
+++ malamute-1.0+git20170721/debian/compat
@@ -0,0 +1,1 @@
+9
--- malamute-1.0+git20170721.orig/debian/libmlm1.install
+++ malamute-1.0+git20170721/debian/libmlm1.install
@@ -0,0 +1,1 @@
+usr/lib/*/libmlm.so.*
--- malamute-1.0+git20170721.orig/debian/malamute.manpages
+++ malamute-1.0+git20170721/debian/malamute.manpages
@@ -0,0 +1,4 @@
+debian/tmp/usr/share/man/man1/malamute.1
+debian/tmp/usr/share/man/man1/mshell.1
+debian/tmp/usr/share/man/man1/mlm_tutorial.1
+debian/tmp/usr/share/man/man1/mlm_perftest.1
--- malamute-1.0+git20170721.orig/debian/malamute.install
+++ malamute-1.0+git20170721/debian/malamute.install
@@ -0,0 +1,7 @@
+usr/bin/malamute
+usr/bin/mshell
+usr/bin/mlm_tutorial
+usr/bin/mlm_perftest
+etc/malamute/malamute.cfg
+lib/systemd/system/malamute.service
+
--- malamute-1.0+git20170721.orig/debian/copyright
+++ malamute-1.0+git20170721/debian/copyright
@@ -0,0 +1,12 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: malamute
+
+Files: *
+Copyright: 2015- malamute Developers <zeromq-dev@lists.zeromq.org>
+License: malamute_license
+ Copyright (c) the Contributors as noted in the AUTHORS file.       
+ This file is part of the Malamute Project.                         
+                                                                    
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.           
