xref: /unit/pkg/Makefile (revision 1845:5f08b752b1c5)
1#!/usr/bin/make
2
3include ../version
4include shasum.mak
5
6VERSION ?= $(NXT_VERSION)
7RELEASE ?= 1
8
9default:
10	@echo "available targets: dist rpm deb docker npm"
11
12dist:
13	rm -f unit-$(VERSION).tar.gz
14	hg archive unit-$(VERSION).tar.gz \
15		-r $(VERSION) \
16		-p unit-$(VERSION) \
17		-X "../.hg*" -X "../pkg/" -X "../docs/*.*" -X "../docs/Makefile"
18	$(SHA512SUM) unit-$(VERSION).tar.gz > unit-$(VERSION).tar.gz.sha512
19
20rpm:
21	@cd rpm && VERSION=$(VERSION) RELEASE=$(RELEASE) make all
22
23deb:
24	@cd deb && VERSION=$(VERSION) RELEASE=$(RELEASE) make all
25
26docker:
27	@cd docker && VERSION=$(VERSION) RELEASE=$(RELEASE) make all
28
29npm:
30	@cd npm && VERSION=$(VERSION) RELEASE=$(RELEASE) make all
31
32clean:
33	@cd rpm && make clean
34	@cd deb && make clean
35	@cd docker && make clean
36	@cd npm && make clean
37	rm -f unit-$(VERSION).tar.gz
38	rm -f unit-$(VERSION).tar.gz.sha512
39
40.PHONY: default rpm deb docker npm clean
41