void-packages/srcpkgs/usb-modeswitch-data/patches/0001-fix-destdir.patch

52 lines
1.9 KiB
Diff

--- Makefile.orig 2016-08-03 19:08:23.000000000 +0200
+++ Makefile 2016-08-04 23:44:35.642686213 +0200
@@ -1,9 +1,9 @@
PROG = usb-modeswitch-data
VERS = 20160803
RM = /bin/rm -f
-PREFIX = $(DESTDIR)/usr
-ETCDIR = $(DESTDIR)/etc
-RULESDIR = $(DESTDIR)/lib/udev/rules.d
+PREFIX = /usr
+ETCDIR = /etc
+RULESDIR = /lib/udev/rules.d
.PHONY: clean
@@ -18,28 +18,28 @@ install: all files-install db-install
install-packed: files-install db-install-packed
files-install:
- install -d $(PREFIX)/share/usb_modeswitch
- install -d $(ETCDIR)/usb_modeswitch.d
- install -D --mode=644 40-usb_modeswitch.rules $(RULESDIR)/40-usb_modeswitch.rules
+ install -d $(DESTDIR)/$(PREFIX)/share/usb_modeswitch
+ install -d $(DESTDIR)/$(ETCDIR)/usb_modeswitch.d
+ install -D --mode=644 40-usb_modeswitch.rules $(DESTDIR)/$(RULESDIR)/40-usb_modeswitch.rules
40-usb_modeswitch.rules:
./gen-rules.tcl
db-install: files-install
- install --mode=644 -t $(PREFIX)/share/usb_modeswitch ./usb_modeswitch.d/*
+ install --mode=644 -t $(DESTDIR)/$(PREFIX)/share/usb_modeswitch ./usb_modeswitch.d/*
db-install-packed:
@# Create a compressed tar without gzip timestamp, so tar.gz
@# differs only if content is different
cd ./usb_modeswitch.d; find * -print0 | LC_ALL=C sort -z | tar --no-recursion --null --files-from=- --mode=go=rX,u+rw,a-s -cf ../configPack.tar
gzip -f9n ./configPack.tar
- install --mode=644 -t $(PREFIX)/share/usb_modeswitch ./configPack.tar.gz
+ install --mode=644 -t $(DESTDIR)/$(PREFIX)/share/usb_modeswitch ./configPack.tar.gz
rm -f ./configPack.tar.gz
uninstall: files-uninstall
files-uninstall:
- $(RM) $(RULESDIR)/40-usb_modeswitch.rules
- $(RM) -R $(PREFIX)/share/usb_modeswitch
+ $(RM) $(DESTDIR)/$(RULESDIR)/40-usb_modeswitch.rules
+ $(RM) -R $(DESTDIR)/$(PREFIX)/share/usb_modeswitch
.PHONY: clean install uninstall