--- Makefile.orig	2008-09-15 12:49:36.000000000 +0200
+++ Makefile	2008-09-15 12:51:32.000000000 +0200
@@ -125,7 +125,7 @@
 
 install-firmware:
 ifeq ($(HOTPLUG_FIRMWARE),yes)
-	$(MAKE) -C drivers/dahdi/firmware hotplug-install DESTDIR=$(DESTDIR) HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
+	$(MAKE) -C drivers/dahdi/firmware hotplug-install DESTDIR=$(DESTDIR) LIBDIR=$(LIBDIR) HOTPLUG_FIRMWARE=$(HOTPLUG_FIRMWARE)
 endif
 
 uninstall-firmware:
--- drivers/dahdi/firmware/Makefile.orig	2008-09-15 12:48:38.000000000 +0200
+++ drivers/dahdi/firmware/Makefile	2008-09-15 12:48:57.000000000 +0200
@@ -63,7 +63,7 @@
 
 # Download and extract firmware tarballs
 dahdi-fw-%.tar.gz:
-	@if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/usr/lib/hotplug/firmware ] && ! [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.$(subst .tar.gz,,$*) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.$(subst .tar.gz,,$*) ] ); then \
+	@if ( [ "$(HOTPLUG_FIRMWARE)" = "no" ] ) || ( [ -d $(DESTDIR)/$(LIBDIR)/hotplug/firmware ] && ! [ -f $(DESTDIR)/$(LIBDIR)/hotplug/firmware/.$(subst .tar.gz,,$*) ] ) || ( [ -d $(DESTDIR)/lib/firmware ] && ! [ -f $(DESTDIR)/lib/firmware/.$(subst .tar.gz,,$*) ] ); then \
 		echo "Attempting to download $@"; \
 		if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi; \
 		if test ! -f $@; then exit 1; fi; \
@@ -73,49 +73,49 @@
 # Create object files suitable for linking against
 object-build: $(FIRMWARE) $(OBJECT_FILES)
 
-$(DESTDIR)/usr/lib/hotplug/firmware $(DESTDIR)/lib/firmware:
+$(DESTDIR)/$(LIBDIR)/hotplug/firmware $(DESTDIR)/lib/firmware:
 	mkdir -p $@
 
 # Install all downloaded firmware images for hotplug usage
-hotplug-install: $(DESTDIR)/usr/lib/hotplug/firmware $(DESTDIR)/lib/firmware $(FIRMWARE)
-ifeq ($(shell if ( [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION) ] ) && ( [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION) ] ); then echo "no"; else echo "yes"; fi),yes)
+hotplug-install: $(DESTDIR)/$(LIBDIR)/hotplug/firmware $(DESTDIR)/lib/firmware $(FIRMWARE)
+ifeq ($(shell if ( [ -f $(DESTDIR)/$(LIBDIR)/hotplug/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION) ] ) && ( [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION) ] ); then echo "no"; else echo "yes"; fi),yes)
 	@echo "Installing dahdi-fw-oct6114-064.bin to hotplug firmware directories"
-	@install -m 644 dahdi-fw-oct6114-064.bin $(DESTDIR)/usr/lib/hotplug/firmware
-	@rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-064-*
-	@touch $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION)
+	@install -m 644 dahdi-fw-oct6114-064.bin $(DESTDIR)/$(LIBDIR)/hotplug/firmware
+	@rm -rf $(DESTDIR)/$(LIBDIR)/hotplug/firmware/.dahdi-fw-oct6114-064-*
+	@touch $(DESTDIR)/$(LIBDIR)/hotplug/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION)
 	@install -m 644 dahdi-fw-oct6114-064.bin $(DESTDIR)/lib/firmware
 	@rm -rf $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-064-*
 	@touch $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-064-$(OCT6114_064_VERSION)
 else
 	@echo "Firmware dahdi-fw-oct6114-064.bin is already installed with required version $(OCT6114_064_VERSION)"
 endif
-ifeq ($(shell if ( [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION) ] ) && ( [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION) ] ); then echo "no"; else echo "yes"; fi),yes)
+ifeq ($(shell if ( [ -f $(DESTDIR)/$(LIBDIR)/hotplug/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION) ] ) && ( [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION) ] ); then echo "no"; else echo "yes"; fi),yes)
 	@echo "Installing dahdi-fw-oct6114-128.bin to hotplug firmware directories"
