All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: keyrings@vger.kernel.org
Subject: Re: [PATCH] keyutils: Add pkg-config file for keyutils library
Date: Fri, 27 Jul 2018 19:31:15 +0000	[thread overview]
Message-ID: <15d5f116-b155-5b73-4352-e7b92adf8b82@intel.com> (raw)
In-Reply-To: <153151276086.61570.3244664656185894092.stgit@djiang5-desk3.ch.intel.com>

David, any issues with this patch?

On 07/13/2018 01:12 PM, Dave Jiang wrote:
> This is needed so that other projects can add a dependency on libkeyutils via
> PKG_CHECK_MODULES([KEYUTILS], [keyutils]).  This enabling makes 'make install'
> do the right thing, and of course individual distros will need to add enabling
> to their associated packages (rpm, deb, etc.) so the package manager
> installs do the right thing.
> 
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> ---
>  Makefile       |   13 +++++++++++++
>  keyutils.pc.in |   10 ++++++++++
>  keyutils.spec  |    1 +
>  3 files changed, 24 insertions(+)
>  create mode 100644 keyutils.pc.in
> 
> diff --git a/Makefile b/Makefile
> index 824bbbf..e2976ad 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -19,6 +19,7 @@ MAN8		:= $(MANDIR)/man8
>  INCLUDEDIR	:= /usr/include
>  LN		:= ln
>  LNS		:= $(LN) -sf
> +PREFIX 		:= /usr
>  
>  ###############################################################################
>  #
> @@ -78,6 +79,9 @@ endif
>  endif
>  endif
>  
> +PKGCONFIG 	:= keyutils.pc
> +PKGCONFIG_DIR 	:= $(USRLIBDIR)/pkgconfig
> +
>  ###############################################################################
>  #
>  # This is necessary if glibc doesn't know about the key management error codes
> @@ -168,6 +172,15 @@ ifeq ($(NO_SOLIB),0)
>  	$(LNS) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
>  	mkdir -p $(DESTDIR)$(USRLIBDIR)
>  	$(LNS) $(LIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB)
> +	sed \
> +	-e 's,@VERSION\@,$(VERSION),g' \
> +	-e 's,@prefix\@,$(PREFIX),g' \
> +	-e 's,@exec_prefix\@,$(PREFIX),g' \
> +	-e 's,@libdir\@,$(USRLIBDIR),g' \
> +	-e 's,@includedir\@,$(INCLUDEDIR),g' \
> +	< $(PKGCONFIG).in > $(PKGCONFIG) || rm $(PKGCONFIG)
> +	$(INSTALL) -D $(PKGCONFIG) $(PKGCONFIG_DIR)/$(PKGCONFIG)
> +	rm $(PKGCONFIG)
>  endif
>  	$(INSTALL) -D keyctl $(DESTDIR)$(BINDIR)/keyctl
>  	$(INSTALL) -D request-key $(DESTDIR)$(SBINDIR)/request-key
> diff --git a/keyutils.pc.in b/keyutils.pc.in
> new file mode 100644
> index 0000000..44fd6e1
> --- /dev/null
> +++ b/keyutils.pc.in
> @@ -0,0 +1,10 @@
> +prefix=@prefix@
> +exec_prefix=@exec_prefix@
> +libdir=@libdir@
> +includedir=@includedir@
> +
> +Name: keyutils
> +Description: keyutils library
> +Version: @VERSION@
> +Cflags: -I${includedir}
> +Libs: -L${libdir} -lkeyutils
> diff --git a/keyutils.spec b/keyutils.spec
> index 1cbcf86..0e446ad 100644
> --- a/keyutils.spec
> +++ b/keyutils.spec
> @@ -100,6 +100,7 @@ rm -rf $RPM_BUILD_ROOT
>  %{_mandir}/man7/*
>  %{_libdir}/libkeyutils.so.%{libapiversion}
>  %{_libdir}/libkeyutils.so.%{libapivermajor}
> +%{_libdir}/pkgconfig/keyutils.pc
>  
>  %files libs-devel
>  %defattr(-,root,root,-)
> 

      reply	other threads:[~2018-07-27 19:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-13 20:12 [PATCH] keyutils: Add pkg-config file for keyutils library Dave Jiang
2018-07-27 19:31 ` Dave Jiang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15d5f116-b155-5b73-4352-e7b92adf8b82@intel.com \
    --to=dave.jiang@intel.com \
    --cc=keyrings@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.