0002-libcap-split-install-into-install-shared-install-sta.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From af21635665ab568f3333ff9fe8b474f4950e5acb Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Sun, 6 Mar 2016 22:53:24 +0100
  4. Subject: [PATCH] libcap: split install into install-shared/install-static
  5. In order to support static only builds, split the install target into
  6. install-shared and install-static targets.
  7. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  8. [yann.morin.1998@free.fr: install the .pc file in the common rule]
  9. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  10. diff --git a/libcap/Makefile b/libcap/Makefile
  11. index d189777..44ddb27 100644
  12. --- a/libcap/Makefile
  13. +++ b/libcap/Makefile
  14. @@ -62,19 +62,25 @@ $(MINLIBNAME): $(OBJS)
  15. cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS)
  16. $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
  17. -install: all
  18. +install: install-shared install-static
  19. +
  20. +install-common:
  21. mkdir -p -m 0755 $(FAKEROOT)$(INCDIR)/sys
  22. install -m 0644 include/sys/capability.h $(FAKEROOT)$(INCDIR)/sys
  23. + mkdir -p -m 0755 $(FAKEROOT)$(PKGCONFIGDIR)
  24. + install -m 0644 libcap.pc $(FAKEROOT)$(PKGCONFIGDIR)/libcap.pc
  25. +
  26. +install-static: $(STALIBNAME) install-common
  27. mkdir -p -m 0755 $(FAKEROOT)$(LIBDIR)
  28. install -m 0644 $(STALIBNAME) $(FAKEROOT)$(LIBDIR)/$(STALIBNAME)
  29. +
  30. +install-shared: $(MINLIBNAME) install-common
  31. install -m 0644 $(MINLIBNAME) $(FAKEROOT)$(LIBDIR)/$(MINLIBNAME)
  32. ln -sf $(MINLIBNAME) $(FAKEROOT)$(LIBDIR)/$(MAJLIBNAME)
  33. ln -sf $(MAJLIBNAME) $(FAKEROOT)$(LIBDIR)/$(LIBNAME)
  34. ifeq ($(FAKEROOT),)
  35. -/sbin/ldconfig
  36. endif
  37. - mkdir -p -m 0755 $(FAKEROOT)$(PKGCONFIGDIR)
  38. - install -m 0644 libcap.pc $(FAKEROOT)$(PKGCONFIGDIR)/libcap.pc
  39. clean:
  40. $(LOCALCLEAN)
  41. --
  42. 1.9.1