-	@install -m 644 dahdi-fw-oct6114-128.bin $(DESTDIR)/usr/lib/hotplug/firmware
-	@rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-128-*
-	@touch $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION)
+	@install -m 644 dahdi-fw-oct6114-128.bin $(DESTDIR)/$(LIBDIR)/hotplug/firmware
+	@rm -rf $(DESTDIR)/$(LIBDIR)/hotplug/firmware/.dahdi-fw-oct6114-128-*
+	@touch $(DESTDIR)/$(LIBDIR)/hotplug/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION)
 	@install -m 644 dahdi-fw-oct6114-128.bin $(DESTDIR)/lib/firmware
 	@rm -rf $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-128-*
 	@touch $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-128-$(OCT6114_128_VERSION)
 else
 	@echo "Firmware dahdi-fw-oct6114-128.bin is already installed with required version $(OCT6114_128_VERSION)"
 endif
-ifeq ($(shell if ( [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION) ] ) && ( [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION) ] ); then echo "no"; else echo "yes"; fi),yes)
+ifeq ($(shell if ( [ -f $(DESTDIR)/$(LIBDIR)/hotplug/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION) ] ) && ( [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION) ] ); then echo "no"; else echo "yes"; fi),yes)
 	@echo "Installing dahdi-fw-tc400m.bin to hotplug firmware directories"
-	@install -m 644 dahdi-fw-tc400m.bin $(DESTDIR)/usr/lib/hotplug/firmware
-	@rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-tc400m-*
-	@touch $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION)
+	@install -m 644 dahdi-fw-tc400m.bin $(DESTDIR)/$(LIBDIR)/hotplug/firmware
+	@rm -rf $(DESTDIR)/$(LIBDIR)/hotplug/firmware/.dahdi-fw-tc400m-*
+	@touch $(DESTDIR)/$(LIBDIR)/hotplug/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION)
 	@install -m 644 dahdi-fw-tc400m.bin $(DESTDIR)/lib/firmware
 	@rm -rf $(DESTDIR)/lib/firmware/.dahdi-fw-tc400m-*
 	@touch $(DESTDIR)/lib/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION)
 else
 	@echo "Firmware dahdi-fw-tc400m.bin is already installed with required version $(TC400M_VERSION)"
 endif
-ifeq ($(shell if ( [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION) ] ) && ( [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION) ] ); then echo "no"; else echo "yes"; fi),yes)
+ifeq ($(shell if ( [ -f $(DESTDIR)/$(LIBDIR)/hotplug/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION) ] ) && ( [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION) ] ); then echo "no"; else echo "yes"; fi),yes)
 	@echo "Installing dahdi-fw-vpmadt032.bin to hotplug firmware directories"
-	@install -m 644 dahdi-fw-vpmadt032.bin $(DESTDIR)/usr/lib/hotplug/firmware
-	@rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-vpmadt032-*
-	@touch $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION)
+	@install -m 644 dahdi-fw-vpmadt032.bin $(DESTDIR)/$(LIBDIR)/hotplug/firmware
+	@rm -rf $(DESTDIR)/$(LIBDIR)/hotplug/firmware/.dahdi-fw-vpmadt032-*
+	@touch $(DESTDIR)/$(LIBDIR)/hotplug/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION)
 	@install -m 644 dahdi-fw-vpmadt032.bin $(DESTDIR)/lib/firmware
 	@rm -rf $(DESTDIR)/lib/firmware/.dahdi-fw-vpmadt032-*
 	@touch $(DESTDIR)/lib/firmware/.dahdi-fw-vpmadt032-$(VPMADT032_VERSION)
@@ -125,9 +125,9 @@
 
 # Uninstall any installed dahdi firmware images from hotplug firmware directories
 hotplug-uninstall:
-	if [ -d $(DESTDIR)/usr/lib/hotplug/firmware ]; then \
-		rm -f $(DESTDIR)/usr/lib/hotplug/firmware/dahdi-fw-*.bin; \
-		rm -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw*; \
+	if [ -d $(DESTDIR)/$(LIBDIR)/hotplug/firmware ]; then \
+		rm -f $(DESTDIR)/$(LIBDIR)/hotplug/firmware/dahdi-fw-*.bin; \
+		rm -f $(DESTDIR)/$(LIBDIR)/hotplug/firmware/.dahdi-fw*; \
 	fi
 	if [ -d $(DESTDIR)/lib/firmware ]; then \
 		rm -f $(DESTDIR)/lib/firmware/dahdi-fw-*.bin; \
