xref: /unit/pkg/Makefile (revision 1845:5f08b752b1c5)
1372Sdefan@nginx.com#!/usr/bin/make
2372Sdefan@nginx.com
3953Salexander.borisov@nginx.cominclude ../version
41411Sthresh@nginx.cominclude shasum.mak
5372Sdefan@nginx.com
6953Salexander.borisov@nginx.comVERSION ?= $(NXT_VERSION)
7372Sdefan@nginx.comRELEASE ?= 1
8372Sdefan@nginx.com
9372Sdefan@nginx.comdefault:
10816Salexander.borisov@nginx.com	@echo "available targets: dist rpm deb docker npm"
11705Svbart@nginx.com
12705Svbart@nginx.comdist:
13705Svbart@nginx.com	rm -f unit-$(VERSION).tar.gz
14705Svbart@nginx.com	hg archive unit-$(VERSION).tar.gz \
15705Svbart@nginx.com		-r $(VERSION) \
16705Svbart@nginx.com		-p unit-$(VERSION) \
17*1845Svbart@nginx.com		-X "../.hg*" -X "../pkg/" -X "../docs/*.*" -X "../docs/Makefile"
181411Sthresh@nginx.com	$(SHA512SUM) unit-$(VERSION).tar.gz > unit-$(VERSION).tar.gz.sha512
19372Sdefan@nginx.com
20372Sdefan@nginx.comrpm:
21372Sdefan@nginx.com	@cd rpm && VERSION=$(VERSION) RELEASE=$(RELEASE) make all
22372Sdefan@nginx.com
23373Sdefan@nginx.comdeb:
24373Sdefan@nginx.com	@cd deb && VERSION=$(VERSION) RELEASE=$(RELEASE) make all
25373Sdefan@nginx.com
26508Sthresh@nginx.comdocker:
27508Sthresh@nginx.com	@cd docker && VERSION=$(VERSION) RELEASE=$(RELEASE) make all
28508Sthresh@nginx.com
29816Salexander.borisov@nginx.comnpm:
30816Salexander.borisov@nginx.com	@cd npm && VERSION=$(VERSION) RELEASE=$(RELEASE) make all
31816Salexander.borisov@nginx.com
32372Sdefan@nginx.comclean:
33372Sdefan@nginx.com	@cd rpm && make clean
34373Sdefan@nginx.com	@cd deb && make clean
35508Sthresh@nginx.com	@cd docker && make clean
36816Salexander.borisov@nginx.com	@cd npm && make clean
371411Sthresh@nginx.com	rm -f unit-$(VERSION).tar.gz
381411Sthresh@nginx.com	rm -f unit-$(VERSION).tar.gz.sha512
39372Sdefan@nginx.com
40816Salexander.borisov@nginx.com.PHONY: default rpm deb docker npm clean
41