Makefile 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # I Would highly suggest removing this. And either including it in the repo,
  2. # Or, having the app bootstrap it.
  3. .PHONY: install
  4. install:
  5. test -d $(HOME)/.tcms || mkdir $(HOME)/.tcms
  6. test -d www/themes || mkdir www/themes
  7. test -d data/files || mkdir data/files
  8. $(RM) pod2htmd.tmp;
  9. .PHONY: install-service
  10. install-service:
  11. mkdir -p ~/.config/systemd/user
  12. cp service-files/systemd.unit ~/.config/systemd/user/tCMS.service
  13. sed -ie 's#__REPLACEME__#$(shell pwd)#g' ~/.config/systemd/user/tCMS.service
  14. systemctl --user daemon-reload
  15. systemctl --user enable tCMS
  16. systemctl --user start tCMS
  17. loginctl enable-linger $(USER)
  18. .PHONY: prereq-debian
  19. prereq-debian: prereq-debs prereq-perl prereq-frontend
  20. .PHONY: prereq-debs
  21. prereq-debs:
  22. apt-get update
  23. apt-get install -y sqlite3 libsqlite3-dev libdbd-sqlite3-perl cpanminus starman libxml2 curl \
  24. libtext-xslate-perl libplack-perl libconfig-tiny-perl libdatetime-format-http-perl libjson-maybexs-perl \
  25. libuuid-tiny-perl libcapture-tiny-perl libconfig-simple-perl libdbi-perl libfile-slurper-perl libfile-touch-perl \
  26. libfile-copy-recursive-perl libxml-rss-perl libmodule-install-perl libio-string-perl \
  27. libmoose-perl libmoosex-types-datetime-perl libxml-libxml-perl
  28. .PHONY: prereq-perl
  29. prereq-perl:
  30. cpanm -n --installdeps .
  31. .PHONY: prereq-frontend
  32. prereq-frontend:
  33. mkdir -p www/scripts; cd www/scripts && curl -L --remote-name-all \
  34. "https://github.com/woody180/vanilla-javascript-emoji-picker/raw/master/fgEmojiPicker.js" \
  35. "https://github.com/woody180/vanilla-javascript-emoji-picker/raw/master/full-emoji-list.json"