From fbf69f31cb944375d01c7060ffe9a81ec2b1e685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Tue, 7 Mar 2017 00:50:17 +0100 Subject: [PATCH] Start using pkg-config / pkgconf. --- .gitignore | 1 + configure.ac | 17 ++++++++++++++++- lib/cipher/Makefile.am | 2 ++ lib/cipher/cryb-cipher.pc.in | 11 +++++++++++ lib/core/Makefile.am | 2 ++ lib/core/cryb-core.pc.in | 10 ++++++++++ lib/cpe/Makefile.am | 2 ++ lib/cpe/cryb-cpe.pc.in | 11 +++++++++++ lib/digest/Makefile.am | 2 ++ lib/digest/cryb-digest.pc.in | 11 +++++++++++ lib/enc/Makefile.am | 2 ++ lib/enc/cryb-enc.pc.in | 11 +++++++++++ lib/hash/Makefile.am | 2 ++ lib/hash/cryb-hash.pc.in | 11 +++++++++++ lib/mac/Makefile.am | 2 ++ lib/mac/cryb-mac.pc.in | 11 +++++++++++ lib/mpi/Makefile.am | 2 ++ lib/mpi/cryb-mpi.pc.in | 11 +++++++++++ lib/oath/Makefile.am | 2 ++ lib/oath/cryb-oath.pc.in | 11 +++++++++++ lib/rand/Makefile.am | 2 ++ lib/rand/cryb-rand.pc.in | 11 +++++++++++ lib/test/Makefile.am | 2 ++ lib/test/cryb-test.pc.in | 11 +++++++++++ 24 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 lib/cipher/cryb-cipher.pc.in create mode 100644 lib/core/cryb-core.pc.in create mode 100644 lib/cpe/cryb-cpe.pc.in create mode 100644 lib/digest/cryb-digest.pc.in create mode 100644 lib/enc/cryb-enc.pc.in create mode 100644 lib/hash/cryb-hash.pc.in create mode 100644 lib/mac/cryb-mac.pc.in create mode 100644 lib/mpi/cryb-mpi.pc.in create mode 100644 lib/oath/cryb-oath.pc.in create mode 100644 lib/rand/cryb-rand.pc.in create mode 100644 lib/test/cryb-test.pc.in diff --git a/.gitignore b/.gitignore index d45a0a1..1e9db41 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ *.lo *.log *.o +*.pc *.trs Makefile Makefile.in diff --git a/configure.ac b/configure.ac index 3dd4f74..d1832c2 100644 --- a/configure.ac +++ b/configure.ac @@ -39,6 +39,10 @@ AC_TYPE_UINTPTR_T LT_PREREQ([2.2.6]) LT_INIT() +# pkg-config +PKG_PROG_PKG_CONFIG +PKG_INSTALLDIR + # other programs AC_PROG_INSTALL @@ -217,7 +221,7 @@ AM_CONDITIONAL([CRYB_HASH], [test x"$enable_cryb_hash" = x"yes"]) # Message authentication codes elements="$elements mac" -requires="$requires mac:core" +requires="$requires mac:core mac:digest" AC_ARG_ENABLE([cryb-mac], AC_HELP_STRING([--enable-cryb-mac], [build the message authentication code library]), @@ -291,17 +295,28 @@ AC_CONFIG_FILES([ include/cryb/Makefile lib/Makefile lib/cipher/Makefile + lib/cipher/cryb-cipher.pc lib/core/Makefile + lib/core/cryb-core.pc lib/cpe/Makefile + lib/cpe/cryb-cpe.pc lib/digest/Makefile + lib/digest/cryb-digest.pc lib/enc/Makefile + lib/enc/cryb-enc.pc lib/hash/Makefile + lib/hash/cryb-hash.pc lib/mac/Makefile + lib/mac/cryb-mac.pc lib/mpi/Makefile + lib/mpi/cryb-mpi.pc lib/oath/Makefile + lib/oath/cryb-oath.pc lib/rand/Makefile + lib/rand/cryb-rand.pc lib/rsaref/Makefile lib/test/Makefile + lib/test/cryb-test.pc t/Makefile ]) AC_CONFIG_FILES([mkpkgng], [chmod +x mkpkgng]) diff --git a/lib/cipher/Makefile.am b/lib/cipher/Makefile.am index 086cf91..e81df3e 100644 --- a/lib/cipher/Makefile.am +++ b/lib/cipher/Makefile.am @@ -10,3 +10,5 @@ libcryb_cipher_la_SOURCES = \ libcryb_cipher_la_LIBADD = \ $(top_builddir)/lib/core/libcryb-core.la + +pkgconfig_DATA = cryb-cipher.pc diff --git a/lib/cipher/cryb-cipher.pc.in b/lib/cipher/cryb-cipher.pc.in new file mode 100644 index 0000000..e7497bc --- /dev/null +++ b/lib/cipher/cryb-cipher.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: cryb-cipher +Description: Cryb.to encryption algorithms +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lcryb-cipher +Requires.private: cryb-core diff --git a/lib/core/Makefile.am b/lib/core/Makefile.am index facc4e2..f42a975 100644 --- a/lib/core/Makefile.am +++ b/lib/core/Makefile.am @@ -21,3 +21,5 @@ EXTRA_DIST = cryb_string_impl.c dist_man3_MANS = \ cryb_strlcat.3 \ cryb_strlcpy.3 + +pkgconfig_DATA = cryb-core.pc diff --git a/lib/core/cryb-core.pc.in b/lib/core/cryb-core.pc.in new file mode 100644 index 0000000..e7beb30 --- /dev/null +++ b/lib/core/cryb-core.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: cryb-core +Description: Cryb.to core utilities +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lcryb-core diff --git a/lib/cpe/Makefile.am b/lib/cpe/Makefile.am index c053b48..3ee0456 100644 --- a/lib/cpe/Makefile.am +++ b/lib/cpe/Makefile.am @@ -17,3 +17,5 @@ libcryb_cpe_la_SOURCES = \ libcryb_cpe_la_LIBADD = \ $(top_builddir)/lib/core/libcryb-core.la + +pkgconfig_DATA = cryb-cpe.pc diff --git a/lib/cpe/cryb-cpe.pc.in b/lib/cpe/cryb-cpe.pc.in new file mode 100644 index 0000000..6649bce --- /dev/null +++ b/lib/cpe/cryb-cpe.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: cryb-cpe +Description: Cryb.to CPE manipulation +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lcryb-cpe +Requires.private: cryb-core diff --git a/lib/digest/Makefile.am b/lib/digest/Makefile.am index 50aaab2..44f01c0 100644 --- a/lib/digest/Makefile.am +++ b/lib/digest/Makefile.am @@ -23,3 +23,5 @@ dist_man3_MANS = \ libcryb_digest_la_LIBADD = \ $(top_builddir)/lib/core/libcryb-core.la + +pkgconfig_DATA = cryb-digest.pc diff --git a/lib/digest/cryb-digest.pc.in b/lib/digest/cryb-digest.pc.in new file mode 100644 index 0000000..e08c43c --- /dev/null +++ b/lib/digest/cryb-digest.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: cryb-digest +Description: Cryb.to cryptographic hash primitives +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lcryb-digest +Requires.private: cryb-core diff --git a/lib/enc/Makefile.am b/lib/enc/Makefile.am index 941b62d..000bb40 100644 --- a/lib/enc/Makefile.am +++ b/lib/enc/Makefile.am @@ -17,3 +17,5 @@ dist_man3_MANS = \ libcryb_enc_la_LIBADD = \ $(top_builddir)/lib/core/libcryb-core.la + +pkgconfig_DATA = cryb-enc.pc diff --git a/lib/enc/cryb-enc.pc.in b/lib/enc/cryb-enc.pc.in new file mode 100644 index 0000000..77f246f --- /dev/null +++ b/lib/enc/cryb-enc.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: cryb-enc +Description: Cryb.to non-cryptographic encoding primitives +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lcryb-enc +Requires.private: cryb-core diff --git a/lib/hash/Makefile.am b/lib/hash/Makefile.am index 057cc8b..3dac803 100644 --- a/lib/hash/Makefile.am +++ b/lib/hash/Makefile.am @@ -21,3 +21,5 @@ dist_man3_MANS = \ libcryb_hash_la_LIBADD = \ $(top_builddir)/lib/core/libcryb-core.la + +pkgconfig_DATA = cryb-hash.pc diff --git a/lib/hash/cryb-hash.pc.in b/lib/hash/cryb-hash.pc.in new file mode 100644 index 0000000..de03329 --- /dev/null +++ b/lib/hash/cryb-hash.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: cryb-hash +Description: Cryb.to non-cryptographic hash algorithms +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lcryb-hash +Requires.private: cryb-core diff --git a/lib/mac/Makefile.am b/lib/mac/Makefile.am index 1741811..f3dd8ae 100644 --- a/lib/mac/Makefile.am +++ b/lib/mac/Makefile.am @@ -14,3 +14,5 @@ libcryb_mac_la_SOURCES = \ libcryb_mac_la_LIBADD = \ $(top_builddir)/lib/core/libcryb-core.la \ $(top_builddir)/lib/digest/libcryb-digest.la + +pkgconfig_DATA = cryb-mac.pc diff --git a/lib/mac/cryb-mac.pc.in b/lib/mac/cryb-mac.pc.in new file mode 100644 index 0000000..ed94694 --- /dev/null +++ b/lib/mac/cryb-mac.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: cryb-mac +Description: Cryb.to message authentication codes +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lcryb-mac +Requires.private: cryb-core cryb-digest diff --git a/lib/mpi/Makefile.am b/lib/mpi/Makefile.am index bd17891..d6dfb13 100644 --- a/lib/mpi/Makefile.am +++ b/lib/mpi/Makefile.am @@ -30,3 +30,5 @@ noinst_HEADERS = \ libcryb_mpi_la_LIBADD = \ $(top_builddir)/lib/core/libcryb-core.la + +pkgconfig_DATA = cryb-mpi.pc diff --git a/lib/mpi/cryb-mpi.pc.in b/lib/mpi/cryb-mpi.pc.in new file mode 100644 index 0000000..6cdf189 --- /dev/null +++ b/lib/mpi/cryb-mpi.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: cryb-mpi +Description: Cryb.to multiple-precision integer arithmetic +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lcryb-mpi +Requires.private: cryb-core diff --git a/lib/oath/Makefile.am b/lib/oath/Makefile.am index 667766c..d1ba66d 100644 --- a/lib/oath/Makefile.am +++ b/lib/oath/Makefile.am @@ -21,3 +21,5 @@ libcryb_oath_la_LIBADD = \ $(top_builddir)/lib/mac/libcryb-mac.la \ $(top_builddir)/lib/rand/libcryb-rand.la \ $(top_builddir)/lib/core/libcryb-core.la + +pkgconfig_DATA = cryb-oath.pc diff --git a/lib/oath/cryb-oath.pc.in b/lib/oath/cryb-oath.pc.in new file mode 100644 index 0000000..3d48fc9 --- /dev/null +++ b/lib/oath/cryb-oath.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: cryb-oath +Description: Cryb.to Open Authentication primitives +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lcryb-oath +Requires.private: cryb-core cryb-digest cryb-enc cryb-mac cryb-rand diff --git a/lib/rand/Makefile.am b/lib/rand/Makefile.am index 982f99e..6057ee7 100644 --- a/lib/rand/Makefile.am +++ b/lib/rand/Makefile.am @@ -9,3 +9,5 @@ libcryb_rand_la_SOURCES = \ libcryb_rand_la_LIBADD = \ $(top_builddir)/lib/core/libcryb-core.la + +pkgconfig_DATA = cryb-rand.pc diff --git a/lib/rand/cryb-rand.pc.in b/lib/rand/cryb-rand.pc.in new file mode 100644 index 0000000..9d1b334 --- /dev/null +++ b/lib/rand/cryb-rand.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: cryb-rand +Description: Cryb.to random number generators +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lcryb-rand +Requires.private: cryb-core diff --git a/lib/test/Makefile.am b/lib/test/Makefile.am index b61d0a6..cd87804 100644 --- a/lib/test/Makefile.am +++ b/lib/test/Makefile.am @@ -12,3 +12,5 @@ libcryb_test_la_SOURCES = \ libcryb_test_la_LIBADD = \ $(top_builddir)/lib/core/libcryb-core.la + +pkgconfig_DATA = cryb-test.pc diff --git a/lib/test/cryb-test.pc.in b/lib/test/cryb-test.pc.in new file mode 100644 index 0000000..7eccecc --- /dev/null +++ b/lib/test/cryb-test.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ + +Name: cryb-test +Description: Cryb.to automated test framework +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lcryb-test +Requires.private: cryb-core