1
0

patch-Makefile 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. --- keyutils-1.5.9.orig/Makefile 2014-02-21 16:18:24.000000000 +0100
  2. +++ keyutils-1.5.9/Makefile 2014-05-06 13:48:58.025306027 +0200
  3. @@ -1,5 +1,5 @@
  4. -CPPFLAGS := -I.
  5. -CFLAGS := -g -Wall -Werror
  6. +CPPFLAGS ?= -I.
  7. +CFLAGS ?= -g -Wall -Werror
  8. INSTALL := install
  9. DESTDIR :=
  10. SPECFILE := keyutils.spec
  11. @@ -54,29 +54,8 @@ LIBNAME := libkeyutils.so.$(APIVERSION)
  12. # Guess at the appropriate lib directory and word size
  13. #
  14. ###############################################################################
  15. -ifeq ($(origin LIBDIR),undefined)
  16. -LIBDIR := $(shell ldd /usr/bin/make | grep '\(/libc\)' | sed -e 's!.*\(/.*\)/libc[.].*!\1!')
  17. -endif
  18. -ifeq ($(origin USRLIBDIR),undefined)
  19. -USRLIBDIR := $(patsubst /lib/%,/usr/lib/%,$(LIBDIR))
  20. -endif
  21. -BUILDFOR := $(shell file /usr/bin/make | sed -e 's!.*ELF \(32\|64\)-bit.*!\1!')-bit
  22. -
  23. -LNS := ln -sf
  24. -
  25. -ifeq ($(origin CFLAGS),undefined)
  26. -ifeq ($(BUILDFOR),32-bit)
  27. -CFLAGS += -m32
  28. -LIBDIR := /lib
  29. USRLIBDIR := /usr/lib
  30. -else
  31. -ifeq ($(BUILDFOR),64-bit)
  32. -CFLAGS += -m64
  33. -LIBDIR := /lib64
  34. -USRLIBDIR := /usr/lib64
  35. -endif
  36. -endif
  37. -endif
  38. +LNS := ln -sf
  39. ###############################################################################
  40. #
  41. @@ -95,7 +74,7 @@ endif
  42. # Normal build rule
  43. #
  44. ###############################################################################
  45. -all: $(DEVELLIB) keyctl request-key key.dns_resolver
  46. +all: $(DEVELLIB)
  47. ###############################################################################
  48. #
  49. @@ -156,38 +135,15 @@ key.dns_resolver: key.dns_resolver.o $(D
  50. ###############################################################################
  51. install: all
  52. ifeq ($(NO_ARLIB),0)
  53. - $(INSTALL) -D -m 0644 $(ARLIB) $(DESTDIR)$(USRLIBDIR)/$(ARLIB)
  54. + $(INSTALL) -d $(DESTDIR)$(USRLIBDIR)
  55. + $(INSTALL) -m 0644 $(ARLIB) $(DESTDIR)$(USRLIBDIR)/$(ARLIB)
  56. endif
  57. - $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
  58. - $(LNS) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
  59. - mkdir -p $(DESTDIR)$(USRLIBDIR)
  60. - $(LNS) $(LIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB)
  61. - $(INSTALL) -D keyctl $(DESTDIR)$(BINDIR)/keyctl
  62. - $(INSTALL) -D request-key $(DESTDIR)$(SBINDIR)/request-key
  63. - $(INSTALL) -D request-key-debug.sh $(DESTDIR)$(SHAREDIR)/request-key-debug.sh
  64. - $(INSTALL) -D key.dns_resolver $(DESTDIR)$(SBINDIR)/key.dns_resolver
  65. - $(INSTALL) -D -m 0644 request-key.conf $(DESTDIR)$(ETCDIR)/request-key.conf
  66. - mkdir -p $(DESTDIR)$(ETCDIR)/request-key.d
  67. - mkdir -p $(DESTDIR)$(MAN1)
  68. - $(INSTALL) -m 0644 $(wildcard man/*.1) $(DESTDIR)$(MAN1)
  69. - mkdir -p $(DESTDIR)$(MAN3)
  70. - $(INSTALL) -m 0644 $(wildcard man/*.3) $(DESTDIR)$(MAN3)
  71. - mkdir -p $(DESTDIR)$(MAN5)
  72. - $(INSTALL) -m 0644 $(wildcard man/*.5) $(DESTDIR)$(MAN5)
  73. - mkdir -p $(DESTDIR)$(MAN7)
  74. - $(INSTALL) -m 0644 $(wildcard man/*.7) $(DESTDIR)$(MAN7)
  75. - mkdir -p $(DESTDIR)$(MAN8)
  76. - $(INSTALL) -m 0644 $(wildcard man/*.8) $(DESTDIR)$(MAN8)
  77. - $(LNS) keyctl_describe.3 $(DESTDIR)$(MAN3)/keyctl_describe_alloc.3
  78. - $(LNS) keyctl_get_security.3 $(DESTDIR)$(MAN3)/keyctl_get_security_alloc.3
  79. - $(LNS) keyctl_instantiate.3 $(DESTDIR)$(MAN3)/keyctl_instantiate_iov.3
  80. - $(LNS) keyctl_instantiate.3 $(DESTDIR)$(MAN3)/keyctl_reject.3
  81. - $(LNS) keyctl_instantiate.3 $(DESTDIR)$(MAN3)/keyctl_negate.3
  82. - $(LNS) keyctl_instantiate.3 $(DESTDIR)$(MAN3)/keyctl_assume_authority.3
  83. - $(LNS) keyctl_link.3 $(DESTDIR)$(MAN3)/keyctl_unlink.3
  84. - $(LNS) keyctl_read.3 $(DESTDIR)$(MAN3)/keyctl_read_alloc.3
  85. - $(LNS) recursive_key_scan.3 $(DESTDIR)$(MAN3)/recursive_session_key_scan.3
  86. - $(INSTALL) -D -m 0644 keyutils.h $(DESTDIR)$(INCLUDEDIR)/keyutils.h
  87. + $(INSTALL) -d $(DESTDIR)$(USRLIBDIR)
  88. + $(INSTALL) $(LIBNAME) $(DESTDIR)$(USRLIBDIR)/$(LIBNAME)
  89. + $(LNS) $(LIBNAME) $(DESTDIR)$(USRLIBDIR)/$(SONAME)
  90. + $(LNS) $(USRLIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB)
  91. + $(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
  92. + $(INSTALL) -m 0644 keyutils.h $(DESTDIR)$(INCLUDEDIR)/keyutils.h
  93. ###############################################################################
  94. #
  95. @@ -231,7 +187,7 @@ tarball: $(ZTARBALL)
  96. SRCBALL := rpmbuild/SOURCES/$(TARBALL)
  97. BUILDID := .local
  98. -dist := $(word 2,$(shell grep "%dist" /etc/rpm/macros.dist))
  99. +dist := OpenADK
  100. release := $(word 2,$(shell grep ^Release: $(SPECFILE)))
  101. release := $(subst %{?dist},$(dist),$(release))
  102. release := $(subst %{?buildid},$(BUILDID),$(release))