Control: tags -1 + patch

Ohai,

On Mon, Aug 01, 2016 at 10:34:16PM -0400, Harlan Lieberman-Berg wrote:
> The new versions of sysdig built against jq, but the version in Debian
> doesn't ship the code itself to build against.
> 
> Would it be possible to get a jq-dev or libjq-dev to build against?

attached is a patch that adds libjq1 and libjq-dev.

Regards
Evgeni
>From 2bd8e81bfdc4f5608a9ce0037712945e046bd6d4 Mon Sep 17 00:00:00 2001
From: Evgeni Golov <[email protected]>
Date: Sun, 18 Dec 2016 17:14:32 +0100
Subject: [PATCH] build a shared libjq library

---
 debian/changelog                                   |  6 +++
 debian/control                                     | 41 ++++++++++++++
 debian/docs                                        |  1 -
 debian/jq.docs                                     |  2 +
 debian/jq.install                                  |  2 +
 debian/libjq-dev.install                           |  3 ++
 debian/libjq1.install                              |  1 +
 debian/patches/series                              |  1 -
 debian/patches/static-libjq-dynamic-libonig2.patch | 63 ----------------------
 debian/rules                                       |  5 +-
 10 files changed, 59 insertions(+), 66 deletions(-)
 delete mode 100644 debian/docs
 create mode 100644 debian/jq.docs
 create mode 100644 debian/jq.install
 create mode 100644 debian/libjq-dev.install
 create mode 100644 debian/libjq1.install
 delete mode 100644 debian/patches/static-libjq-dynamic-libonig2.patch

