##// END OF EJS Templates
builddeb: rework how output dir and platform are specified...
Augie Fackler -
r26108:05306b93 default
parent child Browse files
Show More
@@ -1,226 +1,224 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 PREFIX=/usr/local
7 PREFIX=/usr/local
8 export PREFIX
8 export PREFIX
9 PYTHON=python
9 PYTHON=python
10 $(eval HGROOT := $(shell pwd))
10 $(eval HGROOT := $(shell pwd))
11 HGPYTHONS ?= $(HGROOT)/build/pythons
11 HGPYTHONS ?= $(HGROOT)/build/pythons
12 PURE=
12 PURE=
13 PYFILES:=$(shell find mercurial hgext doc -name '*.py')
13 PYFILES:=$(shell find mercurial hgext doc -name '*.py')
14 DOCFILES=mercurial/help/*.txt
14 DOCFILES=mercurial/help/*.txt
15 export LANGUAGE=C
15 export LANGUAGE=C
16 export LC_ALL=C
16 export LC_ALL=C
17 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
17 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
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 help:
22 help:
23 @echo 'Commonly used make targets:'
23 @echo 'Commonly used make targets:'
24 @echo ' all - build program and documentation'
24 @echo ' all - build program and documentation'
25 @echo ' install - install program and man pages to $$PREFIX ($(PREFIX))'
25 @echo ' install - install program and man pages to $$PREFIX ($(PREFIX))'
26 @echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))'
26 @echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))'
27 @echo ' local - build for inplace usage'
27 @echo ' local - build for inplace usage'
28 @echo ' tests - run all tests in the automatic test suite'
28 @echo ' tests - run all tests in the automatic test suite'
29 @echo ' test-foo - run only specified tests (e.g. test-merge1.t)'
29 @echo ' test-foo - run only specified tests (e.g. test-merge1.t)'
30 @echo ' dist - run all tests and create a source tarball in dist/'
30 @echo ' dist - run all tests and create a source tarball in dist/'
31 @echo ' clean - remove files created by other targets'
31 @echo ' clean - remove files created by other targets'
32 @echo ' (except installed files or dist source tarball)'
32 @echo ' (except installed files or dist source tarball)'
33 @echo ' update-pot - update i18n/hg.pot'
33 @echo ' update-pot - update i18n/hg.pot'
34 @echo
34 @echo
35 @echo 'Example for a system-wide installation under /usr/local:'
35 @echo 'Example for a system-wide installation under /usr/local:'
36 @echo ' make all && su -c "make install" && hg version'
36 @echo ' make all && su -c "make install" && hg version'
37 @echo
37 @echo
38 @echo 'Example for a local installation (usable in this directory):'
38 @echo 'Example for a local installation (usable in this directory):'
39 @echo ' make local && ./hg version'
39 @echo ' make local && ./hg version'
40
40
41 all: build doc
41 all: build doc
42
42
43 local:
43 local:
44 $(PYTHON) setup.py $(PURE) \
44 $(PYTHON) setup.py $(PURE) \
45 build_py -c -d . \
45 build_py -c -d . \
46 build_ext $(COMPILER:%=-c %) -i \
46 build_ext $(COMPILER:%=-c %) -i \
47 build_hgexe $(COMPILER:%=-c %) -i \
47 build_hgexe $(COMPILER:%=-c %) -i \
48 build_mo
48 build_mo
49 env HGRCPATH= $(PYTHON) hg version
49 env HGRCPATH= $(PYTHON) hg version
50
50
51 build:
51 build:
52 $(PYTHON) setup.py $(PURE) build $(COMPILER:%=-c %)
52 $(PYTHON) setup.py $(PURE) build $(COMPILER:%=-c %)
53
53
54 doc:
54 doc:
55 $(MAKE) -C doc
55 $(MAKE) -C doc
56
56
57 clean:
57 clean:
58 -$(PYTHON) setup.py clean --all # ignore errors from this command
58 -$(PYTHON) setup.py clean --all # ignore errors from this command
59 find contrib doc hgext i18n mercurial tests \
59 find contrib doc hgext i18n mercurial tests \
60 \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
60 \( -name '*.py[cdo]' -o -name '*.so' \) -exec rm -f '{}' ';'
61 rm -f $(addprefix mercurial/,$(notdir $(wildcard mercurial/pure/[a-z]*.py)))
61 rm -f $(addprefix mercurial/,$(notdir $(wildcard mercurial/pure/[a-z]*.py)))
62 rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
62 rm -f MANIFEST MANIFEST.in hgext/__index__.py tests/*.err
63 if test -d .hg; then rm -f mercurial/__version__.py; fi
63 if test -d .hg; then rm -f mercurial/__version__.py; fi
64 rm -rf build mercurial/locale
64 rm -rf build mercurial/locale
65 $(MAKE) -C doc clean
65 $(MAKE) -C doc clean
66
66
67 install: install-bin install-doc
67 install: install-bin install-doc
68
68
69 install-bin: build
69 install-bin: build
70 $(PYTHON) setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --force
70 $(PYTHON) setup.py $(PURE) install --root="$(DESTDIR)/" --prefix="$(PREFIX)" --force
71
71
72 install-doc: doc
72 install-doc: doc
73 cd doc && $(MAKE) $(MFLAGS) install
73 cd doc && $(MAKE) $(MFLAGS) install
74
74
75 install-home: install-home-bin install-home-doc
75 install-home: install-home-bin install-home-doc
76
76
77 install-home-bin: build
77 install-home-bin: build
78 $(PYTHON) setup.py $(PURE) install --home="$(HOME)" --prefix="" --force
78 $(PYTHON) setup.py $(PURE) install --home="$(HOME)" --prefix="" --force
79
79
80 install-home-doc: doc
80 install-home-doc: doc
81 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
81 cd doc && $(MAKE) $(MFLAGS) PREFIX="$(HOME)" install
82
82
83 MANIFEST-doc:
83 MANIFEST-doc:
84 $(MAKE) -C doc MANIFEST
84 $(MAKE) -C doc MANIFEST
85
85
86 MANIFEST.in: MANIFEST-doc
86 MANIFEST.in: MANIFEST-doc
87 hg manifest | sed -e 's/^/include /' > MANIFEST.in
87 hg manifest | sed -e 's/^/include /' > MANIFEST.in
88 echo include mercurial/__version__.py >> MANIFEST.in
88 echo include mercurial/__version__.py >> MANIFEST.in
89 sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in
89 sed -e 's/^/include /' < doc/MANIFEST >> MANIFEST.in
90
90
91 dist: tests dist-notests
91 dist: tests dist-notests
92
92
93 dist-notests: doc MANIFEST.in
93 dist-notests: doc MANIFEST.in
94 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
94 TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py -q sdist
95
95
96 check: tests
96 check: tests
97
97
98 tests:
98 tests:
99 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
99 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS)
100
100
101 test-%:
101 test-%:
102 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
102 cd tests && $(PYTHON) run-tests.py $(TESTFLAGS) $@
103
103
104 testpy-%:
104 testpy-%:
105 @echo Looking for Python $* in $(HGPYTHONS)
105 @echo Looking for Python $* in $(HGPYTHONS)
106 [ -e $(HGPYTHONS)/$*/bin/python ] || ( \
106 [ -e $(HGPYTHONS)/$*/bin/python ] || ( \
107 cd $$(mktemp --directory --tmpdir) && \
107 cd $$(mktemp --directory --tmpdir) && \
108 $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python )
108 $(MAKE) -f $(HGROOT)/contrib/Makefile.python PYTHONVER=$* PREFIX=$(HGPYTHONS)/$* python )
109 cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS)
109 cd tests && $(HGPYTHONS)/$*/bin/python run-tests.py $(TESTFLAGS)
110
110
111 check-code:
111 check-code:
112 hg manifest | xargs python contrib/check-code.py
112 hg manifest | xargs python contrib/check-code.py
113
113
114 update-pot: i18n/hg.pot
114 update-pot: i18n/hg.pot
115
115
116 i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext
116 i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n/posplit i18n/hggettext
117 $(PYTHON) i18n/hggettext mercurial/commands.py \
117 $(PYTHON) i18n/hggettext mercurial/commands.py \
118 hgext/*.py hgext/*/__init__.py \
118 hgext/*.py hgext/*/__init__.py \
119 mercurial/fileset.py mercurial/revset.py \
119 mercurial/fileset.py mercurial/revset.py \
120 mercurial/templatefilters.py mercurial/templatekw.py \
120 mercurial/templatefilters.py mercurial/templatekw.py \
121 mercurial/templater.py \
121 mercurial/templater.py \
122 mercurial/filemerge.py \
122 mercurial/filemerge.py \
123 mercurial/hgweb/webcommands.py \
123 mercurial/hgweb/webcommands.py \
124 $(DOCFILES) > i18n/hg.pot.tmp
124 $(DOCFILES) > i18n/hg.pot.tmp
125 # All strings marked for translation in Mercurial contain
125 # All strings marked for translation in Mercurial contain
126 # ASCII characters only. But some files contain string
126 # ASCII characters only. But some files contain string
127 # literals like this '\037\213'. xgettext thinks it has to
127 # literals like this '\037\213'. xgettext thinks it has to
128 # parse them even though they are not marked for translation.
128 # parse them even though they are not marked for translation.
129 # Extracting with an explicit encoding of ISO-8859-1 will make
129 # Extracting with an explicit encoding of ISO-8859-1 will make
130 # xgettext "parse" and ignore them.
130 # xgettext "parse" and ignore them.
131 echo $(PYFILES) | xargs \
131 echo $(PYFILES) | xargs \
132 xgettext --package-name "Mercurial" \
132 xgettext --package-name "Mercurial" \
133 --msgid-bugs-address "<mercurial-devel@selenic.com>" \
133 --msgid-bugs-address "<mercurial-devel@selenic.com>" \
134 --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \
134 --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \
135 --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
135 --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \
136 -d hg -p i18n -o hg.pot.tmp
136 -d hg -p i18n -o hg.pot.tmp
137 $(PYTHON) i18n/posplit i18n/hg.pot.tmp
137 $(PYTHON) i18n/posplit i18n/hg.pot.tmp
138 # The target file is not created before the last step. So it never is in
138 # The target file is not created before the last step. So it never is in
139 # an intermediate state.
139 # an intermediate state.
140 mv -f i18n/hg.pot.tmp i18n/hg.pot
140 mv -f i18n/hg.pot.tmp i18n/hg.pot
141
141
142 %.po: i18n/hg.pot
142 %.po: i18n/hg.pot
143 # work on a temporary copy for never having a half completed target
143 # work on a temporary copy for never having a half completed target
144 cp $@ $@.tmp
144 cp $@ $@.tmp
145 msgmerge --no-location --update $@.tmp $^
145 msgmerge --no-location --update $@.tmp $^
146 mv -f $@.tmp $@
146 mv -f $@.tmp $@
147
147
148 # Packaging targets
148 # Packaging targets
149
149
150 osx:
150 osx:
151 python -c 'import bdist_mpkg.script_bdist_mpkg' || \
151 python -c 'import bdist_mpkg.script_bdist_mpkg' || \
152 (echo "Missing bdist_mpkg (easy_install bdist_mpkg)"; false)
152 (echo "Missing bdist_mpkg (easy_install bdist_mpkg)"; false)
153 rm -rf dist/mercurial-*.mpkg
153 rm -rf dist/mercurial-*.mpkg
154 python -m bdist_mpkg.script_bdist_mpkg setup.py --
154 python -m bdist_mpkg.script_bdist_mpkg setup.py --
155 python contrib/fixpax.py dist/mercurial-*.mpkg/Contents/Packages/*.pkg/Contents/Archive.pax.gz
155 python contrib/fixpax.py dist/mercurial-*.mpkg/Contents/Packages/*.pkg/Contents/Archive.pax.gz
156 mkdir -p packages/osx
156 mkdir -p packages/osx
157 N=`cd dist && echo mercurial-*.mpkg | sed 's,\.mpkg$$,,'` && hdiutil create -srcfolder dist/$$N.mpkg/ -scrub -volname "$$N" -ov packages/osx/$$N.dmg
157 N=`cd dist && echo mercurial-*.mpkg | sed 's,\.mpkg$$,,'` && hdiutil create -srcfolder dist/$$N.mpkg/ -scrub -volname "$$N" -ov packages/osx/$$N.dmg
158 rm -rf dist/mercurial-*.mpkg
158 rm -rf dist/mercurial-*.mpkg
159
159
160 deb:
160 deb:
161 mkdir -p packages/debian-unknown
161 mkdir -p packages/debian-unknown
162 contrib/builddeb
162 contrib/builddeb --release unknown
163 mv debbuild/*.deb packages/debian-unknown
164 rm -rf debbuild
165
163
166 docker-debian-jessie:
164 docker-debian-jessie:
167 mkdir -p packages/debian-jessie
165 mkdir -p packages/debian-jessie
168 contrib/dockerdeb jessie
166 contrib/dockerdeb jessie
169
167
170 fedora20:
168 fedora20:
171 mkdir -p packages/fedora20
169 mkdir -p packages/fedora20
172 contrib/buildrpm
170 contrib/buildrpm
173 cp rpmbuild/RPMS/*/* packages/fedora20
171 cp rpmbuild/RPMS/*/* packages/fedora20
174 cp rpmbuild/SRPMS/* packages/fedora20
172 cp rpmbuild/SRPMS/* packages/fedora20
175 rm -rf rpmbuild
173 rm -rf rpmbuild
176
174
177 docker-fedora20:
175 docker-fedora20:
178 mkdir -p packages/fedora20
176 mkdir -p packages/fedora20
179 contrib/dockerrpm fedora20
177 contrib/dockerrpm fedora20
180
178
181 fedora21:
179 fedora21:
182 mkdir -p packages/fedora21
180 mkdir -p packages/fedora21
183 contrib/buildrpm
181 contrib/buildrpm
184 cp rpmbuild/RPMS/*/* packages/fedora21
182 cp rpmbuild/RPMS/*/* packages/fedora21
185 cp rpmbuild/SRPMS/* packages/fedora21
183 cp rpmbuild/SRPMS/* packages/fedora21
186 rm -rf rpmbuild
184 rm -rf rpmbuild
187
185
188 docker-fedora21:
186 docker-fedora21:
189 mkdir -p packages/fedora21
187 mkdir -p packages/fedora21
190 contrib/dockerrpm fedora21
188 contrib/dockerrpm fedora21
191
189
192 centos5:
190 centos5:
193 mkdir -p packages/centos5
191 mkdir -p packages/centos5
194 contrib/buildrpm --withpython
192 contrib/buildrpm --withpython
195 cp rpmbuild/RPMS/*/* packages/centos5
193 cp rpmbuild/RPMS/*/* packages/centos5
196 cp rpmbuild/SRPMS/* packages/centos5
194 cp rpmbuild/SRPMS/* packages/centos5
197
195
198 docker-centos5:
196 docker-centos5:
199 mkdir -p packages/centos5
197 mkdir -p packages/centos5
200 contrib/dockerrpm centos5 --withpython
198 contrib/dockerrpm centos5 --withpython
201
199
202 centos6:
200 centos6:
203 mkdir -p packages/centos6
201 mkdir -p packages/centos6
204 contrib/buildrpm
202 contrib/buildrpm
205 cp rpmbuild/RPMS/*/* packages/centos6
203 cp rpmbuild/RPMS/*/* packages/centos6
206 cp rpmbuild/SRPMS/* packages/centos6
204 cp rpmbuild/SRPMS/* packages/centos6
207
205
208 docker-centos6:
206 docker-centos6:
209 mkdir -p packages/centos6
207 mkdir -p packages/centos6
210 contrib/dockerrpm centos6
208 contrib/dockerrpm centos6
211
209
212 centos7:
210 centos7:
213 mkdir -p packages/centos7
211 mkdir -p packages/centos7
214 contrib/buildrpm
212 contrib/buildrpm
215 cp rpmbuild/RPMS/*/* packages/centos7
213 cp rpmbuild/RPMS/*/* packages/centos7
216 cp rpmbuild/SRPMS/* packages/centos7
214 cp rpmbuild/SRPMS/* packages/centos7
217
215
218 docker-centos7:
216 docker-centos7:
219 mkdir -p packages/centos7
217 mkdir -p packages/centos7
220 contrib/dockerrpm centos7
218 contrib/dockerrpm centos7
221
219
222 .PHONY: help all local build doc clean install install-bin install-doc \
220 .PHONY: help all local build doc clean install install-bin install-doc \
223 install-home install-home-bin install-home-doc \
221 install-home install-home-bin install-home-doc \
224 dist dist-notests check tests check-code update-pot \
222 dist dist-notests check tests check-code update-pot \
225 osx fedora20 docker-fedora20 fedora21 docker-fedora21 \
223 osx fedora20 docker-fedora20 fedora21 docker-fedora21 \
226 centos5 docker-centos5 centos6 docker-centos6 centos7 docker-centos7
224 centos5 docker-centos5 centos6 docker-centos6 centos7 docker-centos7
@@ -1,63 +1,70 b''
1 #!/bin/sh -e
1 #!/bin/sh -e
2 #
2 #
3 # Build a Mercurial debian package from the current repo
3 # Build a Mercurial debian package from the current repo
4 #
4 #
5 # Tested on Jessie (stable as of original script authoring.)
5 # Tested on Jessie (stable as of original script authoring.)
6
6
7 . $(dirname $0)/packagelib.sh
7 . $(dirname $0)/packagelib.sh
8
8
9 BUILD=1
9 BUILD=1
10 DEBBUILDDIR="$PWD/debbuild"
10 DEBVERSION=jessie
11 while [ "$1" ]; do
11 while [ "$1" ]; do
12 case "$1" in
12 case "$1" in
13 --release )
14 shift
15 DEBVERSION="$1"
16 shift
17 ;;
13 --prepare )
18 --prepare )
14 shift
19 shift
15 BUILD=
20 BUILD=
16 ;;
21 ;;
17 --debbuilddir )
22 --debbuilddir )
18 shift
23 shift
19 DEBBUILDDIR="$1"
24 DEBBUILDDIR="$1"
20 shift
25 shift
21 ;;
26 ;;
22 * )
27 * )
23 echo "Invalid parameter $1!" 1>&2
28 echo "Invalid parameter $1!" 1>&2
24 exit 1
29 exit 1
25 ;;
30 ;;
26 esac
31 esac
27 done
32 done
28
33
34 DEBBUILDDIR=${OUTPUTDIR:="$PWD/debbuild"}
35
29 set -u
36 set -u
30
37
31 rm -rf $DEBBUILDDIR
38 rm -rf $DEBBUILDDIR
32 mkdir -p $DEBBUILDDIR
39 mkdir -p $DEBBUILDDIR
33
40
34 if [ ! -d .hg ]; then
41 if [ ! -d .hg ]; then
35 echo 'You are not inside a Mercurial repository!' 1>&2
42 echo 'You are not inside a Mercurial repository!' 1>&2
36 exit 1
43 exit 1
37 fi
44 fi
38
45
39 gethgversion
46 gethgversion
40
47
41 cp -r $PWD/contrib/debian $DEBBUILDDIR/DEBIAN
48 cp -r $PWD/contrib/debian $DEBBUILDDIR/DEBIAN
42 chmod -R 0755 $DEBBUILDDIR/DEBIAN
49 chmod -R 0755 $DEBBUILDDIR/DEBIAN
43
50
44 control=$DEBBUILDDIR/DEBIAN/control
51 control=$DEBBUILDDIR/DEBIAN/control
45
52
46 # This looks like sed -i, but sed -i behaves just differently enough
53 # This looks like sed -i, but sed -i behaves just differently enough
47 # between BSD and GNU sed that I gave up and did the dumb thing.
54 # between BSD and GNU sed that I gave up and did the dumb thing.
48 sed "s/__VERSION__/$version/" < $control > $control.tmp
55 sed "s/__VERSION__/$version/" < $control > $control.tmp
49 mv $control.tmp $control
56 mv $control.tmp $control
50
57
51 if [ "$BUILD" ]; then
58 if [ "$BUILD" ]; then
52 make PREFIX=$DEBBUILDDIR/usr install
59 make PREFIX=$DEBBUILDDIR/usr install
53 dpkg-deb --build $DEBBUILDDIR
60 dpkg-deb --build $DEBBUILDDIR
54 mv $DEBBUILDDIR.deb $DEBBUILDDIR/mercurial-$version-$release.deb
61 mv $DEBBUILDDIR.deb $DEBBUILDDIR/mercurial-$version-$release.deb
55 if [ $? = 0 ]; then
62 if [ $? = 0 ]; then
56 echo
63 echo
57 echo "Built packages for $version-$release:"
64 echo "Built packages for $version-$release:"
58 find $DEBBUILDDIR/ -type f -newer $control
65 find $DEBBUILDDIR/ -type f -newer $control
59 fi
66 fi
60 else
67 else
61 echo "Prepared sources for $version-$release $control are in $DEBBUILDDIR - use like:"
68 echo "Prepared sources for $version-$release $control are in $DEBBUILDDIR - use like:"
62 echo "dpkg-deb --build $DEBBUILDDIR"
69 echo "dpkg-deb --build $DEBBUILDDIR"
63 fi
70 fi
@@ -1,39 +1,40 b''
1 #!/bin/bash -eu
1 #!/bin/bash -eu
2
2
3 . $(dirname $0)/dockerlib.sh
3 . $(dirname $0)/dockerlib.sh
4 . $(dirname $0)/packagelib.sh
4 . $(dirname $0)/packagelib.sh
5
5
6 BUILDDIR=$(dirname $0)
6 BUILDDIR=$(dirname $0)
7 export ROOTDIR=$(cd $BUILDDIR/..; pwd)
7 export ROOTDIR=$(cd $BUILDDIR/..; pwd)
8
8
9 checkdocker
9 checkdocker
10
10
11 DEBPLATFORM="$1"
11 PLATFORM="debian-$1"
12 PLATFORM="debian-$1"
12 shift # extra params are passed to build process
13 shift # extra params are passed to build process
13
14
14 initcontainer $PLATFORM
15 initcontainer $PLATFORM
15
16
16 DEBBUILDDIR=$ROOTDIR/packages/$PLATFORM
17 DEBBUILDDIR=${OUTPUTDIR:=$ROOTDIR/packages/$PLATFORM}
17 contrib/builddeb --debbuilddir $DEBBUILDDIR/staged --prepare
18 OUTPUTDIR=$DEBBUILDDIR/staged contrib/builddeb --release $DEBPLATFORM --prepare
18
19
19 DSHARED=/mnt/shared/
20 DSHARED=/mnt/shared/
20 if [ $(uname) = "Darwin" ] ; then
21 if [ $(uname) = "Darwin" ] ; then
21 $DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED -v $PWD:/mnt/hg $CONTAINER \
22 $DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED -v $PWD:/mnt/hg $CONTAINER \
22 sh -c "cd /mnt/hg && make clean && make local"
23 sh -c "cd /mnt/hg && make clean && make local"
23 fi
24 fi
24 $DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED -v $PWD:/mnt/hg $CONTAINER \
25 $DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED -v $PWD:/mnt/hg $CONTAINER \
25 sh -c "cd /mnt/hg && make PREFIX=$DSHARED/staged/usr install"
26 sh -c "cd /mnt/hg && make PREFIX=$DSHARED/staged/usr install"
26 $DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED $CONTAINER \
27 $DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED $CONTAINER \
27 dpkg-deb --build $DSHARED/staged
28 dpkg-deb --build $DSHARED/staged
28 if [ $(uname) = "Darwin" ] ; then
29 if [ $(uname) = "Darwin" ] ; then
29 $DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED -v $PWD:/mnt/hg $CONTAINER \
30 $DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED -v $PWD:/mnt/hg $CONTAINER \
30 sh -c "cd /mnt/hg && make clean"
31 sh -c "cd /mnt/hg && make clean"
31 fi
32 fi
32
33
33 gethgversion
34 gethgversion
34
35
35 rm -r $DEBBUILDDIR/staged
36 rm -r $DEBBUILDDIR/staged
36 mv $DEBBUILDDIR/staged.deb $DEBBUILDDIR/mercurial-$version-$release.deb
37 mv $DEBBUILDDIR/staged.deb $DEBBUILDDIR/mercurial-$version-$release.deb
37
38
38 echo
39 echo
39 echo "Build complete - results can be found in $DEBBUILDDIR"
40 echo "Build complete - results can be found in $DEBBUILDDIR"
General Comments 0
You need to be logged in to leave comments. Login now