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.

49 lines
1.5 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. PREFIX = /usr
  2. EXEC_PREFIX = $(PREFIX)
  3. BINDIR = $(EXEC_PREFIX)/bin
  4. DATAROOTDIR = $(PREFIX)/share
  5. DATADIR = $(DATAROOTDIR)
  6. MAN5DIR = $(DATADIR)/man/man5
  7. MAN8DIR = $(DATADIR)/man/man8
  8. SYSCONFDIR = /etc
  9. TARGET_DIR = ./target/release
  10. MAN_SRC_DIR = ./man/en
  11. MAN_DST_DIR = $(TARGET_DIR)/man
  12. all: update acmed tacd man
  13. update:
  14. cargo update
  15. acmed:
  16. cargo build --release --bin acmed
  17. strip "$(TARGET_DIR)/acmed"
  18. tacd:
  19. cargo build --release --bin tacd
  20. strip "$(TARGET_DIR)/tacd"
  21. man:
  22. @mkdir -p $(MAN_DST_DIR)
  23. gzip <"$(MAN_SRC_DIR)/acmed.8" >"$(MAN_DST_DIR)/acmed.8.gz"
  24. gzip <"$(MAN_SRC_DIR)/acmed.toml.5" >"$(MAN_DST_DIR)/acmed.toml.5.gz"
  25. gzip <"$(MAN_SRC_DIR)/tacd.8" >"$(MAN_DST_DIR)/tacd.8.gz"
  26. install:
  27. install -d -m 0755 $(DESTDIR)$(BINDIR)
  28. install -d -m 0755 $(DESTDIR)$(MAN5DIR)
  29. install -d -m 0755 $(DESTDIR)$(MAN8DIR)
  30. install -d -m 0755 $(DESTDIR)$(SYSCONFDIR)/acmed/certs
  31. install -d -m 0700 $(DESTDIR)$(SYSCONFDIR)/acmed/accounts
  32. install -m 0755 $(TARGET_DIR)/acmed $(DESTDIR)$(BINDIR)/acmed
  33. install -m 0755 $(TARGET_DIR)/tacd $(DESTDIR)$(BINDIR)/tacd
  34. install -m 0644 $(TARGET_DIR)/man/acmed.8.gz $(DESTDIR)$(MAN8DIR)/acmed.8.gz
  35. install -m 0644 $(TARGET_DIR)/man/acmed.toml.5.gz $(DESTDIR)$(MAN5DIR)/acmed.toml.5.gz
  36. install -m 0644 $(TARGET_DIR)/man/tacd.8.gz $(DESTDIR)$(MAN8DIR)/tacd.8.gz
  37. install -m 0644 acmed/config/acmed.toml $(DESTDIR)$(SYSCONFDIR)/acmed/acmed.toml
  38. install -m 0644 acmed/config/default_hooks.toml $(DESTDIR)$(SYSCONFDIR)/acmed/default_hooks.toml
  39. clean:
  40. cargo clean
  41. .PHONY: all update acmed tacd man install clean