Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #
  2. # SPDX-License-Identifier: GPL-3.0-or-later
  3. INSTALL_FILES=$(wildcard parabolaiso/initcpio/install/*)
  4. HOOKS_FILES=$(wildcard parabolaiso/initcpio/hooks/*)
  5. SCRIPT_FILES=$(wildcard parabolaiso/initcpio/script/*)
  6. INSTALL_DIR=$(DESTDIR)/usr/lib/initcpio/install
  7. HOOKS_DIR=$(DESTDIR)/usr/lib/initcpio/hooks
  8. SCRIPT_DIR=$(DESTDIR)/usr/lib/initcpio
  9. DOC_FILES=$(wildcard docs/*) $(wildcard *.rst)
  10. DOC_DIR=$(DESTDIR)/usr/share/doc/parabolaiso
  11. all:
  12. check: lint
  13. lint:
  14. shellcheck -s bash parabolaiso/mkparabolaiso \
  15. $(wildcard scripts/*.sh) \
  16. $(INSTALL_FILES) \
  17. $(wildcard configs/*/build.sh) \
  18. $(wildcard configs/*/profiledef.sh) \
  19. configs/releng/airootfs/root/.automated_script.sh \
  20. configs/releng/airootfs/usr/local/bin/choose-mirror \
  21. configs/releng/airootfs/usr/local/bin/livecd-sound \
  22. configs/releng-openrc/airootfs/root/.automated_script.sh \
  23. configs/releng-openrc/airootfs/etc/local.d/pacman-init.start \
  24. configs/releng-openrc/airootfs/etc/local.d/choose-mirror.start \
  25. configs/releng-openrc/airootfs/etc/local.d/etc-pacman.d-gnupg.start \
  26. configs/releng-openrc/airootfs/etc/NetworkManager/dispatcher.d/reflector \
  27. configs/releng-openrc/airootfs/usr/local/bin/choose-mirror \
  28. configs/lxde-openrc/airootfs/root/.automated_script.sh \
  29. configs/lxde-openrc/airootfs/root/.keymap.sh \
  30. configs/lxde-openrc/airootfs/root/.language.sh \
  31. configs/lxde-openrc/airootfs/etc/local.d/pacman-init.start \
  32. configs/lxde-openrc/airootfs/etc/local.d/choose-mirror.start \
  33. configs/lxde-openrc/airootfs/etc/local.d/etc-pacman.d-gnupg.start \
  34. configs/lxde-openrc/airootfs/etc/NetworkManager/dispatcher.d/reflector \
  35. configs/lxde-openrc/airootfs/usr/local/bin/choose-mirror
  36. shellcheck -s dash $(HOOKS_FILES) $(SCRIPT_FILES)
  37. install: install-program install-examples install-doc
  38. install-program:
  39. install -vDm 755 parabolaiso/mkparabolaiso -t "$(DESTDIR)/usr/bin/"
  40. install -vDm 755 scripts/run_parabolaiso.sh "$(DESTDIR)/usr/bin/run_parabolaiso"
  41. install-initcpio:
  42. install -d $(SCRIPT_DIR) $(HOOKS_DIR) $(INSTALL_DIR)
  43. install -m 755 -t $(SCRIPT_DIR) $(SCRIPT_FILES)
  44. install -m 644 -t $(HOOKS_DIR) $(HOOKS_FILES)
  45. install -m 644 -t $(INSTALL_DIR) $(INSTALL_FILES)
  46. install-examples:
  47. install -d -m 755 $(DESTDIR)/usr/share/parabolaiso/
  48. cp -a --no-preserve=ownership configs $(DESTDIR)/usr/share/parabolaiso/
  49. install-doc:
  50. install -vDm 644 $(DOC_FILES) -t $(DOC_DIR)
  51. .PHONY: check install install-program install-initcpio install-examples install-doc lint