diff --git a/debian/changelog b/debian/changelog
index ab78366..a80399f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+jq (1.5+dfsg-1.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+
+ -- Evgeni Golov <[email protected]>  Sun, 18 Dec 2016 16:07:33 +0100
+
 jq (1.5+dfsg-1) unstable; urgency=medium
 
   * New upstream release.
diff --git a/debian/control b/debian/control
index b3a939d..5c667cd 100644
--- a/debian/control
+++ b/debian/control
@@ -25,3 +25,44 @@ Description: lightweight and flexible command-line JSON processor
  one that you want with very little effort, and the
  program to do so is often shorter and simpler than
  you’d expect.
+
+Package: libjq1
+Architecture: any
+Multi-Arch: same
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: lightweight and flexible command-line JSON processor - shared library
+ jq is like sed for JSON data – you can use it to slice
+ and filter and map and transform structured data with
+ the same ease that sed, awk, grep and friends let you
+ play with text.
+ .
+ It is written in portable C, and it has zero runtime
+ dependencies.
+ .
+ jq can mangle the data format that you have into the
+ one that you want with very little effort, and the
+ program to do so is often shorter and simpler than
+ you’d expect.
+ .
+ This package contains the shared library.
+
+Package: libjq-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: lightweight and flexible command-line JSON processor - development files
+ jq is like sed for JSON data – you can use it to slice
+ and filter and map and transform structured data with
+ the same ease that sed, awk, grep and friends let you
+ play with text.
+ .
+ It is written in portable C, and it has zero runtime
+ dependencies.
+ .
+ jq can mangle the data format that you have into the
+ one that you want with very little effort, and the
+ program to do so is often shorter and simpler than
+ you’d expect.
+ .
+ This package contains the development files.
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index e845566..0000000
--- a/debian/docs
+++ /dev/null
@@ -1 +0,0 @@
-README
diff --git a/debian/jq.docs b/debian/jq.docs
new file mode 100644
index 0000000..55bc0a6
--- /dev/null
+++ b/debian/jq.docs
@@ -0,0 +1,2 @@
+README
+AUTHORS
diff --git a/debian/jq.install b/debian/jq.install
new file mode 100644
index 0000000..d9dc695
--- /dev/null
+++ b/debian/jq.install
@@ -0,0 +1,2 @@
+usr/bin/jq
+usr/share/man/man1/jq.1
diff --git a/debian/libjq-dev.install b/debian/libjq-dev.install
new file mode 100644
index 0000000..9468f07
--- /dev/null
+++ b/debian/libjq-dev.install
@@ -0,0 +1,3 @@
+usr/include/jq.h
+usr/include/jv.h
+usr/lib/*/libjq.so
diff --git a/debian/libjq1.install b/debian/libjq1.install
new file mode 100644
index 0000000..7b5d3a3
--- /dev/null
+++ b/debian/libjq1.install
@@ -0,0 +1 @@
+usr/lib/*/libjq.so.*
diff --git a/debian/patches/series b/debian/patches/series
index cc72ca6..ab02865 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,4 @@
 enable-manpages.patch
 remove-unecessary-rakefile-deps.patch
 patch-version-into-build.patch
-static-libjq-dynamic-libonig2.patch
 dont-distribute-duplicate-docs.patch
diff --git a/debian/patches/static-libjq-dynamic-libonig2.patch b/debian/patches/static-libjq-dynamic-libonig2.patch
deleted file mode 100644
index 5c13bf2..0000000
--- a/debian/patches/static-libjq-dynamic-libonig2.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Description: The original Makefile either links everything dynamically or
- statically. This patch modifies the Makefile to link libjq statically and
- libonig2 dynamically.
-Author: Simon Elsbrock
-Forwarded: not-needed
-Last-Update: 2015-10-11
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: jq/Makefile.am
-===================================================================
---- jq.orig/Makefile.am	2015-10-11 03:50:10.822586743 +0200
-+++ jq/Makefile.am	2015-10-11 12:08:38.703822442 +0200
-@@ -40,12 +40,12 @@
- 
- ### libjq
- 
--lib_LTLIBRARIES = libjq.la
--libjq_la_SOURCES = ${LIBJQ_SRC}
--libjq_la_LIBADD = -lm
--libjq_la_LDFLAGS = -export-symbols-regex '^j[qv]_' -version-info 1:4:0
-+#lib_LTLIBRARIES = libjq.la
-+#libjq_la_SOURCES = ${LIBJQ_SRC}
-+#libjq_la_LIBADD = -lm
-+#libjq_la_LDFLAGS = -export-symbols-regex '^j[qv]_' -version-info 1:4:0
- 
--include_HEADERS = jv.h jq.h
-+#include_HEADERS = jv.h jq.h
- 
- ### Running tests under Valgrind
- 
-@@ -64,8 +64,8 @@
- ### Error injection for testing
- 
- if ENABLE_ERROR_INJECTION
--lib_LTLIBRARIES += libinject_errors.la
--libinject_errors_la_SOURCES = inject_errors.c
-+lib_LTLIBRARIES = libinject_errors.la
-+libinject_errors_la_SOURCES = inject_errors.c ${LIBJQ_SRC}
- libinject_errors_la_LIBADD = -ldl
- libinject_errors_la_LDFLAGS = -module
- endif
-@@ -83,13 +83,14 @@
- main.c: version.h
- 
- bin_PROGRAMS = jq
--jq_SOURCES = main.c version.h
--jq_LDFLAGS = -static-libtool-libs
--jq_LDADD = libjq.la -lm
--
--if ENABLE_ALL_STATIC
--jq_LDFLAGS += -all-static
--endif
-+jq_SOURCES = main.c version.h ${LIBJQ_SRC}
-+#jq_LDFLAGS = -static-libtool-libs
-+jq_CFLAGS = $(AM_CFLAGS)
-+jq_LDADD = -lm -lonig
-+
-+#if ENABLE_ALL_STATIC
-+#jq_LDFLAGS += -all-static
-+#endif
- 
- ### Tests (make check)
- 
diff --git a/debian/rules b/debian/rules
index 6b68166..ea0b220 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,7 +14,7 @@ get-orig-source:
 
 override_dh_auto_configure:
 	cd docs && rake manpage > ../jq.1
-	dh_auto_configure
+	dh_auto_configure -- --disable-static
 
 override_dh_auto_test:
 	VERBOSE=1 dh_auto_test
@@ -22,5 +22,8 @@ override_dh_auto_test:
 override_dh_auto_clean:
 	dh_auto_clean
 
+override_dh_install:
+	dh_install --list-missing
+
 %:
 	dh $@ --with autoreconf
-- 
2.11.0

Reply via email to