]> granicus.if.org Git - jq/commitdiff
Add pkg-config file for libjq
authorMattias Hansson <hansson.mattias@gmail.com>
Fri, 29 Mar 2019 12:25:39 +0000 (13:25 +0100)
committerNico Williams <nico@cryptonector.com>
Fri, 29 Mar 2019 13:16:36 +0000 (08:16 -0500)
pkg-config is a common interface to resolve build details. It will
become easier to incorporate libjq in other projects by providing this
interface.

.gitignore
Makefile.am
configure.ac
libjq.pc.in [new file with mode: 0644]

index 666749f5bffcd46dc21a55aaeb352952d51287c8..7a53e6ec2ac8a879a018f48291cbaa01a0b4ef85 100644 (file)
@@ -18,6 +18,7 @@ jq.1
 
 # Generated source
 src/builtin.inc
+*.pc
 
 # Autotools junk
 .libs
index 10d706d8dbb6e9bed2a91c4abe3b24f60f039445..dcdb0be5432d507d46679e61779017eabc8a5803 100644 (file)
@@ -175,6 +175,7 @@ DOC_FILES = docs/content docs/public docs/templates docs/site.yml       \
 EXTRA_DIST = $(DOC_FILES) $(man_MANS) $(TESTS) $(TEST_LOG_COMPILER)     \
         jq.1.prebuilt jq.spec src/lexer.c src/lexer.h src/parser.c      \
         src/parser.h src/version.h src/builtin.jq scripts/version       \
+        libjq.pc                                                        \
         tests/base64.test tests/jq-f-test.sh tests/jq.test              \
         tests/modules/a.jq tests/modules/b/b.jq tests/modules/c/c.jq    \
         tests/modules/c/d.jq tests/modules/data.json                    \
@@ -194,6 +195,9 @@ EXTRA_DIST = $(DOC_FILES) $(man_MANS) $(TESTS) $(TEST_LOG_COMPILER)     \
 docdir = ${datadir}/doc/${PACKAGE}
 dist_doc_DATA = README.md COPYING AUTHORS README
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libjq.pc
+
 RELEASE ?= 1
 rpm: dist jq.spec
        @echo "Packaging jq as an RPM ..."
index 3d8265e7b4e85d74f17ed3a86c997e571da679c0..47102697300263127d728f6c4d8344c21265d746 100644 (file)
@@ -279,6 +279,6 @@ AM_CONDITIONAL([BUILD_ONIGURUMA], [test "x$build_oniguruma" = xyes])
 AC_SUBST([BUNDLER], ["$bundle_cmd"])
 
 AC_CONFIG_MACRO_DIR([config/m4])
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile libjq.pc])
 AC_OUTPUT
 
diff --git a/libjq.pc.in b/libjq.pc.in
new file mode 100644 (file)
index 0000000..9b0ab3b
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libjq
+URL: https://stedolan.github.io/jq/
+Description: Library to process JSON using a query language
+Version: @VERSION@
+Libs: -L${libdir} -ljq
+Cflags: -I${includedir}