python-cryptography: bump to version 1.7.2
[buildroot-gz.git] / package / vpnc / 0004-Makefile-provide-an-option-to-not-build-manpages.patch
blobf767a59b7815e4a19cadae00e5e48ca6862c9a3d
1 From 3c16d0b7bf809a56affd6e1a4c0998027968b91a Mon Sep 17 00:00:00 2001
2 From: Ulf Samuelsson <ulf.samuelsson@atmel.com>
3 Date: Mon, 8 Feb 2016 23:03:48 +0100
4 Subject: [PATCH] Makefile: provide an option to not build manpages
6 The process of generating the vpnc.8 man page consists in running the
7 vpnc tool itself, and parse its --long-help output. While this is
8 perfectly fine when building natively, it fails completely when
9 cross-compiling: the vpnc binary that was built cannot be executed on
10 the build machine.
12 In order to support such situations with minimal changes, this patch
13 adjusts the Makefile to make it understand a MANS variable. By
14 default, it's defined to "vpnc.8", which means the manpage continues
15 to be built as usual. However, if it's overriden to be empty, then no
16 manpage is built.
18 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
19 ---
21 Makefile | 5 ++++-
22 1 file changed, 4 insertions(+), 1 deletion(-)
24 diff --git a/Makefile b/Makefile
25 index 7ac225a..ea2cd41 100644
26 --- a/Makefile
27 +++ b/Makefile
28 @@ -54,6 +54,7 @@ endif
29 SRCS = sysdep.c vpnc-debug.c isakmp-pkt.c tunip.c config.c dh.c math_group.c supp.c decrypt-utils.c crypto.c $(CRYPTO_SRCS)
30 BINS = vpnc cisco-decrypt test-crypto
31 OBJS = $(addsuffix .o,$(basename $(SRCS)))
32 +MANS ?= vpnc.8
33 CRYPTO_OBJS = $(addsuffix .o,$(basename $(CRYPTO_SRCS)))
34 BINOBJS = $(addsuffix .o,$(BINS))
35 BINSRCS = $(addsuffix .c,$(BINS))
36 @@ -76,7 +77,7 @@ ifneq (,$(findstring Apple,$(shell $(CC) --version)))
37 override CFLAGS += -fstrict-aliasing -freorder-blocks -fsched-interblock
38 endif
40 -all : $(BINS) vpnc.8
41 +all : $(BINS) $(MANS)
43 vpnc : $(OBJS) vpnc.o
44 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
45 @@ -136,7 +137,9 @@ install-common: all
46 install -m600 vpnc.conf $(DESTDIR)$(ETCDIR)/default.conf
47 install -m755 vpnc-disconnect $(DESTDIR)$(SBINDIR)
48 install -m755 pcf2vpnc $(DESTDIR)$(BINDIR)
49 +ifneq ($(MANS),)
50 install -m644 vpnc.8 $(DESTDIR)$(MANDIR)/man8
51 +endif
52 install -m644 pcf2vpnc.1 $(DESTDIR)$(MANDIR)/man1
53 install -m644 cisco-decrypt.1 $(DESTDIR)$(MANDIR)/man1
54 install -m644 COPYING $(DESTDIR)$(DOCDIR)
55 --
56 2.6.4