xref: /unit/pkg/Makefile (revision 2644:33fe8f2bfcf9)
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	cd .. && git archive \
15		--output pkg/unit-$(VERSION).tar.gz \
16		--prefix unit-$(VERSION)/ \
17		--worktree-attributes \
18		$(VERSION) ./
19	$(SHA512SUM) unit-$(VERSION).tar.gz > unit-$(VERSION).tar.gz.sha512
20
21rpm:
22	@cd rpm && VERSION=$(VERSION) RELEASE=$(RELEASE) make all
23
24deb:
25	@cd deb && VERSION=$(VERSION) RELEASE=$(RELEASE) make all
26
27docker:
28	@cd docker && VERSION=$(VERSION) RELEASE=$(RELEASE) make all
29
30npm:
31	@cd npm && VERSION=$(VERSION) RELEASE=$(RELEASE) make all
32
33njs:
34	@cd contrib && make .njs
35
36clean:
37	@cd rpm && make clean
38	@cd deb && make clean
39	@cd docker && make clean
40	@cd npm && make clean
41	@cd contrib && make clean
42	rm -f unit-$(VERSION).tar.gz
43	rm -f unit-$(VERSION).tar.gz.sha512
44
45.PHONY: default rpm deb docker npm clean
46