3 # Makefile for monkeysphere
5 # (c) 2008-2009 Daniel Kahn Gillmor <dkg@fifthhorseman.net>
6 # Licensed under GPL v3 or later
8 MONKEYSPHERE_VERSION = `head -n1 packaging/debian/changelog | sed 's/.*(\([^-]*\)-.*/\1/'`
10 # these defaults are for debian. porters should probably adjust them
11 # before calling make install
15 MANPREFIX ?= $(PREFIX)/share/man
20 $(MAKE) -C src/keytrans
23 rm -rf monkeysphere-$(MONKEYSPHERE_VERSION)
24 mkdir -p monkeysphere-$(MONKEYSPHERE_VERSION)/doc
25 ln -s ../../website/getting-started-user.mdwn ../../website/getting-started-admin.mdwn ../../doc/TODO ../../doc/MonkeySpec monkeysphere-$(MONKEYSPHERE_VERSION)/doc
26 ln -s ../COPYING ../etc ../Makefile ../man ../src ../tests monkeysphere-$(MONKEYSPHERE_VERSION)
27 tar -ch --exclude='*~' monkeysphere-$(MONKEYSPHERE_VERSION) | gzip -n > monkeysphere_$(MONKEYSPHERE_VERSION).orig.tar.gz
28 rm -rf monkeysphere-$(MONKEYSPHERE_VERSION)
30 debian-package: tarball
31 tar xzf monkeysphere_$(MONKEYSPHERE_VERSION).orig.tar.gz
32 cp -a packaging/debian monkeysphere-$(MONKEYSPHERE_VERSION)
33 (cd monkeysphere-$(MONKEYSPHERE_VERSION) && debuild -uc -us)
34 rm -rf monkeysphere-$(MONKEYSPHERE_VERSION)
36 # don't explicitly depend on the tarball, since our tarball
37 # (re)generation is not idempotent even when no source changes.
39 ./utils/build-freebsd-distinfo
42 $(MAKE) -C src/keytrans clean
43 # clean up old monkeysphere packages lying around as well.
46 # this target is to be called from the tarball, not from the git
48 install: all installman
49 mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(PREFIX)/sbin
50 mkdir -p $(DESTDIR)$(PREFIX)/share/monkeysphere/m $(DESTDIR)$(PREFIX)/share/monkeysphere/mh $(DESTDIR)$(PREFIX)/share/monkeysphere/ma $(DESTDIR)$(PREFIX)/share/monkeysphere/transitions
51 mkdir -p $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere
52 mkdir -p $(DESTDIR)$(PREFIX)/share/doc/monkeysphere
53 install src/monkeysphere src/keytrans/openpgp2ssh src/keytrans/pem2openpgp $(DESTDIR)$(PREFIX)/bin
54 install src/monkeysphere-host src/monkeysphere-authentication $(DESTDIR)$(PREFIX)/sbin
55 install -m 0644 src/share/common $(DESTDIR)$(PREFIX)/share/monkeysphere
56 install -m 0744 src/transitions/* $(DESTDIR)$(PREFIX)/share/monkeysphere/transitions
57 install -m 0644 src/transitions/README.txt $(DESTDIR)$(PREFIX)/share/monkeysphere/transitions
58 install -m 0644 src/share/m/* $(DESTDIR)$(PREFIX)/share/monkeysphere/m
59 install -m 0644 src/share/mh/* $(DESTDIR)$(PREFIX)/share/monkeysphere/mh
60 install -m 0644 src/share/ma/* $(DESTDIR)$(PREFIX)/share/monkeysphere/ma
61 install doc/* $(DESTDIR)$(PREFIX)/share/doc/monkeysphere
62 install -m 0644 etc/monkeysphere.conf $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere/monkeysphere.conf$(ETCSUFFIX)
63 install -m 0644 etc/monkeysphere-host.conf $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere/monkeysphere-host.conf$(ETCSUFFIX)
64 install -m 0644 etc/monkeysphere-authentication.conf $(DESTDIR)$(ETCPREFIX)/etc/monkeysphere/monkeysphere-authentication.conf$(ETCSUFFIX)
67 mkdir -p $(DESTDIR)$(MANPREFIX)/man1 $(DESTDIR)$(MANPREFIX)/man7 $(DESTDIR)$(MANPREFIX)/man8
69 install man/man1/* $(DESTDIR)$(MANPREFIX)/man1
70 install man/man7/* $(DESTDIR)$(MANPREFIX)/man7
71 install man/man8/* $(DESTDIR)$(MANPREFIX)/man8
75 ./utils/build-releasenote
77 .PHONY: all tarball debian-package freebsd-distinfo clean install installman releasenote