Show More
@@ -1,143 +1,143 | |||||
1 | $(eval HGROOT := $(shell cd ../..; pwd)) |
|
1 | $(eval HGROOT := $(shell cd ../..; pwd)) | |
2 |
|
2 | |||
3 | DEBIAN_CODENAMES := \ |
|
3 | DEBIAN_CODENAMES := \ | |
4 | jessie \ |
|
4 | jessie \ | |
5 | stretch \ |
|
5 | stretch \ | |
6 | buster |
|
6 | buster | |
7 |
|
7 | |||
8 | UBUNTU_CODENAMES := \ |
|
8 | UBUNTU_CODENAMES := \ | |
9 | trusty \ |
|
9 | trusty \ | |
10 | xenial \ |
|
10 | xenial \ | |
11 | artful \ |
|
11 | artful \ | |
12 | bionic \ |
|
12 | bionic \ | |
13 |
|
13 | |||
14 | FEDORA_RELEASES := \ |
|
14 | FEDORA_RELEASES := \ | |
15 | 20 \ |
|
15 | 20 \ | |
16 | 21 |
|
16 | 21 | |
17 |
|
17 | |||
18 | CENTOS_RELEASES := \ |
|
18 | CENTOS_RELEASES := \ | |
19 | 5 \ |
|
19 | 5 \ | |
20 | 6 \ |
|
20 | 6 \ | |
21 | 7 |
|
21 | 7 | |
22 |
|
22 | |||
23 | # Build a Python for these CentOS releases. |
|
23 | # Build a Python for these CentOS releases. | |
24 | CENTOS_WITH_PYTHON_RELEASES := 5 6 |
|
24 | CENTOS_WITH_PYTHON_RELEASES := 5 6 | |
25 |
|
25 | |||
26 | help: |
|
26 | help: | |
27 | @echo 'Packaging Make Targets' |
|
27 | @echo 'Packaging Make Targets' | |
28 | @echo '' |
|
28 | @echo '' | |
29 | @echo 'docker-centos{$(strip $(CENTOS_RELEASES))}' |
|
29 | @echo 'docker-centos{$(strip $(CENTOS_RELEASES))}' | |
30 | @echo ' Build an RPM for a specific CentOS version using Docker.' |
|
30 | @echo ' Build an RPM for a specific CentOS version using Docker.' | |
31 | @echo '' |
|
31 | @echo '' | |
32 | @echo 'docker-debian-{$(strip $(DEBIAN_CODENAMES))}' |
|
32 | @echo 'docker-debian-{$(strip $(DEBIAN_CODENAMES))}' | |
33 | @echo ' Build Debian packages specific to a Debian distro using Docker.' |
|
33 | @echo ' Build Debian packages specific to a Debian distro using Docker.' | |
34 | @echo '' |
|
34 | @echo '' | |
35 | @echo 'docker-fedora{$(strip $(FEDORA_RELEASES))}' |
|
35 | @echo 'docker-fedora{$(strip $(FEDORA_RELEASES))}' | |
36 | @echo ' Build an RPM for a specific Fedora version using Docker.' |
|
36 | @echo ' Build an RPM for a specific Fedora version using Docker.' | |
37 | @echo '' |
|
37 | @echo '' | |
38 | @echo 'docker-ubuntu-{$(strip $(UBUNTU_CODENAMES))}' |
|
38 | @echo 'docker-ubuntu-{$(strip $(UBUNTU_CODENAMES))}' | |
39 | @echo ' Build Debian package specific to an Ubuntu distro using Docker.' |
|
39 | @echo ' Build Debian package specific to an Ubuntu distro using Docker.' | |
40 | @echo '' |
|
40 | @echo '' | |
41 | @echo 'docker-ubuntu-{$(strip $(UBUNTU_CODENAMES))}-ppa' |
|
41 | @echo 'docker-ubuntu-{$(strip $(UBUNTU_CODENAMES))}-ppa' | |
42 | @echo ' Build a source-only Debian package specific to an Ubuntu distro' |
|
42 | @echo ' Build a source-only Debian package specific to an Ubuntu distro' | |
43 | @echo ' using Docker.' |
|
43 | @echo ' using Docker.' | |
44 | @echo '' |
|
44 | @echo '' | |
45 | @echo 'linux-wheels' |
|
45 | @echo 'linux-wheels' | |
46 | @echo ' Build Linux manylinux wheels using Docker.' |
|
46 | @echo ' Build Linux manylinux wheels using Docker.' | |
47 | @echo '' |
|
47 | @echo '' | |
48 | @echo 'linux-wheels-{x86_64, i686}' |
|
48 | @echo 'linux-wheels-{x86_64, i686}' | |
49 | @echo ' Build Linux manylinux wheels for a specific architecture using Docker' |
|
49 | @echo ' Build Linux manylinux wheels for a specific architecture using Docker' | |
50 | @echo '' |
|
50 | @echo '' | |
51 | @echo 'deb' |
|
51 | @echo 'deb' | |
52 | @echo ' Build a Debian package locally targeting the current system' |
|
52 | @echo ' Build a Debian package locally targeting the current system' | |
53 | @echo '' |
|
53 | @echo '' | |
54 | @echo 'ppa' |
|
54 | @echo 'ppa' | |
55 | @echo ' Build a Debian source package locally targeting the current system' |
|
55 | @echo ' Build a Debian source package locally targeting the current system' | |
56 | @echo '' |
|
56 | @echo '' | |
57 | @echo 'centos{$(strip $(CENTOS_RELEASES))}' |
|
57 | @echo 'centos{$(strip $(CENTOS_RELEASES))}' | |
58 | @echo ' Build an RPM for a specific CentOS version locally' |
|
58 | @echo ' Build an RPM for a specific CentOS version locally' | |
59 | @echo '' |
|
59 | @echo '' | |
60 | @echo 'fedora{$(strip $(FEDORA_RELEASES))}' |
|
60 | @echo 'fedora{$(strip $(FEDORA_RELEASES))}' | |
61 | @echo ' Build an RPM for a specific Fedora version locally' |
|
61 | @echo ' Build an RPM for a specific Fedora version locally' | |
62 |
|
62 | |||
63 | .PHONY: help |
|
63 | .PHONY: help | |
64 |
|
64 | |||
65 | .PHONY: deb |
|
65 | .PHONY: deb | |
66 | deb: |
|
66 | deb: | |
67 | ./builddeb |
|
67 | ./builddeb | |
68 |
|
68 | |||
69 | .PHONY: ppa |
|
69 | .PHONY: ppa | |
70 | ppa: |
|
70 | ppa: | |
71 | ./builddeb --source-only |
|
71 | ./builddeb --source-only | |
72 |
|
72 | |||
73 | # Debian targets. |
|
73 | # Debian targets. | |
74 | define debian_targets = |
|
74 | define debian_targets = | |
75 | .PHONY: docker-debian-$(1) |
|
75 | .PHONY: docker-debian-$(1) | |
76 | docker-debian-$(1): |
|
76 | docker-debian-$(1): | |
77 | ./dockerdeb debian $(1) |
|
77 | ./dockerdeb debian $(1) | |
78 |
|
78 | |||
79 | endef |
|
79 | endef | |
80 |
|
80 | |||
81 | $(foreach codename,$(DEBIAN_CODENAMES),$(eval $(call debian_targets,$(codename)))) |
|
81 | $(foreach codename,$(DEBIAN_CODENAMES),$(eval $(call debian_targets,$(codename)))) | |
82 |
|
82 | |||
83 | # Ubuntu targets. |
|
83 | # Ubuntu targets. | |
84 | define ubuntu_targets = |
|
84 | define ubuntu_targets = | |
85 | .PHONY: docker-ubuntu-$(1) |
|
85 | .PHONY: docker-ubuntu-$(1) | |
86 | docker-ubuntu-$(1): |
|
86 | docker-ubuntu-$(1): | |
87 | ./dockerdeb ubuntu $(1) |
|
87 | ./dockerdeb ubuntu $(1) | |
88 |
|
88 | |||
89 | .PHONY: docker-ubuntu-$(1)-ppa |
|
89 | .PHONY: docker-ubuntu-$(1)-ppa | |
90 | docker-ubuntu-$(1)-ppa: |
|
90 | docker-ubuntu-$(1)-ppa: | |
91 | ./dockerdeb ubuntu $(1) --source-only |
|
91 | ./dockerdeb ubuntu $(1) --source-only | |
92 |
|
92 | |||
93 | endef |
|
93 | endef | |
94 |
|
94 | |||
95 | $(foreach codename,$(UBUNTU_CODENAMES),$(eval $(call ubuntu_targets,$(codename)))) |
|
95 | $(foreach codename,$(UBUNTU_CODENAMES),$(eval $(call ubuntu_targets,$(codename)))) | |
96 |
|
96 | |||
97 | # Fedora targets. |
|
97 | # Fedora targets. | |
98 | define fedora_targets |
|
98 | define fedora_targets | |
99 | .PHONY: fedora$(1) |
|
99 | .PHONY: fedora$(1) | |
100 | fedora$(1): |
|
100 | fedora$(1): | |
101 | mkdir -p $$(HGROOT)/packages/fedora$(1) |
|
101 | mkdir -p $$(HGROOT)/packages/fedora$(1) | |
102 | ./buildrpm |
|
102 | ./buildrpm | |
103 | cp $$(HGROOT)/rpmbuild/RPMS/*/* $$(HGROOT)/packages/fedora$(1) |
|
103 | cp $$(HGROOT)/rpmbuild/RPMS/*/* $$(HGROOT)/packages/fedora$(1) | |
104 | cp $$(HGROOT)/rpmbuild/SRPMS/* $$(HGROOT)/packages/fedora$(1) |
|
104 | cp $$(HGROOT)/rpmbuild/SRPMS/* $$(HGROOT)/packages/fedora$(1) | |
105 | rm -rf $(HGROOT)/rpmbuild |
|
105 | rm -rf $(HGROOT)/rpmbuild | |
106 |
|
106 | |||
107 | .PHONY: docker-fedora$(1) |
|
107 | .PHONY: docker-fedora$(1) | |
108 | docker-fedora$(1): |
|
108 | docker-fedora$(1): | |
109 |
mkdir -p $$(HGROOT)/packages/fedora |
|
109 | mkdir -p $$(HGROOT)/packages/fedora$(1) | |
110 | ./dockerrpm fedora$(1) |
|
110 | ./dockerrpm fedora$(1) | |
111 |
|
111 | |||
112 | endef |
|
112 | endef | |
113 |
|
113 | |||
114 | $(foreach release,$(FEDORA_RELEASES),$(eval $(call fedora_targets,$(release)))) |
|
114 | $(foreach release,$(FEDORA_RELEASES),$(eval $(call fedora_targets,$(release)))) | |
115 |
|
115 | |||
116 | # CentOS targets. |
|
116 | # CentOS targets. | |
117 | define centos_targets |
|
117 | define centos_targets | |
118 | .PHONY: centos$(1) |
|
118 | .PHONY: centos$(1) | |
119 | centos$(1): |
|
119 | centos$(1): | |
120 | mkdir -p $$(HGROOT)/packages/centos$(1) |
|
120 | mkdir -p $$(HGROOT)/packages/centos$(1) | |
121 | ./buildrpm $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython) |
|
121 | ./buildrpm $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython) | |
122 | cp $$(HGROOT)/rpmbuild/RPMS/*/* $$(HGROOT)/packages/centos$(1) |
|
122 | cp $$(HGROOT)/rpmbuild/RPMS/*/* $$(HGROOT)/packages/centos$(1) | |
123 | cp $$(HGROOT)/rpmbuild/SRPMS/* $$(HGROOT)/packages/centos$(1) |
|
123 | cp $$(HGROOT)/rpmbuild/SRPMS/* $$(HGROOT)/packages/centos$(1) | |
124 |
|
124 | |||
125 | .PHONY: docker-centos$(1) |
|
125 | .PHONY: docker-centos$(1) | |
126 | docker-centos$(1): |
|
126 | docker-centos$(1): | |
127 | mkdir -p $$(HGROOT)/packages/centos$(1) |
|
127 | mkdir -p $$(HGROOT)/packages/centos$(1) | |
128 | ./dockerrpm centos$(1) $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython) |
|
128 | ./dockerrpm centos$(1) $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython) | |
129 |
|
129 | |||
130 | endef |
|
130 | endef | |
131 |
|
131 | |||
132 | $(foreach release,$(CENTOS_RELEASES),$(eval $(call centos_targets,$(release)))) |
|
132 | $(foreach release,$(CENTOS_RELEASES),$(eval $(call centos_targets,$(release)))) | |
133 |
|
133 | |||
134 | .PHONY: linux-wheels |
|
134 | .PHONY: linux-wheels | |
135 | linux-wheels: linux-wheels-x86_64 linux-wheels-i686 |
|
135 | linux-wheels: linux-wheels-x86_64 linux-wheels-i686 | |
136 |
|
136 | |||
137 | .PHONY: linux-wheels-x86_64 |
|
137 | .PHONY: linux-wheels-x86_64 | |
138 | linux-wheels-x86_64: |
|
138 | linux-wheels-x86_64: | |
139 | 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 |
|
139 | 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 | |
140 |
|
140 | |||
141 | .PHONY: linux-wheels-i686 |
|
141 | .PHONY: linux-wheels-i686 | |
142 | linux-wheels-i686: |
|
142 | linux-wheels-i686: | |
143 | 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 |
|
143 | 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 |
General Comments 0
You need to be logged in to leave comments.
Login now