[libsigrok] 06/12: add cxx and Python binding packages, add patch for Python building

Zoltan Gyarmati zgyarmati-guest at moszumanska.debian.org
Wed Mar 29 21:34:56 UTC 2017


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

zgyarmati-guest pushed a commit to branch master
in repository libsigrok.

commit 769059d9dc3353b1a903ce6783ba67c3fe958c96
Author: Zoltan Gyarmati <mr.zoltan.gyarmati at gmail.com>
Date:   Sun Mar 5 17:18:49 2017 +0100

    add cxx and Python binding packages, add patch for Python building
---
 debian/changelog                                   | 10 +++--
 debian/control                                     | 46 +++++++++++++++------
 debian/libsigrok-dev.install                       |  8 ++--
 debian/libsigrok3.install                          |  2 +-
 debian/libsigrokcxx3-dev.dirs                      |  2 +
 debian/libsigrokcxx3-dev.install                   |  4 ++
 debian/libsigrokcxx3.install                       |  1 +
 .../fix_python_module_install_path_for_debian      | 47 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 debian/python-libsigrok3.install                   |  1 +
 debian/rules                                       |  9 ++++-
 11 files changed, 109 insertions(+), 22 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 87254c8..cb9c088 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
-libsigrok (0.4.0-1) UNRELEASED; urgency=medium
+libsigrok (0.4.0-1) unstable; urgency=medium
 
-  * New upstream relase 0.4.0
-  * Increase package name as soname changed
+  * New upstream release 0.4.0
+  * Increase package name suffix as soname changed
   * Remove obsolote transitional dummy package
+  * add binary and dev package for C++ bindings
+  * add package for Python bindings
+  * patch Makefile.am to avoid build quiteness and install Python
+    module to the proper path
 
  -- Zoltan Gyarmati <mr.zoltan.gyarmati at gmail.com>  Tue, 28 Feb 2017 22:35:24 +0100
 
diff --git a/debian/control b/debian/control
index ab07f6a..9c90e9d 100644
--- a/debian/control
+++ b/debian/control
@@ -1,11 +1,26 @@
 Source: libsigrok
 Priority: extra
 Maintainer: Zoltan Gyarmati <mr.zoltan.gyarmati at gmail.com>
-Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config (>= 0.22), libglib2.0-dev (>= 2.32.0), libserialport-dev (>= 0.1.0), libusb-1.0-0-dev (>= 1.0.16), libzip-dev (>= 0.10), libftdi-dev (>= 0.16), doxygen, libglibmm-2.4-dev, libieee1284-3-dev
+Build-Depends: debhelper (>= 9), dh-autoreconf, pkg-config (>= 0.22), libglib2.0-dev (>= 2.32.0), libserialport-dev (>= 0.1.0), libusb-1.0-0-dev (>= 1.0.16), libzip-dev (>= 0.10), libftdi-dev (>= 0.16), doxygen, libglibmm-2.4-dev, libieee1284-3-dev, autoconf-archive, python-dev:any, python-numpy, dh-python
 Standards-Version: 3.9.8
 Section: libs
 Homepage: http://sigrok.org/wiki/Libsigrok
 
+
+Package: libsigrok3
+Section: libs
+Conflicts: libsigrok2 (<< 0.3.0-2)
+Replaces: libsigrok2 (<< 0.3.0-2)
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: sigrok hardware driver library - shared library
+ libsigrok is a shared library which provides basic hardware access
+ drivers for logic analyzers, as well as input/output file format support.
+ .
+ This package contains the shared library.
+
 Package: libsigrok-dev
 Section: libdevel
 Conflicts: libsigrok-dev (<< 0.3.0-2), libsigrok0-dev (<< 0.2.0-2)
@@ -17,12 +32,10 @@ Description: sigrok hardware driver library - development files
  libsigrok is a shared library which provides basic hardware access
  drivers for logic analyzers, as well as input/output file format support.
  .
- This package contains the header files and other development files.
+ This package contains the C header files and other development files.
 
-Package: libsigrok3
+Package: libsigrokcxx3
 Section: libs
-Conflicts: libsigrok2 (<< 0.3.0-2)
-Replaces: libsigrok2 (<< 0.3.0-2)
 Architecture: any
 Multi-Arch: same
 Pre-Depends: ${misc:Pre-Depends}
@@ -31,17 +44,26 @@ Description: sigrok hardware driver library - shared library
  libsigrok is a shared library which provides basic hardware access
  drivers for logic analyzers, as well as input/output file format support.
  .
- This package contains the shared library.
+ This package contains C++ bindings for the shared library.
 
-Package: libsigrok3cxx
-Section: libs
+Package: libsigrokcxx3-dev
+Section: libdevel
 Architecture: any
 Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: sigrok hardware driver library - shared library
+Depends: libsigrokcxx3 (= ${binary:Version}), ${misc:Depends}
+Description: sigrok C++ bindings - development files
  libsigrok is a shared library which provides basic hardware access
  drivers for logic analyzers, as well as input/output file format support.
  .
- This package contains C++ bindings for the shared library.
+ This package contains the C++ header files and other development files.
 
