A collection of scripts & documentation for HorrificDev hosting.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

46 lines
1.0 KiB

  1. .PHONY: all install build test run clean
  2. ifdef USEINSTALL
  3. INSTALLEXEC := install -Dm755
  4. INSTALL := install -Dm644
  5. else
  6. INSTALLEXEC := sudo cp -f
  7. INSTALL := sudo cp -f
  8. endif
  9. UNAME := $(shell uname)
  10. ifeq ($(UNAME),Darwin)
  11. OS_FLAG := OSX
  12. endif
  13. all: build test
  14. DESTDIR?=
  15. install: build
  16. $(INSTALLEXEC) "./horrific" "${DESTDIR}/usr/bin/horrific"
  17. #$(INSTALL) "./LICENSE" "${DESTDIR}/usr/share/licenses/horrific/LICENSE"
  18. $(INSTALL) "./systemd/horrific.service" "${DESTDIR}/usr/lib/systemd/system"
  19. $(INSTALL) "./systemd/dev.horrific.daemon.service" "${DESTDIR}/usr/share/dbus-1/system-services"
  20. $(INSTALL) "./systemd/horrific.conf" "${DESTDIR}/etc/dbus-1/system.d"
  21. sudo systemctl daemon-reload
  22. sudo systemctl stop horrific.service && sudo rm -f "${DESTDIR}/etc/horrific/daemon.lock"
  23. sudo rm -f "${DESTDIR}/etc/horrific/debug.log"
  24. build:
  25. dub build
  26. test:
  27. dub test
  28. run: horrific
  29. ./horrific
  30. clean:
  31. dub clean
  32. rm -rf pkg/
  33. rm -rf src/
  34. rm -rf HORRIFIC/
  35. rm -f horrific-*.pkg.tar
  36. rm -f horrific-test-library
  37. rm -f horrific