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.

44 lines
1.4 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. SYSCONFDIR = /etc
  7. TARGET_DIR = ./target/release
  8. MAN_SRC_DIR = ./man/en
  9. MAN_DST_DIR = $(TARGET_DIR)/man
  10. all: update acmed tacd man
  11. update:
  12. cargo update
  13. acmed:
  14. cargo build --release --bin acmed
  15. strip "$(TARGET_DIR)/acmed"
  16. tacd:
  17. cargo build --release --bin tacd
  18. strip "$(TARGET_DIR)/tacd"
  19. man:
  20. @mkdir -p $(MAN_DST_DIR)
  21. gzip <"$(MAN_SRC_DIR)/acmed.8" >"$(MAN_DST_DIR)/acmed.8.gz"
  22. gzip <"$(MAN_SRC_DIR)/acmed.toml.5" >"$(MAN_DST_DIR)/acmed.toml.5.gz"
  23. gzip <"$(MAN_SRC_DIR)/tacd.8" >"$(MAN_DST_DIR)/tacd.8.gz"
  24. install:
  25. install -D -m 0755 $(TARGET_DIR)/acmed $(DESTDIR)$(BINDIR)/acmed
  26. install -D -m 0755 $(TARGET_DIR)/tacd $(DESTDIR)$(BINDIR)/tacd
  27. install -D -m 0644 $(TARGET_DIR)/man/acmed.8.gz $(DESTDIR)$(DATADIR)/man/man8/acmed.8.gz
  28. install -D -m 0644 $(TARGET_DIR)/man/acmed.toml.5.gz $(DESTDIR)$(DATADIR)/man/man5/acmed.toml.5.gz
  29. install -D -m 0644 $(TARGET_DIR)/man/tacd.8.gz $(DESTDIR)$(DATADIR)/man/man8/tacd.8.gz
  30. install -D -m 0644 acmed/config/acmed.toml $(DESTDIR)$(SYSCONFDIR)/acmed/acmed.toml
  31. install -D -m 0644 acmed/config/default_hooks.toml $(DESTDIR)$(SYSCONFDIR)/acmed/default_hooks.toml
  32. install -d -m 0700 $(DESTDIR)$(SYSCONFDIR)/acmed/accounts
  33. install -d -m 0755 $(DESTDIR)$(SYSCONFDIR)/acmed/certs
  34. clean:
  35. cargo clean
  36. .PHONY: all update acmed tacd man install clean