54 lines
2.6 KiB
Diff
54 lines
2.6 KiB
Diff
--- Makefile.orig 2019-11-11 21:45:13.000000000 +0100
|
|
+++ Makefile 2020-05-04 21:22:53.680445703 +0200
|
|
@@ -5,11 +5,11 @@ CFLAGS += -Wall -Wno-deprecated-dec
|
|
LIBS = `pkg-config --libs --cflags libusb-1.0`
|
|
RM = /bin/rm -f
|
|
OBJS = usb_modeswitch.c
|
|
-PREFIX = $(DESTDIR)/usr
|
|
-ETCDIR = $(DESTDIR)/etc
|
|
+PREFIX = /usr
|
|
+ETCDIR = /etc
|
|
SYSDIR = $(ETCDIR)/systemd/system
|
|
UPSDIR = $(ETCDIR)/init
|
|
-UDEVDIR = $(DESTDIR)/lib/udev
|
|
+UDEVDIR = /lib/udev
|
|
SBINDIR = $(PREFIX)/sbin
|
|
MANDIR = $(PREFIX)/share/man/man1
|
|
|
|
@@ -54,12 +54,12 @@ distclean: clean
|
|
# If not, use the dispatcher directly from the udev rule as in previous versions
|
|
|
|
install-common: $(PROG) $(DISPATCH)
|
|
- install -D --mode=755 usb_modeswitch $(SBINDIR)/usb_modeswitch
|
|
- install -D --mode=755 usb_modeswitch.sh $(UDEVDIR)/usb_modeswitch
|
|
- install -D --mode=644 usb_modeswitch.conf $(ETCDIR)/usb_modeswitch.conf
|
|
- install -D --mode=644 usb_modeswitch.1 $(MANDIR)/usb_modeswitch.1
|
|
- install -D --mode=644 usb_modeswitch_dispatcher.1 $(MANDIR)/usb_modeswitch_dispatcher.1
|
|
- install -D --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher
|
|
+ install -D --mode=755 usb_modeswitch $(DESTDIR)/$(SBINDIR)/usb_modeswitch
|
|
+ install -D --mode=755 usb_modeswitch.sh $(DESTDIR)/$(UDEVDIR)/usb_modeswitch
|
|
+ install -D --mode=644 usb_modeswitch.conf $(DESTDIR)/$(ETCDIR)/usb_modeswitch.conf
|
|
+ install -D --mode=644 usb_modeswitch.1 $(DESTDIR)/$(MANDIR)/usb_modeswitch.1
|
|
+ install -D --mode=644 usb_modeswitch_dispatcher.1 $(DESTDIR)/$(MANDIR)/usb_modeswitch_dispatcher.1
|
|
+ install -D --mode=755 usb_modeswitch_dispatcher $(DESTDIR)/$(SBINDIR)/usb_modeswitch_dispatcher
|
|
install -d $(DESTDIR)/var/lib/usb_modeswitch
|
|
test -d $(UPSDIR) -a -e /sbin/initctl && install --mode=644 usb-modeswitch-upstart.conf $(UPSDIR) || test 1
|
|
test -d $(SYSDIR) -a \( -e /usr/bin/systemctl -o -e /bin/systemctl \) && install --mode=644 usb_modeswitch@.service $(SYSDIR) || test 1
|
|
@@ -73,10 +73,10 @@ install-dynlink: dispatcher-dynlink inst
|
|
install-statlink: dispatcher-statlink install-common
|
|
|
|
uninstall:
|
|
- $(RM) $(SBINDIR)/usb_modeswitch
|
|
- $(RM) $(SBINDIR)/usb_modeswitch_dispatcher
|
|
- $(RM) $(UDEVDIR)/usb_modeswitch
|
|
- $(RM) $(ETCDIR)/usb_modeswitch.conf
|
|
- $(RM) $(MANDIR)/usb_modeswitch.1
|
|
+ $(RM) $(DESTDIR)/$(SBINDIR)/usb_modeswitch
|
|
+ $(RM) $(DESTDIR)/$(SBINDIR)/usb_modeswitch_dispatcher
|
|
+ $(RM) $(DESTDIR)/$(UDEVDIR)/usb_modeswitch
|
|
+ $(RM) $(DESTDIR)/$(ETCDIR)/usb_modeswitch.conf
|
|
+ $(RM) $(DESTDIR)/$(MANDIR)/usb_modeswitch.1
|
|
$(RM) -R $(DESTDIR)/var/lib/usb_modeswitch
|
|
- $(RM) $(SYSDIR)/usb_modeswitch@.service
|
|
+ $(RM) $(DESTDIR)/$(SYSDIR)/usb_modeswitch@.service
|