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