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