##// END OF EJS Templates
packaging: remove centos5 and centos6 support...
Mathias De Mare -
r46439:f38d592f default
parent child Browse files
Show More
@@ -1,272 +1,268
1 # If you want to change PREFIX, do not just edit it below. The changed
1 # If you want to change PREFIX, do not just edit it below. The changed
2 # value wont get passed on to recursive make calls. You should instead
2 # value wont get passed on to recursive make calls. You should instead
3 # override the variable on the command like:
3 # override the variable on the command like:
4 #
4 #
5 # % make PREFIX=/opt/ install
5 # % make PREFIX=/opt/ install
6
6
7 export PREFIX=/usr/local
7 export PREFIX=/usr/local
8
8
9 # Default to Python 3.
9 # Default to Python 3.
10 #
10 #
11 # Windows ships Python 3 as `python.exe`.
11 # Windows ships Python 3 as `python.exe`.
12 ifeq ($(OS),Windows_NT)
12 ifeq ($(OS),Windows_NT)
13 PYTHON?=python
13 PYTHON?=python
14 else
14 else
15 PYTHON?=python3
15 PYTHON?=python3
16 endif
16 endif
17
17
18 PYOXIDIZER?=pyoxidizer
18 PYOXIDIZER?=pyoxidizer
19
19
20 $(eval HGROOT := $(shell pwd))
20 $(eval HGROOT := $(shell pwd))
21 HGPYTHONS ?= $(HGROOT)/build/pythons
21 HGPYTHONS ?= $(HGROOT)/build/pythons
22 PURE=
22 PURE=
23 PYFILESCMD=find mercurial hgext doc -name '*.py'
23 PYFILESCMD=find mercurial hgext doc -name '*.py'
24 PYFILES:=$(shell $(PYFILESCMD))
24 PYFILES:=$(shell $(PYFILESCMD))
25 DOCFILES=mercurial/helptext/*.txt
25 DOCFILES=mercurial/helptext/*.txt
26 export LANGUAGE=C
26 export LANGUAGE=C
27 export LC_ALL=C
27 export LC_ALL=C
28 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
28 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
29 OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
29 OSXVERSIONFLAGS ?= $(shell echo $$OSXVERSIONFLAGS)
30 CARGO = cargo
30 CARGO = cargo
31
31
32 # Set this to e.g. "mingw32" to use a non-default compiler.
32 # Set this to e.g. "mingw32" to use a non-default compiler.
33 COMPILER=
33 COMPILER=
34
34
35 COMPILERFLAG_tmp_ =
35 COMPILERFLAG_tmp_ =
36 COMPILERFLAG_tmp_${COMPILER} ?= -c $(COMPILER)
36 COMPILERFLAG_tmp_${COMPILER} ?= -c $(COMPILER)
37 COMPILERFLAG=${COMPILERFLAG_tmp_${COMPILER}}
37 COMPILERFLAG=${COMPILERFLAG_tmp_${COMPILER}}
38
38
39 help:
39 help:
40 @echo 'Commonly used make targets:'
40 @echo 'Commonly used make targets:'
41 @echo ' all - build program and documentation'
41 @echo ' all - build program and documentation'
42 @echo ' install - install program and man pages to $$PREFIX ($(PREFIX))'
42 @echo ' install - install program and man pages to $$PREFIX ($(PREFIX))'
43 @echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))'
43 @echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))'
44 @echo ' local - build for inplace usage'
44 @echo ' local - build for inplace usage'
45 @echo ' tests - run all tests in the automatic test suite'
45 @echo ' tests - run all tests in the automatic test suite'
46 @echo ' test-foo - run only specified tests (e.g. test-merge1.t)'
46 @echo ' test-foo - run only specified tests (e.g. test-merge1.t)'
47 @echo ' dist - run all tests and create a source tarball in dist/'
47 @echo ' dist - run all tests and create a source tarball in dist/'
48 @echo ' clean - remove files created by other targets'
48 @echo ' clean - remove files created by other targets'
49 @echo ' (except installed files or dist source tarball)'
49 @echo ' (except installed files or dist source tarball)'
50 @echo ' update-pot - update i18n/hg.pot'
50 @echo ' update-pot - update i18n/hg.pot'
51 @echo
51 @echo
52 @echo 'Example for a system-wide installation under /usr/local:'
52 @echo 'Example for a system-wide installation under /usr/local:'
53 @echo ' make all && su -c "make install" && hg version'
53 @echo ' make all && su -c "make install" && hg version'
54 @echo
54 @echo
55 @echo 'Example for a local installation (usable in this directory):'
55 @echo 'Example for a local installation (usable in this directory):'
56 @echo ' make local && ./hg version'
56 @echo ' make local && ./hg version'
57
57
58 all: build doc
58 all: build doc
59
59
60 local:
60 local:
61 $(PYTHON) setup.py $(PURE) \
61 $(PYTHON) setup.py $(PURE) \
62 build_py -c -d . \
62 build_py -c -d . \
63 build_ext $(COMPILERFLAG) -i \
63 build_ext $(COMPILERFLAG) -i \
64 build_hgexe $(COMPILERFLAG) -i \
64 build_hgexe $(COMPILERFLAG) -i \
65 build_mo
65 build_mo
66 env HGRCPATH= $(PYTHON) hg version
66 env HGRCPATH= $(PYTHON) hg version
67
67
68 build:
68 build:
69 $(PYTHON) setup.py $(PURE) build $(COMPILERFLAG)
69 $(PYTHON) setup.py $(PURE) build $(COMPILERFLAG)
70
70
71 wheel:
71 wheel:
72 FORCE_SETUPTOOLS=1 $(PYTHON) setup.py $(PURE) bdist_wheel $(COMPILERFLAG)
72 FORCE_SETUPTOOLS=1 $(PYTHON) setup.py $(PURE) bdist_wheel $(COMPILERFLAG)
73
73
74 doc:
74 doc:
75 $(MAKE) -C doc
75 $(MAKE) -C doc
76
76
77 cleanbutpackages:
77 cleanbutpackages:
78 rm -f hg.exe
78 rm -f hg.exe
79 -$(PYTHON) setup.py clean --all # ignore errors from this command
79 -$(PYTHON) setup.py clean --all # ignore errors from this command
80 find contrib doc hgext hgext3rd i18n mercurial tests hgdemandimport \
80 find contrib doc hgext hgext3rd i18n mercurial tests hgdemandimport \
81 \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
81 \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
82 rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
82 rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
83 rm -f mercurial/__modulepolicy__.py
83 rm -f mercurial/__modulepolicy__.py
84 if test -d .hg; then rm -f mercurial/__version__.py; fi
84 if test -d .hg; then rm -f mercurial/__version__.py; fi
85 rm -rf build mercurial/locale
85 rm -rf build mercurial/locale
86 $(MAKE) -C doc clean
86 $(MAKE) -C doc clean
87 $(MAKE) -C contrib/chg distclean
87 $(MAKE) -C contrib/chg distclean
88 rm -rf rust/target
88 rm -rf rust/target
89 rm -f mercurial/rustext.so
89 rm -f mercurial/rustext.so
90
90
91 clean: cleanbutpackages
91 clean: cleanbutpackages
92 rm -rf packages
92 rm -rf packages
93
93
94 install: install-bin install-doc
94 install: install-bin install-doc
95
95
96 install-bin: build
96 install-bin: build
97 $(PYTHON) setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --force
97 $(PYTHON) setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --force
98
98
99 install-doc: doc
99 install-doc: doc
100 cd doc && $(MAKE) $(MFLAGS) install
100 cd doc && $(MAKE) $(MFLAGS) install
101
101
102 install-home: install-home-bin install-home-doc
102 install-home: install-home-bin install-home-doc
103
103
104 install-home-bin: build
104 install-home-bin: build
105 $(PYTHON) setup.py $(PURE) install --home="$(HOME)" --prefix="" --force
105 $(PYTHON) setup.py $(PURE) install --home="$(HOME)" --prefix="" --force
106
106
107 install-home-doc: doc
107 install-home-doc: doc
108 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
108 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
109
109
110 MANIFEST-doc:
110 MANIFEST-doc:
111 $(MAKE) -C doc MANIFEST
111 $(MAKE) -C doc MANIFEST
112
112
113 MANIFEST.in: MANIFEST-doc
113 MANIFEST.in: MANIFEST-doc
114 hg manifest | sed -e 's/^/include /' > MANIFEST.in
114 hg manifest | sed -e 's/^/include /' > MANIFEST.in
115 echo include mercurial/__version__.py >> MANIFEST.in
115 echo include mercurial/__version__.py >> MANIFEST.in
116 sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in
116 sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in
117
117
118 dist: tests dist-notests
118 dist: tests dist-notests
119
119
120 dist-notests: doc MANIFEST.in
120 dist-notests: doc MANIFEST.in
121 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
121 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
122
122
123 check: tests
123 check: tests
124
124
125 tests:
125 tests:
126 # Run Rust tests if cargo is installed
126 # Run Rust tests if cargo is installed
127 if command -v $(CARGO) >/dev/null 2>&1; then \
127 if command -v $(CARGO) >/dev/null 2>&1; then \
128 $(MAKE) rust-tests; \
128 $(MAKE) rust-tests; \
129 fi
129 fi
130 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
130 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
131
131
132 test-%:
132 test-%:
133 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
133 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
134
134
135 testpy-%:
135 testpy-%:
136 @echo Looking for Python $* in $(HGPYTHONS)
136 @echo Looking for Python $* in $(HGPYTHONS)
137 [ -e $(HGPYTHONS)/$*/bin/python ] || ( \
137 [ -e $(HGPYTHONS)/$*/bin/python ] || ( \
138 cd $$(mktemp --directory --tmpdir) && \
138 cd $$(mktemp --directory --tmpdir) && \
139 $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python )
139 $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python )
140 cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS)
140 cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS)
141
141
142 rust-tests: py_feature = $(shell $(PYTHON) -c \
142 rust-tests: py_feature = $(shell $(PYTHON) -c \
143 'import sys; print(["python27-bin", "python3-bin"][sys.version_info[0] >= 3])')
143 'import sys; print(["python27-bin", "python3-bin"][sys.version_info[0] >= 3])')
144 rust-tests:
144 rust-tests:
145 cd $(HGROOT)/rust/hg-cpython \
145 cd $(HGROOT)/rust/hg-cpython \
146 && $(CARGO) test --quiet --all \
146 && $(CARGO) test --quiet --all \
147 --no-default-features --features "$(py_feature) $(HG_RUST_FEATURES)"
147 --no-default-features --features "$(py_feature) $(HG_RUST_FEATURES)"
148
148
149 check-code:
149 check-code:
150 hg manifest | xargs python contrib/check-code.py
150 hg manifest | xargs python contrib/check-code.py
151
151
152 format-c:
152 format-c:
153 clang-format --style file -i \
153 clang-format --style file -i \
154 `hg files 'set:(**.c or **.cc or **.h) and not "listfile:contrib/clang-format-ignorelist"'`
154 `hg files 'set:(**.c or **.cc or **.h) and not "listfile:contrib/clang-format-ignorelist"'`
155
155
156 update-pot: i18n/hg.pot
156 update-pot: i18n/hg.pot
157
157
158 i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext
158 i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext
159 $(PYTHON) i18n/hggettext mercurial/commands.py \
159 $(PYTHON) i18n/hggettext mercurial/commands.py \
160 hgext/*.py hgext/*/__init__.py \
160 hgext/*.py hgext/*/__init__.py \
161 mercurial/fileset.py mercurial/revset.py \
161 mercurial/fileset.py mercurial/revset.py \
162 mercurial/templatefilters.py \
162 mercurial/templatefilters.py \
163 mercurial/templatefuncs.py \
163 mercurial/templatefuncs.py \
164 mercurial/templatekw.py \
164 mercurial/templatekw.py \
165 mercurial/filemerge.py \
165 mercurial/filemerge.py \
166 mercurial/hgweb/webcommands.py \
166 mercurial/hgweb/webcommands.py \
167 mercurial/util.py \
167 mercurial/util.py \
168 $(DOCFILES) > i18n/hg.pot.tmp
168 $(DOCFILES) > i18n/hg.pot.tmp
169 # All strings marked for translation in Mercurial contain
169 # All strings marked for translation in Mercurial contain
170 # ASCII characters only. But some files contain string
170 # ASCII characters only. But some files contain string
171 # literals like this '\037\213'. xgettext thinks it has to
171 # literals like this '\037\213'. xgettext thinks it has to
172 # parse them even though they are not marked for translation.
172 # parse them even though they are not marked for translation.
173 # Extracting with an explicit encoding of ISO-8859-1 will make
173 # Extracting with an explicit encoding of ISO-8859-1 will make
174 # xgettext "parse" and ignore them.
174 # xgettext "parse" and ignore them.
175 $(PYFILESCMD) | xargs \
175 $(PYFILESCMD) | xargs \
176 xgettext --package-name "Mercurial" \
176 xgettext --package-name "Mercurial" \
177 --msgid-bugs-address "<mercurial-devel@mercurial-scm.org>" \
177 --msgid-bugs-address "<mercurial-devel@mercurial-scm.org>" \
178 --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \
178 --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \
179 --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
179 --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
180 -d hg -p i18n -o hg.pot.tmp
180 -d hg -p i18n -o hg.pot.tmp
181 $(PYTHON) i18n/posplit i18n/hg.pot.tmp
181 $(PYTHON) i18n/posplit i18n/hg.pot.tmp
182 # The target file is not created before the last step. So it never is in
182 # The target file is not created before the last step. So it never is in
183 # an intermediate state.
183 # an intermediate state.
184 mv -f i18n/hg.pot.tmp i18n/hg.pot
184 mv -f i18n/hg.pot.tmp i18n/hg.pot
185
185
186 %.po: i18n/hg.pot
186 %.po: i18n/hg.pot
187 # work on a temporary copy for never having a half completed target
187 # work on a temporary copy for never having a half completed target
188 cp $@ $@.tmp
188 cp $@ $@.tmp
189 msgmerge --no-location --update $@.tmp $^
189 msgmerge --no-location --update $@.tmp $^
190 mv -f $@.tmp $@
190 mv -f $@.tmp $@
191
191
192 # Packaging targets
192 # Packaging targets
193
193
194 packaging_targets := \
194 packaging_targets := \
195 centos5 \
196 centos6 \
197 centos7 \
195 centos7 \
198 centos8 \
196 centos8 \
199 deb \
197 deb \
200 docker-centos5 \
201 docker-centos6 \
202 docker-centos7 \
198 docker-centos7 \
203 docker-centos8 \
199 docker-centos8 \
204 docker-debian-bullseye \
200 docker-debian-bullseye \
205 docker-debian-buster \
201 docker-debian-buster \
206 docker-debian-stretch \
202 docker-debian-stretch \
207 docker-fedora \
203 docker-fedora \
208 docker-ubuntu-trusty \
204 docker-ubuntu-trusty \
209 docker-ubuntu-trusty-ppa \
205 docker-ubuntu-trusty-ppa \
210 docker-ubuntu-xenial \
206 docker-ubuntu-xenial \
211 docker-ubuntu-xenial-ppa \
207 docker-ubuntu-xenial-ppa \
212 docker-ubuntu-artful \
208 docker-ubuntu-artful \
213 docker-ubuntu-artful-ppa \
209 docker-ubuntu-artful-ppa \
214 docker-ubuntu-bionic \
210 docker-ubuntu-bionic \
215 docker-ubuntu-bionic-ppa \
211 docker-ubuntu-bionic-ppa \
216 fedora \
212 fedora \
217 linux-wheels \
213 linux-wheels \
218 linux-wheels-x86_64 \
214 linux-wheels-x86_64 \
219 linux-wheels-i686 \
215 linux-wheels-i686 \
220 ppa
216 ppa
221
217
222 # Forward packaging targets for convenience.
218 # Forward packaging targets for convenience.
223 $(packaging_targets):
219 $(packaging_targets):
224 $(MAKE) -C contrib/packaging $@
220 $(MAKE) -C contrib/packaging $@
225
221
226 osx:
222 osx:
227 rm -rf build/mercurial
223 rm -rf build/mercurial
228 /usr/bin/python2.7 setup.py install --optimize=1 \
224 /usr/bin/python2.7 setup.py install --optimize=1 \
229 --root=build/mercurial/ --prefix=/usr/local/ \
225 --root=build/mercurial/ --prefix=/usr/local/ \
230 --install-lib=/Library/Python/2.7/site-packages/
226 --install-lib=/Library/Python/2.7/site-packages/
231 make -C doc all install DESTDIR="$(PWD)/build/mercurial/"
227 make -C doc all install DESTDIR="$(PWD)/build/mercurial/"
232 # Place a bogon .DS_Store file in the target dir so we can be
228 # Place a bogon .DS_Store file in the target dir so we can be
233 # sure it doesn't get included in the final package.
229 # sure it doesn't get included in the final package.
234 touch build/mercurial/.DS_Store
230 touch build/mercurial/.DS_Store
235 # install zsh completions - this location appears to be
231 # install zsh completions - this location appears to be
236 # searched by default as of macOS Sierra.
232 # searched by default as of macOS Sierra.
237 install -d build/mercurial/usr/local/share/zsh/site-functions/
233 install -d build/mercurial/usr/local/share/zsh/site-functions/
238 install -m 0644 contrib/zsh_completion build/mercurial/usr/local/share/zsh/site-functions/_hg
234 install -m 0644 contrib/zsh_completion build/mercurial/usr/local/share/zsh/site-functions/_hg
239 # install bash completions - there doesn't appear to be a
235 # install bash completions - there doesn't appear to be a
240 # place that's searched by default for bash, so we'll follow
236 # place that's searched by default for bash, so we'll follow
241 # the lead of Apple's git install and just put it in a
237 # the lead of Apple's git install and just put it in a
242 # location of our own.
238 # location of our own.
243 install -d build/mercurial/usr/local/hg/contrib/
239 install -d build/mercurial/usr/local/hg/contrib/
244 install -m 0644 contrib/bash_completion build/mercurial/usr/local/hg/contrib/hg-completion.bash
240 install -m 0644 contrib/bash_completion build/mercurial/usr/local/hg/contrib/hg-completion.bash
245 make -C contrib/chg \
241 make -C contrib/chg \
246 HGPATH=/usr/local/bin/hg \
242 HGPATH=/usr/local/bin/hg \
247 PYTHON=/usr/bin/python2.7 \
243 PYTHON=/usr/bin/python2.7 \
248 DESTDIR=../../build/mercurial \
244 DESTDIR=../../build/mercurial \
249 PREFIX=/usr/local \
245 PREFIX=/usr/local \
250 clean install
246 clean install
251 mkdir -p $${OUTPUTDIR:-dist}
247 mkdir -p $${OUTPUTDIR:-dist}
252 HGVER=$$(python contrib/genosxversion.py $(OSXVERSIONFLAGS) build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py) && \
248 HGVER=$$(python contrib/genosxversion.py $(OSXVERSIONFLAGS) build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py) && \
253 OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
249 OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
254 pkgbuild --filter \\.DS_Store --root build/mercurial/ \
250 pkgbuild --filter \\.DS_Store --root build/mercurial/ \
255 --identifier org.mercurial-scm.mercurial \
251 --identifier org.mercurial-scm.mercurial \
256 --version "$${HGVER}" \
252 --version "$${HGVER}" \
257 build/mercurial.pkg && \
253 build/mercurial.pkg && \
258 productbuild --distribution contrib/packaging/macosx/distribution.xml \
254 productbuild --distribution contrib/packaging/macosx/distribution.xml \
259 --package-path build/ \
255 --package-path build/ \
260 --version "$${HGVER}" \
256 --version "$${HGVER}" \
261 --resources contrib/packaging/macosx/ \
257 --resources contrib/packaging/macosx/ \
262 "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg
258 "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg
263
259
264 pyoxidizer:
260 pyoxidizer:
265 $(PYOXIDIZER) build --path ./rust/hgcli --release
261 $(PYOXIDIZER) build --path ./rust/hgcli --release
266
262
267 .PHONY: help all local build doc cleanbutpackages clean install install-bin \
263 .PHONY: help all local build doc cleanbutpackages clean install install-bin \
268 install-doc install-home install-home-bin install-home-doc \
264 install-doc install-home install-home-bin install-home-doc \
269 dist dist-notests check tests rust-tests check-code format-c \
265 dist dist-notests check tests rust-tests check-code format-c \
270 update-pot pyoxidizer \
266 update-pot pyoxidizer \
271 $(packaging_targets) \
267 $(packaging_targets) \
272 osx
268 osx
@@ -1,136 +1,134
1 $(eval HGROOT := $(shell cd ../..; pwd))
1 $(eval HGROOT := $(shell cd ../..; pwd))
2
2
3 DEBIAN_CODENAMES := \
3 DEBIAN_CODENAMES := \
4 stretch \
4 stretch \
5 buster \
5 buster \
6 bullseye
6 bullseye
7
7
8 UBUNTU_CODENAMES := \
8 UBUNTU_CODENAMES := \
9 xenial \
9 xenial \
10 bionic \
10 bionic \
11 cosmic \
11 cosmic \
12 disco
12 disco
13
13
14 FEDORA_RELEASE := 31
14 FEDORA_RELEASE := 31
15
15
16 CENTOS_RELEASES := \
16 CENTOS_RELEASES := \
17 5 \
18 6 \
19 7 \
17 7 \
20 8
18 8
21
19
22 # Build a Python for these CentOS releases.
20 # Build a Python for these CentOS releases.
23 CENTOS_WITH_PYTHON_RELEASES := 5 6
21 CENTOS_WITH_PYTHON_RELEASES :=
24 CENTOS_WITH_NONVERSIONED_PYTHON := 5 6 7
22 CENTOS_WITH_NONVERSIONED_PYTHON :=
25
23
26 help:
24 help:
27 @echo 'Packaging Make Targets'
25 @echo 'Packaging Make Targets'
28 @echo ''
26 @echo ''
29 @echo 'docker-centos{$(strip $(CENTOS_RELEASES))}'
27 @echo 'docker-centos{$(strip $(CENTOS_RELEASES))}'
30 @echo ' Build an RPM for a specific CentOS version using Docker.'
28 @echo ' Build an RPM for a specific CentOS version using Docker.'
31 @echo ''
29 @echo ''
32 @echo 'docker-debian-{$(strip $(DEBIAN_CODENAMES))}'
30 @echo 'docker-debian-{$(strip $(DEBIAN_CODENAMES))}'
33 @echo ' Build Debian packages specific to a Debian distro using Docker.'
31 @echo ' Build Debian packages specific to a Debian distro using Docker.'
34 @echo ''
32 @echo ''
35 @echo 'docker-fedora'
33 @echo 'docker-fedora'
36 @echo ' Build an RPM for a Fedora $(FEDORA_RELEASE) using Docker.'
34 @echo ' Build an RPM for a Fedora $(FEDORA_RELEASE) using Docker.'
37 @echo ''
35 @echo ''
38 @echo 'docker-ubuntu-{$(strip $(UBUNTU_CODENAMES))}'
36 @echo 'docker-ubuntu-{$(strip $(UBUNTU_CODENAMES))}'
39 @echo ' Build Debian package specific to an Ubuntu distro using Docker.'
37 @echo ' Build Debian package specific to an Ubuntu distro using Docker.'
40 @echo ''
38 @echo ''
41 @echo 'docker-ubuntu-{$(strip $(UBUNTU_CODENAMES))}-ppa'
39 @echo 'docker-ubuntu-{$(strip $(UBUNTU_CODENAMES))}-ppa'
42 @echo ' Build a source-only Debian package specific to an Ubuntu distro'
40 @echo ' Build a source-only Debian package specific to an Ubuntu distro'
43 @echo ' using Docker.'
41 @echo ' using Docker.'
44 @echo ''
42 @echo ''
45 @echo 'linux-wheels'
43 @echo 'linux-wheels'
46 @echo ' Build Linux manylinux wheels using Docker.'
44 @echo ' Build Linux manylinux wheels using Docker.'
47 @echo ''
45 @echo ''
48 @echo 'linux-wheels-{x86_64, i686}'
46 @echo 'linux-wheels-{x86_64, i686}'
49 @echo ' Build Linux manylinux wheels for a specific architecture using Docker'
47 @echo ' Build Linux manylinux wheels for a specific architecture using Docker'
50 @echo ''
48 @echo ''
51 @echo 'deb'
49 @echo 'deb'
52 @echo ' Build a Debian package locally targeting the current system'
50 @echo ' Build a Debian package locally targeting the current system'
53 @echo ''
51 @echo ''
54 @echo 'ppa'
52 @echo 'ppa'
55 @echo ' Build a Debian source package locally targeting the current system'
53 @echo ' Build a Debian source package locally targeting the current system'
56 @echo ''
54 @echo ''
57 @echo 'centos{$(strip $(CENTOS_RELEASES))}'
55 @echo 'centos{$(strip $(CENTOS_RELEASES))}'
58 @echo ' Build an RPM for a specific CentOS version locally'
56 @echo ' Build an RPM for a specific CentOS version locally'
59 @echo ''
57 @echo ''
60 @echo 'fedora'
58 @echo 'fedora'
61 @echo ' Build an RPM for Fedora $(FEDORA_RELEASE) locally'
59 @echo ' Build an RPM for Fedora $(FEDORA_RELEASE) locally'
62
60
63 .PHONY: help
61 .PHONY: help
64
62
65 .PHONY: deb
63 .PHONY: deb
66 deb:
64 deb:
67 ./builddeb
65 ./builddeb
68
66
69 .PHONY: ppa
67 .PHONY: ppa
70 ppa:
68 ppa:
71 ./builddeb --source-only
69 ./builddeb --source-only
72
70
73 # Debian targets.
71 # Debian targets.
74 define debian_targets =
72 define debian_targets =
75 .PHONY: docker-debian-$(1)
73 .PHONY: docker-debian-$(1)
76 docker-debian-$(1):
74 docker-debian-$(1):
77 ./dockerdeb debian $(1)
75 ./dockerdeb debian $(1)
78
76
79 endef
77 endef
80
78
81 $(foreach codename,$(DEBIAN_CODENAMES),$(eval $(call debian_targets,$(codename))))
79 $(foreach codename,$(DEBIAN_CODENAMES),$(eval $(call debian_targets,$(codename))))
82
80
83 # Ubuntu targets.
81 # Ubuntu targets.
84 define ubuntu_targets =
82 define ubuntu_targets =
85 .PHONY: docker-ubuntu-$(1)
83 .PHONY: docker-ubuntu-$(1)
86 docker-ubuntu-$(1):
84 docker-ubuntu-$(1):
87 ./dockerdeb ubuntu $(1)
85 ./dockerdeb ubuntu $(1)
88
86
89 .PHONY: docker-ubuntu-$(1)-ppa
87 .PHONY: docker-ubuntu-$(1)-ppa
90 docker-ubuntu-$(1)-ppa:
88 docker-ubuntu-$(1)-ppa:
91 ./dockerdeb ubuntu $(1) --source-only
89 ./dockerdeb ubuntu $(1) --source-only
92
90
93 endef
91 endef
94
92
95 $(foreach codename,$(UBUNTU_CODENAMES),$(eval $(call ubuntu_targets,$(codename))))
93 $(foreach codename,$(UBUNTU_CODENAMES),$(eval $(call ubuntu_targets,$(codename))))
96
94
97 # Fedora targets.
95 # Fedora targets.
98 .PHONY: fedora
96 .PHONY: fedora
99 fedora:
97 fedora:
100 mkdir -p $(HGROOT)/packages/fedora$(FEDORA_RELEASE)
98 mkdir -p $(HGROOT)/packages/fedora$(FEDORA_RELEASE)
101 ./buildrpm
99 ./buildrpm
102 cp $(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $(HGROOT)/packages/fedora$(FEDORA_RELEASE)
100 cp $(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $(HGROOT)/packages/fedora$(FEDORA_RELEASE)
103 cp $(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $(HGROOT)/packages/fedora$(FEDORA_RELEASE)
101 cp $(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $(HGROOT)/packages/fedora$(FEDORA_RELEASE)
104 rm -rf $(HGROOT)/rpmbuild
102 rm -rf $(HGROOT)/rpmbuild
105
103
106 .PHONY: docker-fedora
104 .PHONY: docker-fedora
107 docker-fedora:
105 docker-fedora:
108 ./dockerrpm fedora$(FEDORA_RELEASE)
106 ./dockerrpm fedora$(FEDORA_RELEASE)
109
107
110 # CentOS targets.
108 # CentOS targets.
111 define centos_targets
109 define centos_targets
112 .PHONY: centos$(1)
110 .PHONY: centos$(1)
113 centos$(1):
111 centos$(1):
114 mkdir -p $$(HGROOT)/packages/centos$(1)
112 mkdir -p $$(HGROOT)/packages/centos$(1)
115 ./buildrpm $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(CENTOS_WITH_NONVERSIONED_PYTHON)),--python python,))
113 ./buildrpm $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(CENTOS_WITH_NONVERSIONED_PYTHON)),--python python,))
116 cp $$(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $$(HGROOT)/packages/centos$(1)
114 cp $$(HGROOT)/contrib/packaging/rpmbuild/RPMS/*/* $$(HGROOT)/packages/centos$(1)
117 cp $$(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $$(HGROOT)/packages/centos$(1)
115 cp $$(HGROOT)/contrib/packaging/rpmbuild/SRPMS/* $$(HGROOT)/packages/centos$(1)
118
116
119 .PHONY: docker-centos$(1)
117 .PHONY: docker-centos$(1)
120 docker-centos$(1):
118 docker-centos$(1):
121 ./dockerrpm centos$(1) $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(CENTOS_WITH_NONVERSIONED_PYTHON)),--python python,))
119 ./dockerrpm centos$(1) $$(if $$(filter $(1),$$(CENTOS_WITH_PYTHON_RELEASES)),--withpython,$$(if $$(filter $(1),$$(CENTOS_WITH_NONVERSIONED_PYTHON)),--python python,))
122
120
123 endef
121 endef
124
122
125 $(foreach release,$(CENTOS_RELEASES),$(eval $(call centos_targets,$(release))))
123 $(foreach release,$(CENTOS_RELEASES),$(eval $(call centos_targets,$(release))))
126
124
127 .PHONY: linux-wheels
125 .PHONY: linux-wheels
128 linux-wheels: linux-wheels-x86_64 linux-wheels-i686
126 linux-wheels: linux-wheels-x86_64 linux-wheels-i686
129
127
130 .PHONY: linux-wheels-x86_64
128 .PHONY: linux-wheels-x86_64
131 linux-wheels-x86_64:
129 linux-wheels-x86_64:
132 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
130 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
133
131
134 .PHONY: linux-wheels-i686
132 .PHONY: linux-wheels-i686
135 linux-wheels-i686:
133 linux-wheels-i686:
136 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
134 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
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now