From ea545df91284aad921b800d757c3743551e9a2ab Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 16 Sep 2011 08:23:23 +0200 Subject: [PATCH] add support to create a pkgconfig file 'libnfs.pc' on build, and install this with 'make install' Signed-off-by: Stephan Raue --- .gitignore | 2 ++ Makefile.am | 5 +++++ configure.ac | 2 +- libnfs.pc.in | 14 ++++++++++++++ packaging/RPM/libnfs.spec.in | 1 + 5 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 libnfs.pc.in diff --git a/.gitignore b/.gitignore index 0524f87..a7f4650 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,5 @@ libtool ltmain.sh missing stamp-h1 + +!libnfs.pc.in \ No newline at end of file diff --git a/Makefile.am b/Makefile.am index 653060d..03e4419 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,2 +1,7 @@ SUBDIRS = mount nfs portmap rquota lib include . $(MAYBE_EXAMPLES) +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libnfs.pc + +EXTRA_DIST = README COPYING libnfs.pc.in + diff --git a/configure.ac b/configure.ac index 1b21947..24400c3 100644 --- a/configure.ac +++ b/configure.ac @@ -88,4 +88,4 @@ AC_CONFIG_FILES([Makefile] [examples/Makefile] ) -AC_OUTPUT +AC_OUTPUT([libnfs.pc]) diff --git a/libnfs.pc.in b/libnfs.pc.in new file mode 100644 index 0000000..fdc012c --- /dev/null +++ b/libnfs.pc.in @@ -0,0 +1,14 @@ +# libnfs pkg-config file + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libnfs +Description: libnfs is a client library for accessing NFS shares over a network. +Version: @VERSION@ +Requires: +Conflicts: +Libs: -L${libdir} -lnfs +Cflags: -I${includedir} diff --git a/packaging/RPM/libnfs.spec.in b/packaging/RPM/libnfs.spec.in index 5450ede..03feb04 100644 --- a/packaging/RPM/libnfs.spec.in +++ b/packaging/RPM/libnfs.spec.in @@ -91,6 +91,7 @@ development libraries for LibNFS %{_includedir}/nfsc/libnfs-raw-rquota.h %{_libdir}/libnfs.a %{_libdir}/libnfs.la +%{_libdir}/pkgconfig/libnfs.pc %changelog * Sun Jul 31 2011 : Version 1.0 -- 2.34.1