summaryrefslogtreecommitdiff
path: root/Makefile
blob: defd15a03988a11bafb74974245ded918ea8bb3a (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. PREFIX ?= /usr
  6. all: keytrans
  7. keytrans:
  8. $(MAKE) -C src/keytrans
  9. tarball: clean
  10. rm -rf monkeysphere-$(MONKEYSPHERE_VERSION)
  11. mkdir -p monkeysphere-$(MONKEYSPHERE_VERSION)/doc
  12. ln -s ../../website/getting-started-user.mdwn ../../website/getting-started-admin.mdwn ../../doc/TODO ../../doc/MonkeySpec monkeysphere-$(MONKEYSPHERE_VERSION)/doc
  13. ln -s ../COPYING ../etc ../Makefile ../man ../src monkeysphere-$(MONKEYSPHERE_VERSION)
  14. tar -ch monkeysphere-$(MONKEYSPHERE_VERSION) | gzip -n > monkeysphere_$(MONKEYSPHERE_VERSION).orig.tar.gz
  15. rm -rf monkeysphere-$(MONKEYSPHERE_VERSION)
  16. debian-package: tarball
  17. tar xzf monkeysphere_$(MONKEYSPHERE_VERSION).orig.tar.gz
  18. cp -a debian monkeysphere-$(MONKEYSPHERE_VERSION)
  19. (cd monkeysphere-$(MONKEYSPHERE_VERSION) && debuild -uc -us)
  20. rm -rf monkeysphere-$(MONKEYSPHERE_VERSION)
  21. clean:
  22. $(MAKE) -C src/keytrans clean
  23. # clean up old monkeysphere packages lying around as well.
  24. rm -f monkeysphere_*
  25. # this target is to be called from the tarball, not from the git
  26. # working dir!
  27. install: all
  28. mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/sbin $(DESTDIR)$(PREFIX)/share/monkeysphere
  29. mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 $(DESTDIR)$(PREFIX)/share/man/man7 $(DESTDIR)$(PREFIX)/share/man/man8
  30. mkdir -p $(DESTDIR)$(PREFIX)/share/doc/monkeysphere
  31. mkdir -p $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere
  32. install src/monkeysphere src/monkeysphere-ssh-proxycommand src/keytrans/openpgp2ssh $(DESTDIR)/$(PREFIX)/bin
  33. install src/monkeysphere-server $(DESTDIR)/$(PREFIX)/sbin
  34. install -m 0644 src/common $(DESTDIR)/$(PREFIX)/share/monkeysphere
  35. install doc/* $(DESTDIR)$(PREFIX)/share/doc/monkeysphere
  36. install man/man1/* $(DESTDIR)$(PREFIX)/share/man/man1
  37. install man/man7/* $(DESTDIR)$(PREFIX)/share/man/man7
  38. install man/man8/* $(DESTDIR)$(PREFIX)/share/man/man8
  39. install -m 0644 etc/* $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere
  40. releasenote:
  41. ./utils/build-releasenote
  42. .PHONY: all clean tarball debian-package install releasenote