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