From 2d001b698703de2897b344afc42a4df103b7dfe4 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Wed, 12 Mar 2008 20:37:37 +0200 Subject: [PATCH] [haproxy] Improved make-install.patch to install man pages and documentation --- network/haproxy/make-install.patch | 204 +++++++++++++++++++++++++++++ 1 file changed, 204 insertions(+) diff --git a/network/haproxy/make-install.patch b/network/haproxy/make-install.patch index 6a619b4f5..6967532fd 100644 --- a/network/haproxy/make-install.patch +++ b/network/haproxy/make-install.patch @@ -14,6 +14,18 @@ # version. # --- SDE-COPYRIGHT-NOTE-END --- +From f2519e98ee14cec14f7d4d834bcb30eac0f05e36 Mon Sep 17 00:00:00 2001 +From: Christian Wiese +Date: Wed, 12 Mar 2008 15:25:35 +0200 +Subject: [BUILD] Added support for 'make install' + +To be flexible while installing haproxy following variables have been +added to the Makefile: +- DESTDIR useful i.e. while installing in a sandbox (not set by default) +- PREFIX defines the default install prefix (default: /usr/local) +- SBINDIR defines the dir the haproxy binary gets installed + (default: $PREFIX/sbin) + diff --git a/Makefile b/Makefile index 5e9b11d..1175877 100644 --- a/Makefile @@ -53,3 +65,195 @@ index 5e9b11d..1175877 100644 clean: rm -f *.[oas] src/*.[oas] core haproxy test for dir in . src include/* doc; do rm -f $$dir/*~ $$dir/*.rej;done +-- +1.5.4 + + +From 8ef166cadc1202fbb00549666870b38eac4b5a27 Mon Sep 17 00:00:00 2001 +From: Christian Wiese +Date: Wed, 12 Mar 2008 15:57:54 +0200 +Subject: [BUILD] Added 'install-man' make target for installing the man page + +This change is also introducing a new variable in the Makefile called +MANDIR, which is set to "$PREFIX/share/man" by default. + +diff --git a/Makefile b/Makefile +index 1175877..69f86a1 100644 +--- a/Makefile ++++ b/Makefile +@@ -44,6 +44,8 @@ + # PREFIX is set to "/usr/local" by default and is used for installation only. + # SBINDIR is set to "$(PREFIX)/sbin" by default and is used for installation + # only. ++# MANDIR is set to "$(PREFIX)/share/man" by default and is used for ++# installation only. + # + # Other variables : + # DLMALLOC_SRC : build with dlmalloc, indicate the location of dlmalloc.c. +@@ -58,6 +60,7 @@ + DESTDIR = + PREFIX = /usr/local + SBINDIR = $(PREFIX)/sbin ++MANDIR = $(PREFIX)/man + + #### TARGET system + # Use TARGET= to optimize for a specifc target OS among the +@@ -451,7 +454,11 @@ src/haproxy.o: src/haproxy.c + src/dlmalloc.o: $(DLMALLOC_SRC) + $(CC) $(COPTS) -DDEFAULT_MMAP_THRESHOLD=$(DLMALLOC_THRES) -c -o $@ $< + +-install: all ++install-man: ++ install -d $(DESTDIR)/$(MANDIR)/man1 ++ install -m 644 doc/haproxy.1 $(DESTDIR)/$(MANDIR)/man1 ++ ++install: install-man all + install -d $(DESTDIR)/$(SBINDIR) + install haproxy $(DESTDIR)/$(SBINDIR) + +-- +1.5.4 + + +From c3bd6da8599d92a630d9fa210413132364a4b827 Mon Sep 17 00:00:00 2001 +From: Christian Wiese +Date: Wed, 12 Mar 2008 16:21:05 +0200 +Subject: [BUILD] Added 'install-bin' make target + + +diff --git a/Makefile b/Makefile +index 69f86a1..00ae883 100644 +--- a/Makefile ++++ b/Makefile +@@ -458,10 +458,12 @@ install-man: + install -d $(DESTDIR)/$(MANDIR)/man1 + install -m 644 doc/haproxy.1 $(DESTDIR)/$(MANDIR)/man1 + +-install: install-man all ++install-bin: all + install -d $(DESTDIR)/$(SBINDIR) + install haproxy $(DESTDIR)/$(SBINDIR) + ++install: install-man install-bin ++ + clean: + rm -f *.[oas] src/*.[oas] core haproxy test + for dir in . src include/* doc; do rm -f $$dir/*~ $$dir/*.rej;done +-- +1.5.4 + + +From 2d216c6d2e335f2fbd02e587e6a93f242beface3 Mon Sep 17 00:00:00 2001 +From: Christian Wiese +Date: Wed, 12 Mar 2008 17:24:49 +0200 +Subject: [BUILD] Added 'install-doc' make target + +This change is also introducing a new make variable called DOCDIR, +which is set to "$(PREFIX)/doc/haproxy" by default. + +diff --git a/Makefile b/Makefile +index 00ae883..4a976ac 100644 +--- a/Makefile ++++ b/Makefile +@@ -46,6 +46,8 @@ + # only. + # MANDIR is set to "$(PREFIX)/share/man" by default and is used for + # installation only. ++# DOCDIR is set to "$(PREFIX)/doc/haproxy" by default and is used for ++# installation only. + # + # Other variables : + # DLMALLOC_SRC : build with dlmalloc, indicate the location of dlmalloc.c. +@@ -61,6 +63,7 @@ DESTDIR = + PREFIX = /usr/local + SBINDIR = $(PREFIX)/sbin + MANDIR = $(PREFIX)/man ++DOCDIR = $(PREFIX)/doc/haproxy + + #### TARGET system + # Use TARGET= to optimize for a specifc target OS among the +@@ -458,11 +461,17 @@ install-man: + install -d $(DESTDIR)/$(MANDIR)/man1 + install -m 644 doc/haproxy.1 $(DESTDIR)/$(MANDIR)/man1 + ++install-doc: ++ install -d $(DESTDIR)/$(DOCDIR) ++ for x in configuration architecture haproxy-en haproxy-fr; do \ ++ install -m 644 doc/$$x.txt $(DESTDIR)/$(DOCDIR) ; \ ++ done ++ + install-bin: all + install -d $(DESTDIR)/$(SBINDIR) + install haproxy $(DESTDIR)/$(SBINDIR) + +-install: install-man install-bin ++install: install-doc install-man install-bin + + clean: + rm -f *.[oas] src/*.[oas] core haproxy test +-- +1.5.4 + + +From ec119a146f91e7c7e7fd660b69cce05d18b25f42 Mon Sep 17 00:00:00 2001 +From: Christian Wiese +Date: Wed, 12 Mar 2008 18:19:16 +0200 +Subject: [BUILD] Removed "/" after '$(DESTDIR)' in install targets + +SBINDIR, MANDIR and DOCDIR use an absolute path + +diff --git a/Makefile b/Makefile +index 4a976ac..a01dd13 100644 +--- a/Makefile ++++ b/Makefile +@@ -458,18 +458,18 @@ src/dlmalloc.o: $(DLMALLOC_SRC) + $(CC) $(COPTS) -DDEFAULT_MMAP_THRESHOLD=$(DLMALLOC_THRES) -c -o $@ $< + + install-man: +- install -d $(DESTDIR)/$(MANDIR)/man1 +- install -m 644 doc/haproxy.1 $(DESTDIR)/$(MANDIR)/man1 ++ install -d $(DESTDIR)$(MANDIR)/man1 ++ install -m 644 doc/haproxy.1 $(DESTDIR)$(MANDIR)/man1 + + install-doc: +- install -d $(DESTDIR)/$(DOCDIR) ++ install -d $(DESTDIR)$(DOCDIR) + for x in configuration architecture haproxy-en haproxy-fr; do \ +- install -m 644 doc/$$x.txt $(DESTDIR)/$(DOCDIR) ; \ ++ install -m 644 doc/$$x.txt $(DESTDIR)$(DOCDIR) ; \ + done + + install-bin: all +- install -d $(DESTDIR)/$(SBINDIR) +- install haproxy $(DESTDIR)/$(SBINDIR) ++ install -d $(DESTDIR)$(SBINDIR) ++ install haproxy $(DESTDIR)$(SBINDIR) + + install: install-doc install-man install-bin + +-- +1.5.4 + + +From c316fc1740408eec37174fc11399a92a70069286 Mon Sep 17 00:00:00 2001 +From: Christian Wiese +Date: Wed, 12 Mar 2008 18:28:13 +0200 +Subject: [BUILD] Changed 'install' target to install the binaries first + + +diff --git a/Makefile b/Makefile +index a01dd13..1676f72 100644 +--- a/Makefile ++++ b/Makefile +@@ -471,7 +471,7 @@ install-bin: all + install -d $(DESTDIR)$(SBINDIR) + install haproxy $(DESTDIR)$(SBINDIR) + +-install: install-doc install-man install-bin ++install: install-bin install-man install-doc + + clean: + rm -f *.[oas] src/*.[oas] core haproxy test +-- +1.5.4 +