21e7f2afc8ae0b302e7ec19fd76fc0f33fbd7d5f
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / libcap / 0002-split-static-shared-install.patch
1 libcap: split install into install-shared/install-static
2
3 In order to support static only builds, split the install target into
4 install-shared and install-static targets.
5
6 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7
8 Index: b/libcap/Makefile
9 ===================================================================
10 --- a/libcap/Makefile
11 +++ b/libcap/Makefile
12 @@ -60,11 +60,17 @@
13  cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS)
14         $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@
15  
16 -install: all
17 +install: install-shared install-static
18 +
19 +install-common:
20         mkdir -p -m 0755 $(INCDIR)/sys
21         install -m 0644 include/sys/capability.h $(INCDIR)/sys
22         mkdir -p -m 0755 $(LIBDIR)
23 +
24 +install-static: install-common
25         install -m 0644 $(STALIBNAME) $(LIBDIR)/$(STALIBNAME)
26 +
27 +install-shared: install-common
28         install -m 0755 $(MINLIBNAME) $(LIBDIR)/$(MINLIBNAME)
29         ln -sf $(MINLIBNAME) $(LIBDIR)/$(MAJLIBNAME)
30         ln -sf $(MAJLIBNAME) $(LIBDIR)/$(LIBNAME)