5769f150de
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
51 lines
1.9 KiB
Diff
51 lines
1.9 KiB
Diff
--- a/Makefile 2016-08-03 19:08:23.000000000 +0200
|
|
+++ b/Makefile 2016-08-04 23:44:35.642686213 +0200
|
|
@@ -1,9 +1,9 @@
|
|
PROG = usb-modeswitch-data
|
|
VERS = 20160803
|
|
MV = /bin/mv -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
|