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