+Package: python-libsigrok3
+Architecture: any
+Section: python
+Provides: ${python:Provides}
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
+Description: Python bindings for the libsigrok library
+ libsigrok is a shared library which provides basic hardware access
+ drivers for logic analyzers, as well as input/output file format support.
+ .
+ This package contains Python bindings for the shared library.
diff --git a/debian/libsigrok-dev.install b/debian/libsigrok-dev.install
index 76f28fa..7c6a73d 100644
--- a/debian/libsigrok-dev.install
+++ b/debian/libsigrok-dev.install
@@ -1,4 +1,4 @@
-usr/include/*
-usr/lib/*/lib*.a
-usr/lib/*/lib*.so
-usr/lib/*/pkgconfig/*
+usr/include/libsigrok/*
+usr/lib/*/libsigrok.a
+usr/lib/*/libsigrok.so
+usr/lib/*/pkgconfig/libsigrok.pc
diff --git a/debian/libsigrok3.install b/debian/libsigrok3.install
index 3ddde58..973e7b3 100644
--- a/debian/libsigrok3.install
+++ b/debian/libsigrok3.install
@@ -1 +1 @@
-usr/lib/*/lib*.so.*
+usr/lib/*/libsigrok.so.*
diff --git a/debian/libsigrokcxx3-dev.dirs b/debian/libsigrokcxx3-dev.dirs
new file mode 100644
index 0000000..0fe3983
--- /dev/null
+++ b/debian/libsigrokcxx3-dev.dirs
@@ -0,0 +1,2 @@
+usr/lib
+usr/include/libsigrokcxx
diff --git a/debian/libsigrokcxx3-dev.install b/debian/libsigrokcxx3-dev.install
new file mode 100644
index 0000000..1139446
--- /dev/null
+++ b/debian/libsigrokcxx3-dev.install
@@ -0,0 +1,4 @@
+usr/include/libsigrokcxx/*
+usr/lib/*/libsigrokcxx.a
+usr/lib/*/libsigrokcxx.so
+usr/lib/*/pkgconfig/libsigrokcxx.pc
diff --git a/debian/libsigrokcxx3.install b/debian/libsigrokcxx3.install
new file mode 100644
index 0000000..fc655a9
--- /dev/null
+++ b/debian/libsigrokcxx3.install
@@ -0,0 +1 @@
+usr/lib/*/libsigrokcxx*.so.*
diff --git a/debian/patches/fix_python_module_install_path_for_debian b/debian/patches/fix_python_module_install_path_for_debian
new file mode 100644
index 0000000..f8b637e
--- /dev/null
+++ b/debian/patches/fix_python_module_install_path_for_debian
@@ -0,0 +1,47 @@
+Description: <short summary of the patch>
+ TODO: Put a short summary on the line above and replace this paragraph
+ with a longer explanation of this change. Complete the meta-information
+ with other relevant fields (see below for details). To make it easier, the
+ information below has been extracted from the changelog. Adjust it or drop
+ it.
+ .
+ libsigrok (0.4.0-1) UNRELEASED; urgency=medium
+ .
+   * New upstream release 0.4.0
+   * Increase package name as soname changed
+   * Remove obsolote transitional dummy package
+Author: Zoltan Gyarmati <mr.zoltan.gyarmati at gmail.com>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: 2017-03-05
+
+--- libsigrok-0.4.0.orig/Makefile.am
++++ libsigrok-0.4.0/Makefile.am
+@@ -611,7 +611,7 @@ PDOC_END = bindings/python/sigrok/core/d
+ 
+ setup_vars = VERSION='$(PACKAGE_VERSION)' CC='$(CXX)' CFLAGS='$(CXXFLAGS) $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)' CXXFLAGS='$(CXXFLAGS) $(SR_WXXFLAGS) $(PYSIGROK_CFLAGS)' LDADD='$(PYSIGROK_LIBS)'
+ setup_quiet = --quiet
+-setup_py = $(PYTHON) $(srcdir)/$(PDIR)/setup.py $(setup_vars) $(setup_quiet)
++setup_py = $(PYTHON) $(srcdir)/$(PDIR)/setup.py $(setup_vars)
+ 
+ $(PDOC_START): $(srcdir)/bindings/swig/doc.py $(CPPXMLDOC)
+ 	$(AM_V_at)test -d $(PDIR)/sigrok/core || $(MKDIR_P) $(PDIR)/sigrok/core
+@@ -638,7 +638,7 @@ $(PDIR)/timestamp: $(PDIR)/sigrok/core/c
+ python-install:
+ 	$(AM_V_at)$(MKDIR_P) "$(DESTDIR)$(prefix)" "$(DESTDIR)$(exec_prefix)"
+ 	destdir='$(DESTDIR)'; $(setup_py) install $${destdir:+"--root=$$destdir"} \
+-		--prefix "$(prefix)" --exec-prefix "$(exec_prefix)"
++		--prefix "$(prefix)" --exec-prefix "$(exec_prefix)" --install-layout='deb' --no-compile
+ 
+ python-clean:
+ 	-$(AM_V_at)rm -f $(PDIR)/timestamp
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c4c9afc
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix_python_module_install_path_for_debian
diff --git a/debian/python-libsigrok3.install b/debian/python-libsigrok3.install
new file mode 100644
index 0000000..5c87a15
--- /dev/null
+++ b/debian/python-libsigrok3.install
@@ -0,0 +1 @@
+usr/lib/python2*/dist-packages/*
diff --git a/debian/rules b/debian/rules
index cebf337..347c302 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,17 +1,22 @@
 #!/usr/bin/make -f
 
-# export DH_VERBOSE=1
+export DH_VERBOSE=1
+DEB_BUILD_OPTIONS="parallel=1"
 
 # Reduce the number of unneeded dependencies with --as-needed.
 export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
 %:
-	dh $@ --with autoreconf --parallel
+	dh $@ --with autoreconf --parallel --with python2
 
 override_dh_auto_install:
 	cp contrib/z60_libsigrok.rules debian/libsigrok3.udev
 	dh_auto_install
 
+override_dh_python2:
+	dh_numpy
+	dh_python2
+
 override_dh_auto_clean:
 	dh_auto_clean
 	rm -f debian/libsigrok3.udev

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libsigrok.git



More information about the debian-science-commits mailing list