Christian Wiese
17 years ago
committed by
Alejandro Mery
3 changed files with 137 additions and 2 deletions
@ -0,0 +1,135 @@
|
||||
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||||
#
|
||||
# Filename: package/.../drbd/drbd-8.0.11-destdir.patch
|
||||
# Copyright (C) 2008 The OpenSDE Project
|
||||
#
|
||||
# More information can be found in the files COPYING and README.
|
||||
#
|
||||
# This patch file is dual-licensed. It is available under the license the
|
||||
# patched project is licensed under, as long as it is an OpenSource license
|
||||
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||||
# of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
# --- SDE-COPYRIGHT-NOTE-END ---
|
||||
|
||||
Author: Christian Wiese <morfoh@opensde.org>
|
||||
Origin: OpenSDE (http://opensde.org)
|
||||
Description: Adds DESTDIR support which is helpful while to use while
|
||||
installing in a sandbox.
|
||||
Note: Only the 'install-tools' make target is supported!
|
||||
|
||||
diff -ruN drbd-8.0.11.orig/Makefile drbd-8.0.11/Makefile
|
||||
--- drbd-8.0.11.orig/Makefile 2008-02-04 12:57:07.000000000 +0200
|
||||
+++ drbd-8.0.11/Makefile 2008-03-14 04:24:32.000000000 +0200
|
||||
@@ -28,6 +28,7 @@
|
||||
# and not in e.g. dash. I'm too lazy to fix it to be compatible.
|
||||
SHELL=/bin/bash
|
||||
|
||||
+DESTDIR =
|
||||
#PREFIX = /usr/local
|
||||
|
||||
SUBDIRS = user scripts documentation drbd #testing #benchmark
|
||||
diff -ruN drbd-8.0.11.orig/documentation/Makefile drbd-8.0.11/documentation/Makefile
|
||||
--- drbd-8.0.11.orig/documentation/Makefile 2008-02-06 11:47:09.000000000 +0200
|
||||
+++ drbd-8.0.11/documentation/Makefile 2008-03-14 04:35:06.000000000 +0200
|
||||
@@ -136,14 +136,14 @@
|
||||
done ; $$ok
|
||||
set -e; for f in $(MANPAGES) ; do \
|
||||
s=$${f##*.}; \
|
||||
- install -v -D -m 644 $$f $(PREFIX)/usr/share/man/man$$s/$$f ; \
|
||||
+ install -v -D -m 644 $$f $(DESTDIR)$(PREFIX)/usr/share/man/man$$s/$$f ; \
|
||||
done
|
||||
@ set -e; for i in $(LANGS); do $(MAKE) -C $$i install; done
|
||||
|
||||
uninstall:
|
||||
@ set -e; for f in $(MANPAGES) ; do \
|
||||
s=$${f##*.}; \
|
||||
- rm -v $(PREFIX)/usr/share/man/man$$s/$$f ; \
|
||||
+ rm -v $(DESTDIR)$(PREFIX)/usr/share/man/man$$s/$$f ; \
|
||||
done
|
||||
@ set -e; for i in $(LANGS); do $(MAKE) -C $$i uninstall; done
|
||||
|
||||
diff -ruN drbd-8.0.11.orig/scripts/Makefile drbd-8.0.11/scripts/Makefile
|
||||
--- drbd-8.0.11.orig/scripts/Makefile 2008-01-08 11:45:38.000000000 +0200
|
||||
+++ drbd-8.0.11/scripts/Makefile 2008-03-14 04:32:28.000000000 +0200
|
||||
@@ -52,20 +52,20 @@
|
||||
all:
|
||||
|
||||
install:
|
||||
- mkdir -p $(PREFIX)/etc/ha.d/resource.d
|
||||
- install -d $(INITD)
|
||||
- install -m 755 $(SCRIPT) $(INITD)drbd
|
||||
- @ if [ ! -e $(PREFIX)/etc/drbd.conf ]; then \
|
||||
- install -d $(PREFIX)/etc/; \
|
||||
- install -m 644 drbd.conf $(PREFIX)/etc/; \
|
||||
+ mkdir -p $(DESTDIR)$(PREFIX)/etc/ha.d/resource.d
|
||||
+ install -d $(DESTDIR)$(INITD)
|
||||
+ install -m 755 $(SCRIPT) $(DESTDIR)$(INITD)drbd
|
||||
+ @ if [ ! -e $(DESTDIR)$(PREFIX)/etc/drbd.conf ]; then \
|
||||
+ install -d $(DESTDIR)$(PREFIX)/etc/; \
|
||||
+ install -m 644 drbd.conf $(DESTDIR)$(PREFIX)/etc/; \
|
||||
fi
|
||||
- install -m 755 drbddisk $(PREFIX)/etc/ha.d/resource.d
|
||||
- install -d $(PREFIX)/usr/lib/drbd
|
||||
- install -m 755 outdate-peer.sh $(PREFIX)/usr/lib/drbd
|
||||
- mkdir -p $(PREFIX)/etc/xen/scripts
|
||||
- install -m 755 block-drbd $(PREFIX)/etc/xen/scripts
|
||||
+ install -m 755 drbddisk $(DESTDIR)$(PREFIX)/etc/ha.d/resource.d
|
||||
+ install -d $(DESTDIR)$(PREFIX)/usr/lib/drbd
|
||||
+ install -m 755 outdate-peer.sh $(DESTDIR)$(PREFIX)/usr/lib/drbd
|
||||
+ mkdir -p $(DESTDIR)$(PREFIX)/etc/xen/scripts
|
||||
+ install -m 755 block-drbd $(DESTDIR)$(PREFIX)/etc/xen/scripts
|
||||
ifeq ($(DIST),suselike)
|
||||
- ln -sf ../etc/init.d/drbd $(PREFIX)/sbin/rcdrbd
|
||||
+ ln -sf ../etc/init.d/drbd $(DESTDIR)$(PREFIX)/sbin/rcdrbd
|
||||
endif
|
||||
@ echo
|
||||
@ echo "Don't forget to run update-rc.d or chkconfig"
|
||||
@@ -77,7 +77,7 @@
|
||||
distclean: clean
|
||||
|
||||
uninstall:
|
||||
- rm $(INITD)drbd
|
||||
- rm $(PREFIX)/etc/ha.d/resource.d/drbddisk
|
||||
- rm $(PREFIX)/etc/xen/scripts/block-drbd
|
||||
- ! test -L $(PREFIX)/sbin/rcdrbd || rm $(PREFIX)/sbin/rcdrbd
|
||||
+ rm $(DESTDIR)$(INITD)drbd
|
||||
+ rm $(DESTDIR)$(PREFIX)/etc/ha.d/resource.d/drbddisk
|
||||
+ rm $(DESTDIR)$(PREFIX)/etc/xen/scripts/block-drbd
|
||||
+ ! test -L $(DESTDIR)$(PREFIX)/sbin/rcdrbd || rm $(DESTDIR)$(PREFIX)/sbin/rcdrbd
|
||||
diff -ruN drbd-8.0.11.orig/user/Makefile drbd-8.0.11/user/Makefile
|
||||
--- drbd-8.0.11.orig/user/Makefile 2007-11-01 19:36:38.000000000 +0200
|
||||
+++ drbd-8.0.11/user/Makefile 2008-03-14 04:21:20.000000000 +0200
|
||||
@@ -73,20 +73,20 @@
|
||||
distclean: clean
|
||||
|
||||
install:
|
||||
- install -d $(PREFIX)/sbin/
|
||||
+ install -d $(DESTDIR)$(PREFIX)/sbin/
|
||||
if getent group haclient > /dev/null 2> /dev/null ; then \
|
||||
- install -g haclient -m 4750 drbdsetup $(PREFIX)/sbin/ ; \
|
||||
- install -g haclient -m 4750 drbdmeta $(PREFIX)/sbin/ ; \
|
||||
- install -m 755 drbdadm $(PREFIX)/sbin/ ; \
|
||||
- else \
|
||||
- install -m 755 drbdsetup $(PREFIX)/sbin/ ; \
|
||||
- install -m 755 drbdmeta $(PREFIX)/sbin/ ; \
|
||||
- install -m 755 drbdadm $(PREFIX)/sbin/ ; \
|
||||
+ install -g haclient -m 4750 drbdsetup $(DESTDIR)$(PREFIX)/sbin/ ; \
|
||||
+ install -g haclient -m 4750 drbdmeta $(DESTDIR)$(PREFIX)/sbin/ ; \
|
||||
+ install -m 755 drbdadm $(DESTDIR)$(PREFIX)/sbin/ ; \
|
||||
+ else \
|
||||
+ install -m 755 drbdsetup $(DESTDIR)$(PREFIX)/sbin/ ; \
|
||||
+ install -m 755 drbdmeta $(DESTDIR)$(PREFIX)/sbin/ ; \
|
||||
+ install -m 755 drbdadm $(DESTDIR)$(PREFIX)/sbin/ ; \
|
||||
fi
|
||||
|
||||
uninstall:
|
||||
- rm -f $(PREFIX)/sbin/drbdsetup
|
||||
- rm -f $(PREFIX)/sbin/drbdadm
|
||||
+ rm -f $(DESTDIR)$(PREFIX)/sbin/drbdsetup
|
||||
+ rm -f $(DESTDIR)$(PREFIX)/sbin/drbdadm
|
||||
|
||||
###dependencies
|
||||
drbdsetup.o: drbdtool_common.h ../drbd/linux/drbd_limits.h
|
Loading…
Reference in new issue