diff options
author | Mattias Hansson <hansson.mattias@gmail.com> | 2019-03-29 13:25:39 +0100 |
---|---|---|
committer | Nico Williams <nico@cryptonector.com> | 2019-03-29 08:16:36 -0500 |
commit | 3c4fcb1594694e15b83dc05094cd1dd61f5c7dcc (patch) | |
tree | 89592dd98487aa18b77134e771773d8eadf62df4 | |
parent | b52fc1043b045a3c5004be7eb85a15d3a055e9a4 (diff) |
Add pkg-config file for libjq
pkg-config is a common interface to resolve build details. It will
become easier to incorporate libjq in other projects by providing this
interface.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | libjq.pc.in | 11 |
4 files changed, 17 insertions, 1 deletions
@@ -18,6 +18,7 @@ jq.1 # Generated source src/builtin.inc +*.pc # Autotools junk .libs diff --git a/Makefile.am b/Makefile.am index 10d706d8..dcdb0be5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 ..." diff --git a/configure.ac b/configure.ac index 3d8265e7..47102697 100644 --- a/configure.ac +++ b/configure.ac @@ -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 index 00000000..9b0ab3b8 --- /dev/null +++ b/libjq.pc.in @@ -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} |