set default PREFIX to /usr again (rather than /) after applying the last patch, added DESTDIR as well, makes things more compatible with how suckless does things

master
Maarten van Gompel 4 years ago
parent 371d3cdd52
commit 86fcb1832d
  1. 24
      Makefile

@ -1,4 +1,4 @@
PREFIX:=/
PREFIX:=/usr
.PHONY: install shellcheck
@ -33,25 +33,25 @@ clean:
rm programs/sxmo_setpineled programs/sxmo_screenlock programs/sxmo_setpinebacklight programs/sxmo_megiaudioroute programs/sxmo_vibratepine
install: $(PROGRAMS)
cd configs && find . -type f -exec install -D -m 0644 "{}" "$(PREFIX)/usr/share/sxmo/{}" \; && cd ..
cd configs && find . -type f -exec install -D -m 0644 "{}" "$(DESTDIR)$(PREFIX)/share/sxmo/{}" \; && cd ..
# Configs
install -D -m 0644 -t $(PREFIX)/etc/alsa/conf.d/ configs/alsa/alsa_sxmo_enable_dmix.conf
install -D -m 0644 -t $(DESTDIR)$(PREFIX)/etc/alsa/conf.d/ configs/alsa/alsa_sxmo_enable_dmix.conf
install -D -m 0644 -t $(PREFIX)/etc/polkit-1/rules.d/ configs/polkit/*.rules
install -D -m 0644 -t $(DESTDIR)$(PREFIX)/etc/polkit-1/rules.d/ configs/polkit/*.rules
install -D -m 0644 -t $(PREFIX)/etc/udev/rules.d/ configs/udev/*.rules
install -D -m 0644 -t $(DESTDIR)$(PREFIX)/etc/udev/rules.d/ configs/udev/*.rules
install -D -m 0644 -t $(PREFIX)/usr/share/applications/ configs/xdg/mimeapps.list
install -D -m 0644 -t $(DESTDIR)$(PREFIX)/share/applications/ configs/xdg/mimeapps.list
# Bin
install -D -t $(PREFIX)/usr/bin scripts/*/*
install -D -t $(DESTDIR)$(PREFIX)/bin scripts/*/*
install -D -o root -m 4755 programs/sxmo_setpineled $(PREFIX)/usr/bin/
install -D -o root -m 4755 programs/sxmo_setpineled $(DESTDIR)$(PREFIX)/bin/
install -D -o root -m 4755 programs/sxmo_setpinebacklight $(PREFIX)/usr/bin/
install -D -o root -m 4755 programs/sxmo_setpinebacklight $(DESTDIR)$(PREFIX)/bin/
install -D -o root -m 4755 programs/sxmo_screenlock $(PREFIX)/usr/bin/
install -D -o root -m 4755 programs/sxmo_screenlock $(DESTDIR)$(PREFIX)/bin/
install -D programs/sxmo_megiaudioroute $(PREFIX)/usr/bin/
install -D programs/sxmo_vibratepine $(PREFIX)/usr/bin/
install -D programs/sxmo_megiaudioroute $(DESTDIR)$(PREFIX)/bin/
install -D programs/sxmo_vibratepine $(DESTDIR)$(PREFIX)/bin/

Loading…
Cancel
Save