summaryrefslogtreecommitdiff
path: root/Makefile
blob: 9c07f0dd5df681cc6915374e7f00ad8cb710adee (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 --exclude='*~' 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/gnupg-host.conf $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere/gnupg-host.conf$(ETCSUFFIX)
  42. install -m 0644 etc/gnupg-authentication.conf $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere/gnupg-authentication.conf$(ETCSUFFIX)
  43. install -m 0644 etc/monkeysphere.conf $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere/monkeysphere.conf$(ETCSUFFIX)
  44. install -m 0644 etc/monkeysphere-server.conf $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere/monkeysphere-server.conf$(ETCSUFFIX)
  45. installman:
  46. mkdir -p $(DESTDIR)$(MANPREFIX)/man1 $(DESTDIR)$(MANPREFIX)/man7 $(DESTDIR)$(MANPREFIX)/man8
  47. gzip -n man/*/*
  48. install man/man1/* $(DESTDIR)$(MANPREFIX)/man1
  49. install man/man7/* $(DESTDIR)$(MANPREFIX)/man7
  50. install man/man8/* $(DESTDIR)$(MANPREFIX)/man8
  51. gzip -d man/*/*
  52. releasenote:
  53. ./utils/build-releasenote
  54. .PHONY: all tarball debian-package freebsd-distinfo clean install installman releasenote