summaryrefslogtreecommitdiff
path: root/Makefile
blob: 779bb1a81c11f64490548029467760c8da749562 (plain)
  1. MONKEYSPHERE_VERSION = `head -n1 debian/changelog | sed 's/.*(\([^-]*\)-.*/\1/'`
  2. # these defaults are for debian. porters should probably adjust them
  3. # before calling make install
  4. ETCPREFIX ?=
  5. ETCSUFFIX ?=
  6. PREFIX ?= /usr
  7. MANPREFIX ?= $(PREFIX)/share/man
  8. all: keytrans
  9. keytrans:
  10. $(MAKE) -C src/keytrans
  11. tarball: clean
  12. rm -rf monkeysphere-$(MONKEYSPHERE_VERSION)
  13. mkdir -p monkeysphere-$(MONKEYSPHERE_VERSION)/doc
  14. ln -s ../../website/getting-started-user.mdwn ../../website/getting-started-admin.mdwn ../../doc/TODO ../../doc/MonkeySpec monkeysphere-$(MONKEYSPHERE_VERSION)/doc
  15. ln -s ../COPYING ../etc ../Makefile ../man ../src monkeysphere-$(MONKEYSPHERE_VERSION)
  16. tar -ch monkeysphere-$(MONKEYSPHERE_VERSION) | gzip -n > monkeysphere_$(MONKEYSPHERE_VERSION).orig.tar.gz
  17. rm -rf monkeysphere-$(MONKEYSPHERE_VERSION)
  18. debian-package: tarball
  19. tar xzf monkeysphere_$(MONKEYSPHERE_VERSION).orig.tar.gz
  20. cp -a debian monkeysphere-$(MONKEYSPHERE_VERSION)
  21. (cd monkeysphere-$(MONKEYSPHERE_VERSION) && debuild -uc -us)
  22. rm -rf monkeysphere-$(MONKEYSPHERE_VERSION)
  23. freebsd-distinfo: tarball
  24. ./utils/build-freebsd-distinfo
  25. clean:
  26. $(MAKE) -C src/keytrans clean
  27. # clean up old monkeysphere packages lying around as well.
  28. rm -f monkeysphere_*
  29. # this target is to be called from the tarball, not from the git
  30. # working dir!
  31. install: all installman
  32. mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/sbin $(DESTDIR)$(PREFIX)/share/monkeysphere
  33. mkdir -p $(DESTDIR)$(PREFIX)/share/doc/monkeysphere
  34. mkdir -p $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere
  35. install src/monkeysphere src/monkeysphere-ssh-proxycommand src/keytrans/openpgp2ssh $(DESTDIR)$(PREFIX)/bin
  36. install src/monkeysphere-server $(DESTDIR)$(PREFIX)/sbin
  37. install -m 0644 src/common $(DESTDIR)$(PREFIX)/share/monkeysphere
  38. install doc/* $(DESTDIR)$(PREFIX)/share/doc/monkeysphere
  39. install -m 0644 etc/monkeysphere.conf $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere/monkeysphere.conf$(ETCSUFFIX)
  40. install -m 0644 etc/monkeysphere-server.conf $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere/monkeysphere-server.conf$(ETCSUFFIX)
  41. installman:
  42. mkdir -p $(DESTDIR)$(MANPREFIX)/man1 $(DESTDIR)$(MANPREFIX)/man7 $(DESTDIR)$(MANPREFIX)/man8
  43. gzip -n man/*/*
  44. install man/man1/* $(DESTDIR)$(MANPREFIX)/man1
  45. install man/man7/* $(DESTDIR)$(MANPREFIX)/man7
  46. install man/man8/* $(DESTDIR)$(MANPREFIX)/man8
  47. gzip -d man/*/*
  48. releasenote:
  49. ./utils/build-releasenote
  50. .PHONY: all clean tarball debian-package install releasenote