summaryrefslogtreecommitdiff
path: root/Makefile
blob: 691447acbfa4e385207d4d1b744cf1fbdbb526aa (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)$(ETCPREFIX)/etc/monkeysphere
  31. install src/monkeysphere src/monkeysphere-ssh-proxycommand src/keytrans/openpgp2ssh $(DESTDIR)/$(PREFIX)/bin
  32. install src/monkeysphere-server $(DESTDIR)/$(PREFIX)/sbin
  33. install src/common $(DESTDIR)/$(PREFIX)/share/monkeysphere
  34. install man/man1/* $(DESTDIR)$(PREFIX)/share/man/man1
  35. install man/man7/* $(DESTDIR)$(PREFIX)/share/man/man7
  36. install man/man8/* $(DESTDIR)$(PREFIX)/share/man/man8
  37. install -m 0644 etc/* $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere
  38. .PHONY: all clean tarball debian-package install