A graphical client for plain-text protocols written in Rust with GTK. It currently supports the Gemini, Gopher and Finger protocols.
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.

Makefile 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Install to /usr unless otherwise specified, such as `make PREFIX=/app`
  2. PREFIX=/usr
  3. # What to run to install various files
  4. INSTALL=install -D
  5. # Run to install the actual binary
  6. INSTALL_PROGRAM=$(INSTALL)
  7. # Run to install application data, with differing permissions
  8. INSTALL_DATA=$(INSTALL) -m 644
  9. # Directories into which to install the various files
  10. bindir=$(DESTDIR)$(PREFIX)/bin
  11. sharedir=$(DESTDIR)$(PREFIX)/share
  12. # Just tell make that clean, install, and uninstall doesn't generate files
  13. .PHONY: clean clean-all install install-data copy-data uninstall
  14. # Build the application
  15. target/release/castor : src
  16. cargo build --release
  17. test :
  18. cargo test -- --test-threads=1
  19. install : target/release/castor install-data
  20. # Install binary
  21. $(INSTALL_PROGRAM) target/release/castor $(bindir)/castor
  22. # Install the data files and update the caches
  23. install-data : copy-data
  24. # Force icon cache refresh
  25. touch $(sharedir)/icons/hicolor
  26. update-desktop-database
  27. # Just copy the data files, without updating caches
  28. copy-data :
  29. # Install icons
  30. $(INSTALL_DATA) data/org.typed-hole.castor.svg $(sharedir)/icons/hicolor/scalable/apps/org.typed-hole.castor.svg
  31. $(INSTALL_DATA) data/org.typed-hole.castor-16.png $(sharedir)/icons/hicolor/16x16/apps/org.typed-hole.castor.png
  32. $(INSTALL_DATA) data/org.typed-hole.castor-32.png $(sharedir)/icons/hicolor/32x32/apps/org.typed-hole.castor.png
  33. $(INSTALL_DATA) data/org.typed-hole.castor-64.png $(sharedir)/icons/hicolor/64x64/apps/org.typed-hole.castor.png
  34. $(INSTALL_DATA) data/org.typed-hole.castor-128.png $(sharedir)/icons/hicolor/128x128/apps/org.typed-hole.castor.png
  35. # Install desktop file
  36. $(INSTALL_DATA) data/Castor.desktop $(sharedir)/applications/Castor.desktop
  37. uninstall :
  38. # Remove the .desktop
  39. rm -f $(sharedir)/applications/Castor.desktop
  40. # Remove the icons
  41. rm -f $(sharedir)/icons/hicolor/scalable/apps/org.typed-hole.castor.svg
  42. rm -f $(sharedir)/icons/hicolor/*x*/apps/org.typed-hole.castor.png
  43. # Remove the binary
  44. rm -f $(bindir)/castor
  45. clean :
  46. cargo clean