summaryrefslogtreecommitdiff
path: root/Makefile
blob: 057707aad99a409865a56d3aa7a1c8f70b39ee48 (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 ../tests 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. # don't explicitly depend on the tarball, since our tarball
  24. # (re)generation is not idempotent even when no source changes.
  25. freebsd-distinfo:
  26. ./utils/build-freebsd-distinfo
  27. clean:
  28. $(MAKE) -C src/keytrans clean
  29. # clean up old monkeysphere packages lying around as well.
  30. rm -f monkeysphere_*
  31. # this target is to be called from the tarball, not from the git
  32. # working dir!
  33. install: all installman
  34. mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/sbin $(DESTDIR)$(PREFIX)/share/monkeysphere
  35. mkdir -p $(DESTDIR)$(PREFIX)/share/doc/monkeysphere
  36. mkdir -p $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere
  37. install src/monkeysphere src/monkeysphere-ssh-proxycommand src/keytrans/openpgp2ssh $(DESTDIR)$(PREFIX)/bin
  38. install src/monkeysphere-server $(DESTDIR)$(PREFIX)/sbin
  39. install -m 0644 src/common $(DESTDIR)$(PREFIX)/share/monkeysphere
  40. install doc/* $(DESTDIR)$(PREFIX)/share/doc/monkeysphere
  41. install -m 0644 etc/monkeysphere.conf $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere/monkeysphere.conf$(ETCSUFFIX)
  42. install -m 0644 etc/monkeysphere-server.conf $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere/monkeysphere-server.conf$(ETCSUFFIX)
  43. installman:
  44. mkdir -p $(DESTDIR)$(MANPREFIX)/man1 $(DESTDIR)$(MANPREFIX)/man7 $(DESTDIR)$(MANPREFIX)/man8
  45. gzip -n man/*/*
  46. install man/man1/* $(DESTDIR)$(MANPREFIX)/man1
  47. install man/man7/* $(DESTDIR)$(MANPREFIX)/man7
  48. install man/man8/* $(DESTDIR)$(MANPREFIX)/man8
  49. gzip -d man/*/*
  50. releasenote:
  51. ./utils/build-releasenote
  52. .PHONY: all clean tarball debian-package install releasenote