Mercurial > hg
comparison contrib/packaging/Makefile @ 38014:768bd75835d7
packaging: move most packaging targets to own Makefile
Since we're putting everything packaging under one roof, let's
define the make targets related to packaging there as well.
I didn't move the "osx" target because it is non-trivial.
Some targets did change slightly as part of the move. But it
was mostly around path normalization.
Differential Revision: https://phab.mercurial-scm.org/D3552
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 12 May 2018 18:05:50 -0700 |
parents | Makefile@e5d2248dcc39 |
children | c8ef9d897e14 |
comparison
equal
deleted
inserted
replaced
38013:917f635b5c6a | 38014:768bd75835d7 |
---|---|
1 $(eval HGROOT := $(shell cd ../..; pwd)) | |
2 | |
3 help: | |
4 @echo 'Packaging Make Targets' | |
5 @echo '' | |
6 @echo 'docker-centos-{5, 6, 7}' | |
7 @echo ' Build an RPM for a specific CentOS version using Docker.' | |
8 @echo '' | |
9 @echo 'docker-debian-{jessie, stretch}' | |
10 @echo ' Build Debian packages specific to a Debian distro using Docker.' | |
11 @echo '' | |
12 @echo 'docker-fedora-{20, 21}' | |
13 @echo ' Build an RPM for a specific Fedora version using Docker.' | |
14 @echo '' | |
15 @echo 'docker-ubuntu-{trusty, xenial, artful, bionic}' | |
16 @echo ' Build Debian package specific to an Ubuntu distro using Docker.' | |
17 @echo '' | |
18 @echo 'docker-ubuntu-{trusty, xenial, artful, bionic}-ppa' | |
19 @echo ' Build a source-only Debian package specific to an Ubuntu distro' | |
20 @echo ' using Docker.' | |
21 @echo '' | |
22 @echo 'linux-wheels' | |
23 @echo ' Build Linux manylinux wheels using Docker.' | |
24 @echo '' | |
25 @echo 'linux-wheels-{x86_64, i686}' | |
26 @echo ' Build Linux manylinux wheels for a specific architecture using Docker' | |
27 @echo '' | |
28 @echo 'deb' | |
29 @echo ' Build a Debian package locally targeting the current system' | |
30 @echo '' | |
31 @echo 'ppa' | |
32 @echo ' Build a Debian source package locally targeting the current system' | |
33 @echo '' | |
34 @echo 'centos-{5, 6, 7}' | |
35 @echo ' Build an RPM for a specific CentOS version locally' | |
36 @echo '' | |
37 @echo 'fedora-{20, 21}' | |
38 @echo ' Build an RPM for a specific Fedora version locally' | |
39 | |
40 .PHONY: help | |
41 | |
42 .PHONY: deb | |
43 deb: | |
44 ./builddeb | |
45 | |
46 .PHONY: ppa | |
47 ppa: | |
48 ./builddeb --source-only | |
49 | |
50 docker/debian-%: docker/debian.template | |
51 sed "s/__CODENAME__/$*/" $< > $@ | |
52 | |
53 .PHONY: docker-debian-jessie | |
54 docker-debian-jessie: docker/debian-jessie | |
55 ./dockerdeb debian jessie | |
56 | |
57 .PHONY: docker-debian-stretch | |
58 docker-debian-stretch: docker/debian-stretch | |
59 ./dockerdeb debian stretch | |
60 | |
61 docker/ubuntu-%: docker/ubuntu.template | |
62 sed "s/__CODENAME__/$*/" $< > $@ | |
63 | |
64 .PHONY: docker-ubuntu-trusty | |
65 docker-ubuntu-trusty: docker/ubuntu-trusty | |
66 ./dockerdeb ubuntu trusty | |
67 | |
68 .PHONY: docker-ubuntu-trusty-ppa | |
69 docker-ubuntu-trusty-ppa: docker/ubuntu-trusty | |
70 ./dockerdeb ubuntu trusty --source-only | |
71 | |
72 .PHONY: docker-ubuntu-xenial | |
73 docker-ubuntu-xenial: docker/ubuntu-xenial | |
74 ./dockerdeb ubuntu xenial | |
75 | |
76 .PHONY: docker-ubuntu-xenial-ppa | |
77 docker-ubuntu-xenial-ppa: docker/ubuntu-xenial | |
78 ./dockerdeb ubuntu xenial --source-only | |
79 | |
80 .PHONY: docker-ubuntu-artful | |
81 docker-ubuntu-artful: docker/ubuntu-artful | |
82 ./dockerdeb ubuntu artful | |
83 | |
84 .PHONY: docker-ubuntu-artful-ppa | |
85 docker-ubuntu-artful-ppa: docker/ubuntu-artful | |
86 ./dockerdeb ubuntu artful --source-only | |
87 | |
88 .PHONY: docker-ubuntu-bionic | |
89 docker-ubuntu-bionic: docker/ubuntu-bionic | |
90 ./dockerdeb ubuntu bionic | |
91 | |
92 .PHONY: docker-ubuntu-bionic-ppa | |
93 docker-ubuntu-bionic-ppa: docker/ubuntu-bionic | |
94 ./dockerdeb ubuntu bionic --source-only | |
95 | |
96 .PHONY: fedora20 | |
97 fedora20: | |
98 mkdir -p $(HGROOT)/packages/fedora20 | |
99 ./buildrpm | |
100 cp $(HGROOT)/rpmbuild/RPMS/*/* $(HGROOT)/packages/fedora20 | |
101 cp $(HGROOT)/rpmbuild/SRPMS/* $(HGROOT)/packages/fedora20 | |
102 rm -rf $(HGROOT)/rpmbuild | |
103 | |
104 .PHONY: docker-fedora20 | |
105 docker-fedora20: | |
106 mkdir -p $(HGROOT)/packages/fedora20 | |
107 ./dockerrpm fedora20 | |
108 | |
109 .PHONY: fedora21 | |
110 fedora21: | |
111 mkdir -p $(HGROOT)/packages/fedora21 | |
112 ./buildrpm | |
113 cp $(HGROOT)/rpmbuild/RPMS/*/* $(HGROOT)/packages/fedora21 | |
114 cp $(HGROOT)/rpmbuild/SRPMS/* $(HGROOT)/packages/fedora21 | |
115 rm -rf $(HGROOT)/rpmbuild | |
116 | |
117 .PHONY: docker-fedora21 | |
118 docker-fedora21: | |
119 mkdir -p $(HGROOT)packages/fedora21 | |
120 ./dockerrpm fedora21 | |
121 | |
122 .PHONY: centos5 | |
123 centos5: | |
124 mkdir -p $(HGROOT)/packages/centos5 | |
125 ./buildrpm --withpython | |
126 cp $(HGROOT)/rpmbuild/RPMS/*/* $(HGROOT)/packages/centos5 | |
127 cp $(HGROOT)/rpmbuild/SRPMS/* $(HGROOT)/packages/centos5 | |
128 | |
129 .PHONY: docker-centos5 | |
130 docker-centos5: | |
131 mkdir -p $(HGROOT)/packages/centos5 | |
132 ./dockerrpm centos5 --withpython | |
133 | |
134 .PHONY: centos6 | |
135 centos6: | |
136 mkdir -p $(HGROOT)/packages/centos6 | |
137 ./buildrpm --withpython | |
138 cp $(HGROOT)/rpmbuild/RPMS/*/* $(HGROOT)/packages/centos6 | |
139 cp $(HGROOT)/rpmbuild/SRPMS/* $(HGROOT)/packages/centos6 | |
140 | |
141 .PHONY: docker-centos6 | |
142 docker-centos6: | |
143 mkdir -p $(HGROOT)/packages/centos6 | |
144 ./dockerrpm centos6 --withpython | |
145 | |
146 .PHONY: centos7 | |
147 centos7: | |
148 mkdir -p $(HGROOT)/packages/centos7 | |
149 ./buildrpm | |
150 cp $(HGROOT)/rpmbuild/RPMS/*/* $(HGROOT)/packages/centos7 | |
151 cp $(HGROOT)/rpmbuild/SRPMS/* $(HGROOT)/packages/centos7 | |
152 | |
153 .PHONY: docker-centos7 | |
154 docker-centos7: | |
155 mkdir -p $(HGROOT)/packages/centos7 | |
156 ./dockerrpm centos7 | |
157 | |
158 .PHONY: linux-wheels | |
159 linux-wheels: linux-wheels-x86_64 linux-wheels-i686 | |
160 | |
161 .PHONY: linux-wheels-x86_64 | |
162 linux-wheels-x86_64: | |
163 docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`/../..:/src quay.io/pypa/manylinux1_x86_64 /src/contrib/packaging/build-linux-wheels.sh | |
164 | |
165 .PHONY: linux-wheels-i686 | |
166 linux-wheels-i686: | |
167 docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`/../..:/src quay.io/pypa/manylinux1_i686 linux32 /src/contrib/packaging/build-linux-wheels.sh |