summaryrefslogtreecommitdiff
path: root/package/dmraid
diff options
context:
space:
mode:
Diffstat (limited to 'package/dmraid')
-rw-r--r--package/dmraid/dmraid-fix-make-remove.patch22
-rw-r--r--package/dmraid/dmraid.init6
-rw-r--r--package/dmraid/dmraid.mk33
3 files changed, 39 insertions, 22 deletions
diff --git a/package/dmraid/dmraid-fix-make-remove.patch b/package/dmraid/dmraid-fix-make-remove.patch
new file mode 100644
index 000000000..0d6ae7571
--- /dev/null
+++ b/package/dmraid/dmraid-fix-make-remove.patch
@@ -0,0 +1,22 @@
+[PATCH]: dmraid: fix make remove for header files
+
+prefix/include/dmraid is not empty, so we need rm -rf
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ 1.0.0.rc15/include/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: dmraid/1.0.0.rc15/include/Makefile.in
+===================================================================
+--- dmraid.orig/1.0.0.rc15/include/Makefile.in
++++ dmraid/1.0.0.rc15/include/Makefile.in
+@@ -24,7 +24,7 @@ install: install_dmraid_headers
+
+ remove_dmraid_headers:
+ @echo "Removing $(HEADERS) from $(includedir)/dmraid"
+- rm -f $(includedir)/dmraid
++ rm -rf $(includedir)/dmraid
+
+ remove: remove_dmraid_headers
+
diff --git a/package/dmraid/dmraid.init b/package/dmraid/dmraid.init
index 970d47d8e..fd2ad9e84 100644
--- a/package/dmraid/dmraid.init
+++ b/package/dmraid/dmraid.init
@@ -2,7 +2,7 @@
set -e
-[ -x /sbin/dmraid ] || exit 0
+[ -x /usr/sbin/dmraid ] || exit 0
# try to load module in case that hasn't been done yet
modprobe dm-mod >/dev/null 2>&1
@@ -10,12 +10,12 @@ modprobe dm-mod >/dev/null 2>&1
case "$1" in
start|"")
echo "Setting up DMRAID devices..."
- /sbin/dmraid --activate yes --ignorelocking --verbose
+ /usr/sbin/dmraid --activate yes --ignorelocking --verbose
;;
stop)
echo "Shutting down DMRAID devices... "
- /sbin/dmraid --activate no --ignorelocking --verbose
+ /usr/sbin/dmraid --activate no --ignorelocking --verbose
;;
restart|force-reload)
diff --git a/package/dmraid/dmraid.mk b/package/dmraid/dmraid.mk
index 93d6561f6..e98161c3d 100644
--- a/package/dmraid/dmraid.mk
+++ b/package/dmraid/dmraid.mk
@@ -9,26 +9,21 @@ DMRAID_SITE:=http://people.redhat.com/~heinzm/sw/dmraid/src
DMRAID_SUBDIR:=$(DMRAID_VERSION)
# lib and tools race with parallel make
DMRAID_MAKE = $(MAKE1)
-DMRAID_DEPENDENCIES:=lvm2
-DMRAID_INSTALL_STAGING:=yes
+DMRAID_INSTALL_STAGING = YES
+DMRAID_UNINSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) remove
+DMRAID_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
-$(eval $(call AUTOTARGETS,package,dmraid))
+DMRAID_DEPENDENCIES = lvm2
+
+define DMRAID_INSTALL_INITSCRIPT
+ $(INSTALL) -m 0755 package/dmraid/dmraid.init $(TARGET_DIR)/etc/init.d/S20dmraid
+endef
-$(DMRAID_TARGET_INSTALL_TARGET): $(DMRAID_TARGET_INSTALL_STAGING)
- $(call MESSAGE,"Installing to target")
- $(INSTALL) -m 0755 $(STAGING_DIR)/usr/sbin/dmraid $(TARGET_DIR)/usr/sbin
- $(INSTALL) -m 0755 package/dmraid/dmraid.init $(TARGET_DIR)/etc/init.d/dmraid
- touch $@
+DMRAID_POST_INSTALL_TARGET_HOOKS += DMRAID_INSTALL_INITSCRIPT
-ifeq ($(BR2_ENABLE_DEBUG),)
-$(DMRAID_HOOK_POST_INSTALL): $(DMRAID_TARGET_INSTALL_TARGET)
- $(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/usr/sbin/dmraid
- touch $@
-endif
+define DMRAID_UNINSTALL_TARGET_CMDS
+ $(MAKE) DESTDIR=$(TARGET_DIR) remove -C $(@D)/$(DMRAID_SUBDIR)
+ rm -f $(TARGET_DIR)/etc/init.d/S20dmraid
+endef
-$(DMRAID_TARGET_UNINSTALL):
- $(call MESSAGE,"Uninstalling")
-# makefile has no uninstall target..
-# $(MAKE) DESTDIR=$(STAGING_DIR) -C $(DMRAID_DIR) uninstall
- rm -f $(TARGET_DIR)/usr/sbin/dmraid $(TARGET_DIR)/etc/init.d/dmraid
- rm -f $(DMRAID_TARGET_INSTALL_TARGET) $(DMRAID_HOOK_POST_INSTALL)
+$(eval $(call AUTOTARGETS,package,dmraid))