<div dir="ltr">Merged,<div>Thanks.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 18, 2017 at 7:05 PM, Benjamin Marzinski <span dir="ltr"><<a href="mailto:bmarzins@redhat.com" target="_blank">bmarzins@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, May 15, 2017 at 10:33:25PM +0200, Martin Wilck wrote:<br>
<br>
Fine by me.<br>
<br>
-Ben<br>
<div class="HOEnZb"><div class="h5"><br>
> Introduce a new Makefile variable, usr_prefix, to be used for<br>
> libdmmp and the associated pkgconfig file.<br>
><br>
> Some distributions install those libraries which are  necessary<br>
> for booting (and mounting /usr) in a different location (/lib or<br>
> /lib64) than other libraries (/usr/lib or /usr/lib64). On such<br>
> distributions, installation to the different paths can be achieved<br>
> by setting "usr_prefix=/usr". This will affect only libdmmp at this<br>
> time, as all other libaries in the multipath-tools package may be<br>
> relevant for booting.<br>
><br>
> For distributions on which /lib and /lib64 are just symlinks to their<br>
> /usr counterparts, nothing changes.<br>
><br>
> Comments are welcome.<br>
><br>
> Signed-off-by: Martin Wilck <<a href="mailto:mwilck@suse.com">mwilck@suse.com</a>><br>
> ---<br>
>  Makefile.inc     |  4 +++-<br>
>  libdmmp/Makefile | 11 ++++++-----<br>
>  2 files changed, 9 insertions(+), 6 deletions(-)<br>
><br>
> diff --git a/Makefile.inc b/Makefile.inc<br>
> index ad55aa10..ad08f307 100644<br>
> --- a/Makefile.inc<br>
> +++ b/Makefile.inc<br>
> @@ -47,6 +47,7 @@ endif<br>
><br>
>  prefix               =<br>
>  exec_prefix  = $(prefix)<br>
> +usr_prefix   = $(prefix)<br>
>  bindir               = $(exec_prefix)/sbin<br>
>  libudevdir   = $(prefix)/$(SYSTEMDPATH)/udev<br>
>  udevrulesdir = $(libudevdir)/rules.d<br>
> @@ -55,6 +56,7 @@ man8dir             = $(prefix)/usr/share/man/man8<br>
>  man5dir              = $(prefix)/usr/share/man/man5<br>
>  man3dir              = $(prefix)/usr/share/man/man3<br>
>  syslibdir    = $(prefix)/$(LIB)<br>
> +usrlibdir    = $(usr_prefix)/$(LIB)<br>
>  libdir               = $(prefix)/$(LIB)/multipath<br>
>  unitdir              = $(prefix)/$(SYSTEMDPATH)/<wbr>systemd/system<br>
>  mpathpersistdir      = $(TOPDIR)/libmpathpersist<br>
> @@ -62,7 +64,7 @@ mpathcmddir = $(TOPDIR)/libmpathcmd<br>
>  thirdpartydir        = $(TOPDIR)/third-party<br>
>  libdmmpdir   = $(TOPDIR)/libdmmp<br>
>  includedir   = $(prefix)/usr/include<br>
> -pkgconfdir   = $(prefix)/$(LIB)/pkgconfig<br>
> +pkgconfdir   = $(usrlibdir)/pkgconfig<br>
><br>
>  GZIP         = gzip -9 -c<br>
>  RM           = rm -f<br>
> diff --git a/libdmmp/Makefile b/libdmmp/Makefile<br>
> index 1c5329aa..908e294b 100644<br>
> --- a/libdmmp/Makefile<br>
> +++ b/libdmmp/Makefile<br>
> @@ -27,15 +27,16 @@ $(LIBS): $(OBJS)<br>
>       $(LN) $@ $(DEVLIB)<br>
><br>
>  install:<br>
> -     $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(syslibdir)/$(LIBS)<br>
> +     mkdir -p $(DESTDIR)$(usrlibdir)<br>
> +     $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(usrlibdir)/$(LIBS)<br>
>       $(INSTALL_PROGRAM) -m 644 -D \<br>
>               $(HEADERS) $(DESTDIR)$(includedir)/$(<wbr>HEADERS)<br>
> -     $(LN) $(LIBS) $(DESTDIR)$(syslibdir)/$(<wbr>DEVLIB)<br>
> +     $(LN) $(LIBS) $(DESTDIR)$(usrlibdir)/$(<wbr>DEVLIB)<br>
>       $(INSTALL_PROGRAM) -m 644 -D \<br>
>               $(PKGFILE).in $(DESTDIR)$(pkgconfdir)/$(<wbr>PKGFILE)<br>
>       perl -i -pe 's|__VERSION__|$(LIBDMMP_<wbr>VERSION)|g' \<br>
>               $(DESTDIR)$(pkgconfdir)/$(<wbr>PKGFILE)<br>
> -     perl -i -pe 's|__LIBDIR__|$(syslibdir)|g' \<br>
> +     perl -i -pe 's|__LIBDIR__|$(usrlibdir)|g' \<br>
>               $(DESTDIR)$(pkgconfdir)/$(<wbr>PKGFILE)<br>
>       perl -i -pe 's|__INCLUDEDIR__|$(<wbr>includedir)|g' \<br>
>               $(DESTDIR)$(pkgconfdir)/$(<wbr>PKGFILE)<br>
> @@ -46,9 +47,9 @@ install:<br>
>       done<br>
><br>
>  uninstall:<br>
> -     $(RM) $(DESTDIR)$(syslibdir)/$(LIBS)<br>
> +     $(RM) $(DESTDIR)$(usrlibdir)/$(LIBS)<br>
>       $(RM) $(DESTDIR)$(includedir)/$(<wbr>HEADERS)<br>
> -     $(RM) $(DESTDIR)$(syslibdir)/$(<wbr>DEVLIB)<br>
> +     $(RM) $(DESTDIR)$(usrlibdir)/$(<wbr>DEVLIB)<br>
>       @for file in $(DESTDIR)$(man3dir)/dmmp_*; do \<br>
>               $(RM) $$file; \<br>
>       done<br>
> --<br>
> 2.12.2<br>
</div></div></blockquote></div><br></div>