patch-Make_Rules 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. --- libcap-2.22.orig/Make.Rules 2011-07-25 04:18:23.000000000 +0200
  2. +++ libcap-2.22/Make.Rules 2013-11-08 16:22:41.000000000 +0100
  3. @@ -12,10 +12,6 @@ FAKEROOT=$(DESTDIR)
  4. # These choices are motivated by the fact that getcap and setcap are
  5. # administrative operations that could be needed to recover a system.
  6. -ifndef lib
  7. -lib=$(shell ldd /usr/bin/ld|fgrep ld-linux|cut -d/ -f2)
  8. -endif
  9. -
  10. ifdef prefix
  11. exec_prefix=$(prefix)
  12. lib_prefix=$(exec_prefix)
  13. @@ -23,7 +19,7 @@ inc_prefix=$(lib_prefix)
  14. man_prefix=$(prefix)/share
  15. else
  16. prefix=/usr
  17. -exec_prefix=
  18. +exec_prefix=/usr
  19. lib_prefix=$(exec_prefix)
  20. inc_prefix=$(prefix)
  21. man_prefix=$(prefix)/share
  22. @@ -34,7 +30,7 @@ endif
  23. MANDIR=$(FAKEROOT)$(man_prefix)/man
  24. SBINDIR=$(FAKEROOT)$(exec_prefix)/sbin
  25. INCDIR=$(FAKEROOT)$(inc_prefix)/include
  26. -LIBDIR=$(FAKEROOT)$(lib_prefix)/$(lib)
  27. +LIBDIR=$(FAKEROOT)$(lib_prefix)/lib
  28. # common defines for libcap
  29. LIBTITLE=libcap
  30. @@ -47,12 +43,13 @@ MINOR=22
  31. KERNEL_HEADERS := $(topdir)/libcap/include
  32. IPATH += -fPIC -I$(topdir)/libcap/include -I$(KERNEL_HEADERS)
  33. -CC := gcc
  34. -CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
  35. +CC ?= gcc
  36. +CFLAGS ?= -O2
  37. +CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
  38. BUILD_CC := $(CC)
  39. BUILD_CFLAGS := $(CFLAGS) $(IPATH)
  40. -AR := ar
  41. -RANLIB := ranlib
  42. +AR ?= ar
  43. +RANLIB ?= ranlib
  44. DEBUG = -g #-DDEBUG
  45. WARNINGS=-Wall -Wwrite-strings \
  46. -Wpointer-arith -Wcast-qual -Wcast-align \
  47. @@ -64,11 +61,11 @@ LDFLAGS := #-g
  48. SYSTEM_HEADERS = /usr/include
  49. INCS=$(topdir)/libcap/include/sys/capability.h
  50. LDFLAGS += -L$(topdir)/libcap
  51. -CFLAGS += -Dlinux $(WARNINGS) $(DEBUG)
  52. +CFLAGS += -Dlinux $(WARNINGS)
  53. PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi)
  54. INDENT := $(shell if [ -n "$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi)
  55. DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi)
  56. -LIBATTR := yes
  57. +LIBATTR := no
  58. # When installing setcap, set its inheritable bit to be able to place
  59. # capabilities on files. It can be used in conjunction with pam_cap