| 1 | version = 0.9.4 |
|---|
| 2 | |
|---|
| 3 | prefix = /usr/local |
|---|
| 4 | webprefix = $(prefix)/share |
|---|
| 5 | confprefix = $(prefix)/etc |
|---|
| 6 | |
|---|
| 7 | dprefix = $(DESTDIR)$(prefix) |
|---|
| 8 | dwebprefix = $(DESTDIR)$(webprefix) |
|---|
| 9 | dconfprefix = $(DESTDIR)$(confprefix) |
|---|
| 10 | |
|---|
| 11 | all: |
|---|
| 12 | @echo "Nothing to make. Call 'make install' if you're sure." |
|---|
| 13 | |
|---|
| 14 | install: |
|---|
| 15 | $(MAKE) install-common |
|---|
| 16 | $(MAKE) install-scripts |
|---|
| 17 | $(MAKE) install-dxs |
|---|
| 18 | $(MAKE) install-ocs |
|---|
| 19 | $(MAKE) install-admin |
|---|
| 20 | #$(MAKE) install-doc |
|---|
| 21 | |
|---|
| 22 | install-common: |
|---|
| 23 | mkdir -p $(dprefix)/share/hotstuff-common |
|---|
| 24 | cp schemas/hotstuff.sql $(dprefix)/share/hotstuff-common |
|---|
| 25 | cp schemas/hotstuffadmin.sql $(dprefix)/share/hotstuff-common |
|---|
| 26 | cp schemas/hotstuff-osd.xml $(dprefix)/share/hotstuff-common |
|---|
| 27 | cp schemas/ghns.xsd $(dprefix)/share/hotstuff-common |
|---|
| 28 | cp scripts/pre-commit $(dprefix)/share/hotstuff-common |
|---|
| 29 | mkdir -p $(dconfprefix) |
|---|
| 30 | cp src/hotstuff.conf-dist $(dconfprefix)/hotstuff.conf-dist |
|---|
| 31 | mkdir -p $(dprefix)/share/man/man7 |
|---|
| 32 | cp man/ghns.7 $(dprefix)/share/man/man7 |
|---|
| 33 | cp man/hotstuff.7 $(dprefix)/share/man/man7 |
|---|
| 34 | |
|---|
| 35 | install-scripts: |
|---|
| 36 | mkdir -p $(dprefix)/bin |
|---|
| 37 | cp src/hotstuff-scan $(dprefix)/bin |
|---|
| 38 | cp src/hotstuff-versioning $(dprefix)/bin |
|---|
| 39 | cp src/hotstuff-http $(dprefix)/bin |
|---|
| 40 | cp src/hotstuff-downloads $(dprefix)/bin |
|---|
| 41 | cp src/hotstuff-siteadmin $(dprefix)/bin |
|---|
| 42 | cp scripts/ghnsmetatemplate $(dprefix)/bin |
|---|
| 43 | cp scripts/ghnssignature $(dprefix)/bin |
|---|
| 44 | mkdir -p $(dprefix)/lib/cgi-bin |
|---|
| 45 | cp src/hotstuff-stuff $(dprefix)/lib/cgi-bin |
|---|
| 46 | cp src/hotstuff-access $(dprefix)/lib/cgi-bin |
|---|
| 47 | cp src/hotstuff-provider $(dprefix)/lib/cgi-bin |
|---|
| 48 | mkdir -p $(dprefix)/share/man/man1 |
|---|
| 49 | cp man/hotstuff-scan.1 $(dprefix)/share/man/man1 |
|---|
| 50 | cp man/hotstuff-stuff.1 $(dprefix)/share/man/man1 |
|---|
| 51 | cp man/hotstuff-versioning.1 $(dprefix)/share/man/man1 |
|---|
| 52 | cp man/hotstuff-http.1 $(dprefix)/share/man/man1 |
|---|
| 53 | cp man/hotstuff-downloads.1 $(dprefix)/share/man/man1 |
|---|
| 54 | cp man/hotstuff-siteadmin.1 $(dprefix)/share/man/man1 |
|---|
| 55 | cp man/hotstuff-provider.1 $(dprefix)/share/man/man1 |
|---|
| 56 | cp man/ghnsmetatemplate.1 $(dprefix)/share/man/man1 |
|---|
| 57 | cp man/ghnssignature.1 $(dprefix)/share/man/man1 |
|---|
| 58 | |
|---|
| 59 | install-dxs: |
|---|
| 60 | mkdir -p $(dprefix)/bin |
|---|
| 61 | cp scripts/dxsclient $(dprefix)/bin |
|---|
| 62 | mkdir -p $(dprefix)/share/man/man1 |
|---|
| 63 | cp man/hotstuff-dxs.1 $(dprefix)/share/man/man1 |
|---|
| 64 | cp man/dxsclient.1 $(dprefix)/share/man/man1 |
|---|
| 65 | mkdir -p $(dprefix)/lib/cgi-bin |
|---|
| 66 | cp dxs/DXS.pm $(dprefix)/lib/cgi-bin |
|---|
| 67 | cp dxs/hotstuff-dxs $(dprefix)/lib/cgi-bin |
|---|
| 68 | |
|---|
| 69 | install-ocs: |
|---|
| 70 | mkdir -p $(dprefix)/lib/cgi-bin |
|---|
| 71 | cp dxs/HotstuffOCS.pm $(dprefix)/lib/cgi-bin |
|---|
| 72 | cp dxs/hotstuff-ocs $(dprefix)/lib/cgi-bin |
|---|
| 73 | |
|---|
| 74 | install-admin: |
|---|
| 75 | mkdir -p $(dwebprefix)/hotstuff-admin |
|---|
| 76 | cp -r admin/*.* $(dwebprefix)/hotstuff-admin |
|---|
| 77 | mkdir -p $(dwebprefix)/hotstuff-admin/images |
|---|
| 78 | cp -r admin/images/*.* $(dwebprefix)/hotstuff-admin/images |
|---|
| 79 | |
|---|
| 80 | #install-doc: |
|---|
| 81 | # mkdir -p $(dprefix)/share/doc/hotstuff |
|---|
| 82 | # cp database.txt $(dprefix)/share/doc/hotstuff |
|---|
| 83 | |
|---|
| 84 | dist: |
|---|
| 85 | rm -rf ../hotstuff-$(version) |
|---|
| 86 | cp -r ../hotstuff ../hotstuff-$(version) |
|---|
| 87 | cd ../hotstuff-$(version) && svn-clean |
|---|
| 88 | find ../hotstuff-$(version) -name .svn | xargs rm -rf |
|---|
| 89 | cd .. && tar cvzf hotstuff-$(version).tar.gz hotstuff-$(version) |
|---|