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.

135 lines
5.3 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../drbd/drbd-8.0.11-destdir.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. Author: Christian Wiese <morfoh@opensde.org>
  17. Origin: OpenSDE (http://opensde.org)
  18. Description: Adds DESTDIR support which is helpful while to use while
  19. installing in a sandbox.
  20. Note: Only the 'install-tools' make target is supported!
  21. diff -ruN drbd-8.0.11.orig/Makefile drbd-8.0.11/Makefile
  22. --- drbd-8.0.11.orig/Makefile 2008-02-04 12:57:07.000000000 +0200
  23. +++ drbd-8.0.11/Makefile 2008-03-14 04:24:32.000000000 +0200
  24. @@ -28,6 +28,7 @@
  25. # and not in e.g. dash. I'm too lazy to fix it to be compatible.
  26. SHELL=/bin/bash
  27. +DESTDIR =
  28. #PREFIX = /usr/local
  29. SUBDIRS = user scripts documentation drbd #testing #benchmark
  30. diff -ruN drbd-8.0.11.orig/documentation/Makefile drbd-8.0.11/documentation/Makefile
  31. --- drbd-8.0.11.orig/documentation/Makefile 2008-02-06 11:47:09.000000000 +0200
  32. +++ drbd-8.0.11/documentation/Makefile 2008-03-14 04:35:06.000000000 +0200
  33. @@ -136,14 +136,14 @@
  34. done ; $$ok
  35. set -e; for f in $(MANPAGES) ; do \
  36. s=$${f##*.}; \
  37. - install -v -D -m 644 $$f $(PREFIX)/usr/share/man/man$$s/$$f ; \
  38. + install -v -D -m 644 $$f $(DESTDIR)$(PREFIX)/usr/share/man/man$$s/$$f ; \
  39. done
  40. @ set -e; for i in $(LANGS); do $(MAKE) -C $$i install; done
  41. uninstall:
  42. @ set -e; for f in $(MANPAGES) ; do \
  43. s=$${f##*.}; \
  44. - rm -v $(PREFIX)/usr/share/man/man$$s/$$f ; \
  45. + rm -v $(DESTDIR)$(PREFIX)/usr/share/man/man$$s/$$f ; \
  46. done
  47. @ set -e; for i in $(LANGS); do $(MAKE) -C $$i uninstall; done
  48. diff -ruN drbd-8.0.11.orig/scripts/Makefile drbd-8.0.11/scripts/Makefile
  49. --- drbd-8.0.11.orig/scripts/Makefile 2008-01-08 11:45:38.000000000 +0200
  50. +++ drbd-8.0.11/scripts/Makefile 2008-03-14 04:32:28.000000000 +0200
  51. @@ -52,20 +52,20 @@
  52. all:
  53. install:
  54. - mkdir -p $(PREFIX)/etc/ha.d/resource.d
  55. - install -d $(INITD)
  56. - install -m 755 $(SCRIPT) $(INITD)drbd
  57. - @ if [ ! -e $(PREFIX)/etc/drbd.conf ]; then \
  58. - install -d $(PREFIX)/etc/; \
  59. - install -m 644 drbd.conf $(PREFIX)/etc/; \
  60. + mkdir -p $(DESTDIR)$(PREFIX)/etc/ha.d/resource.d
  61. + install -d $(DESTDIR)$(INITD)
  62. + install -m 755 $(SCRIPT) $(DESTDIR)$(INITD)drbd
  63. + @ if [ ! -e $(DESTDIR)$(PREFIX)/etc/drbd.conf ]; then \
  64. + install -d $(DESTDIR)$(PREFIX)/etc/; \
  65. + install -m 644 drbd.conf $(DESTDIR)$(PREFIX)/etc/; \
  66. fi
  67. - install -m 755 drbddisk $(PREFIX)/etc/ha.d/resource.d
  68. - install -d $(PREFIX)/usr/lib/drbd
  69. - install -m 755 outdate-peer.sh $(PREFIX)/usr/lib/drbd
  70. - mkdir -p $(PREFIX)/etc/xen/scripts
  71. - install -m 755 block-drbd $(PREFIX)/etc/xen/scripts
  72. + install -m 755 drbddisk $(DESTDIR)$(PREFIX)/etc/ha.d/resource.d
  73. + install -d $(DESTDIR)$(PREFIX)/usr/lib/drbd
  74. + install -m 755 outdate-peer.sh $(DESTDIR)$(PREFIX)/usr/lib/drbd
  75. + mkdir -p $(DESTDIR)$(PREFIX)/etc/xen/scripts
  76. + install -m 755 block-drbd $(DESTDIR)$(PREFIX)/etc/xen/scripts
  77. ifeq ($(DIST),suselike)
  78. - ln -sf ../etc/init.d/drbd $(PREFIX)/sbin/rcdrbd
  79. + ln -sf ../etc/init.d/drbd $(DESTDIR)$(PREFIX)/sbin/rcdrbd
  80. endif
  81. @ echo
  82. @ echo "Don't forget to run update-rc.d or chkconfig"
  83. @@ -77,7 +77,7 @@
  84. distclean: clean
  85. uninstall:
  86. - rm $(INITD)drbd
  87. - rm $(PREFIX)/etc/ha.d/resource.d/drbddisk
  88. - rm $(PREFIX)/etc/xen/scripts/block-drbd
  89. - ! test -L $(PREFIX)/sbin/rcdrbd || rm $(PREFIX)/sbin/rcdrbd
  90. + rm $(DESTDIR)$(INITD)drbd
  91. + rm $(DESTDIR)$(PREFIX)/etc/ha.d/resource.d/drbddisk
  92. + rm $(DESTDIR)$(PREFIX)/etc/xen/scripts/block-drbd
  93. + ! test -L $(DESTDIR)$(PREFIX)/sbin/rcdrbd || rm $(DESTDIR)$(PREFIX)/sbin/rcdrbd
  94. diff -ruN drbd-8.0.11.orig/user/Makefile drbd-8.0.11/user/Makefile
  95. --- drbd-8.0.11.orig/user/Makefile 2007-11-01 19:36:38.000000000 +0200
  96. +++ drbd-8.0.11/user/Makefile 2008-03-14 04:21:20.000000000 +0200
  97. @@ -73,20 +73,20 @@
  98. distclean: clean
  99. install:
  100. - install -d $(PREFIX)/sbin/
  101. + install -d $(DESTDIR)$(PREFIX)/sbin/
  102. if getent group haclient > /dev/null 2> /dev/null ; then \
  103. - install -g haclient -m 4750 drbdsetup $(PREFIX)/sbin/ ; \
  104. - install -g haclient -m 4750 drbdmeta $(PREFIX)/sbin/ ; \
  105. - install -m 755 drbdadm $(PREFIX)/sbin/ ; \
  106. - else \
  107. - install -m 755 drbdsetup $(PREFIX)/sbin/ ; \
  108. - install -m 755 drbdmeta $(PREFIX)/sbin/ ; \
  109. - install -m 755 drbdadm $(PREFIX)/sbin/ ; \
  110. + install -g haclient -m 4750 drbdsetup $(DESTDIR)$(PREFIX)/sbin/ ; \
  111. + install -g haclient -m 4750 drbdmeta $(DESTDIR)$(PREFIX)/sbin/ ; \
  112. + install -m 755 drbdadm $(DESTDIR)$(PREFIX)/sbin/ ; \
  113. + else \
  114. + install -m 755 drbdsetup $(DESTDIR)$(PREFIX)/sbin/ ; \
  115. + install -m 755 drbdmeta $(DESTDIR)$(PREFIX)/sbin/ ; \
  116. + install -m 755 drbdadm $(DESTDIR)$(PREFIX)/sbin/ ; \
  117. fi
  118. uninstall:
  119. - rm -f $(PREFIX)/sbin/drbdsetup
  120. - rm -f $(PREFIX)/sbin/drbdadm
  121. + rm -f $(DESTDIR)$(PREFIX)/sbin/drbdsetup
  122. + rm -f $(DESTDIR)$(PREFIX)/sbin/drbdadm
  123. ###dependencies
  124. drbdsetup.o: drbdtool_common.h ../drbd/linux/drbd_limits.h