OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
2.1 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../haproxy/make-install.patch
  5. # Copyright (C) 2008 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. diff --git a/Makefile b/Makefile
  17. index 5e9b11d..1175877 100644
  18. --- a/Makefile
  19. +++ b/Makefile
  20. @@ -38,6 +38,12 @@
  21. # by "haproxy -vv" in CFLAGS.
  22. # SILENT_DEFINE may be used to specify other defines which will not be
  23. # reported by "haproxy -vv".
  24. +# DESTDIR is not set by default and is used for installation only.
  25. +# It might be useful to set DESTDIR if you want to install haproxy
  26. +# in a sandbox.
  27. +# PREFIX is set to "/usr/local" by default and is used for installation only.
  28. +# SBINDIR is set to "$(PREFIX)/sbin" by default and is used for installation
  29. +# only.
  30. #
  31. # Other variables :
  32. # DLMALLOC_SRC : build with dlmalloc, indicate the location of dlmalloc.c.
  33. @@ -48,6 +54,10 @@
  34. # SUBVERS : add a sub-version (eg: platform, model, ...).
  35. # VERDATE : force haproxy's release date.
  36. +#### Installation options.
  37. +DESTDIR =
  38. +PREFIX = /usr/local
  39. +SBINDIR = $(PREFIX)/sbin
  40. #### TARGET system
  41. # Use TARGET=<target_name> to optimize for a specifc target OS among the
  42. @@ -441,6 +451,10 @@ src/haproxy.o: src/haproxy.c
  43. src/dlmalloc.o: $(DLMALLOC_SRC)
  44. $(CC) $(COPTS) -DDEFAULT_MMAP_THRESHOLD=$(DLMALLOC_THRES) -c -o $@ $<
  45. +install: all
  46. + install -d $(DESTDIR)/$(SBINDIR)
  47. + install haproxy $(DESTDIR)/$(SBINDIR)
  48. +
  49. clean:
  50. rm -f *.[oas] src/*.[oas] core haproxy test
  51. for dir in . src include/* doc; do rm -f $$dir/*~ $$dir/*.rej;done