##// END OF EJS Templates
osx: create a modern package including manpages...
Kevin Bullock -
r29027:db5084d2 stable
parent child Browse files
Show More
@@ -0,0 +1,19 b''
1 <?xml version="1.0" encoding="utf-8" standalone="no"?>
2 <installer-gui-script minSpecVersion="1">
3 <title>Mercurial SCM</title>
4 <organization>org.mercurial-scm</organization>
5 <options customize="never" require-scripts="false" rootVolumeOnly="true" />
6 <welcome file="Welcome.html" mime-type="text/html" />
7 <license file="../../COPYING" mime-type="text/plain" />
8 <readme file="Readme.html" mime-type="text/html" />
9 <pkg-ref id="org.mercurial-scm.mercurial"
10 version="0"
11 auth="root"
12 onConclusion="none">mercurial.pkg</pkg-ref>
13 <choices-outline>
14 <line choice="org.mercurial-scm.mercurial"/>
15 </choices-outline>
16 <choice id="org.mercurial-scm.mercurial" visible="false">
17 <pkg-ref id="org.mercurial-scm.mercurial"/>
18 </choice>
19 </installer-gui-script>
@@ -156,18 +156,20 b' i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n'
156 # Packaging targets
156 # Packaging targets
157
157
158 osx:
158 osx:
159 python -c 'import bdist_mpkg.script_bdist_mpkg' || \
159 python setup.py install --optimize=1 \
160 (echo "Missing bdist_mpkg (easy_install bdist_mpkg)"; false)
160 --root=build/mercurial/ --prefix=/usr/local/ \
161 rm -rf dist/mercurial-*.mpkg
161 --install-lib=/Library/Python/2.7/site-packages/
162 python -m bdist_mpkg.script_bdist_mpkg setup.py --
162 make -C doc all install DESTDIR="$(PWD)/build/mercurial/"
163 python contrib/fixpax.py dist/mercurial-*.mpkg/Contents/Packages/*.pkg/Contents/Archive.pax.gz
163 mkdir -p $${OUTPUTDIR:-dist}
164 OUTPUTDIR=$${OUTPUTDIR:=packages/osx} && \
164 pkgbuild --root build/mercurial/ --identifier org.mercurial-scm.mercurial \
165 mkdir -p $$OUTPUTDIR && \
165 build/mercurial.pkg
166 N=`cd dist && echo mercurial-*.mpkg | sed 's,\.mpkg$$,,'` && \
166 HGVER=$$((cat build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py; echo 'print(version)') | python) && \
167 hdiutil create -srcfolder dist/$$N.mpkg/ -scrub -volname "$$N" \
167 OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
168 -ov $$OUTPUTDIR/$$N.dmg && \
168 productbuild --distribution contrib/macosx/distribution.xml \
169 [ -n "$$KEEPMPKG" ] && mv dist/mercurial-*.mpkg $$OUTPUTDIR || \
169 --package-path build/ \
170 rm -rf dist/mercurial-*.mpkg
170 --version "$${HGVER}" \
171 --resources contrib/macosx/ \
172 "$${OUTPUTDIR:-dist/}"/Mercurial-"$${HGVER}"-macosx"$${OSXVER}".pkg
171
173
172 deb:
174 deb:
173 contrib/builddeb
175 contrib/builddeb
@@ -1,42 +1,44 b''
1 #require test-repo slow osx bdistmpkg
1 #require test-repo slow osx osxpackaging
2 $ OUTPUTDIR=`pwd`
2 $ OUTPUTDIR=`pwd`
3 $ export OUTPUTDIR
3 $ export OUTPUTDIR
4 $ KEEPMPKG=yes
4 $ KEEPMPKG=yes
5 $ export KEEPMPKG
5 $ export KEEPMPKG
6
6
7 $ cd "$TESTDIR"/..
7 $ cd "$TESTDIR"/..
8 $ rm -rf dist
8 $ make osx > $OUTPUTDIR/build.log 2>&1
9 $ make osx > $OUTPUTDIR/build.log 2>&1
9 $ cd $OUTPUTDIR
10 $ cd $OUTPUTDIR
10 $ ls -d *.dmg *.mpkg
11 $ ls -d *.pkg
11 mercurial-*-macosx10.*.dmg (glob)
12 Mercurial-*-macosx10.*.pkg (glob)
12 mercurial-*-macosx10.*.mpkg (glob)
13
14 $ xar -xf Mercurial*.pkg
13
15
14 Gather list of all installed files:
16 Gather list of all installed files:
15 $ find *.mpkg -name Archive.bom | xargs lsbom > boms.txt
17 $ lsbom mercurial.pkg/Bom > boms.txt
16
17 TODO: update to -f 1,2,3 when we're confident the installed owner of
18 our files is corect. Right now it looks like it's the id of the user
19 that builds the mpkg, which is probably slightly wrong.
20
18
21 Spot-check some randomly selected files:
19 Spot-check some randomly selected files:
22 $ grep bdiff boms.txt | cut -d ' ' -f 1,2
20 $ grep bdiff boms.txt | cut -d ' ' -f 1,2,3
23 ./mercurial/bdiff.so 100775
21 ./Library/Python/2.7/site-packages/mercurial/bdiff.so 100755 0/0
24 ./mercurial/pure/bdiff.py 100664
22 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.py 100644 0/0
25 ./mercurial/pure/bdiff.pyc 100664
23 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyc 100644 0/0
26 ./mercurial/pure/bdiff.pyo 100664
24 ./Library/Python/2.7/site-packages/mercurial/pure/bdiff.pyo 100644 0/0
27 TODO: man pages don't get installed
25 $ egrep 'man[15]' boms.txt | cut -d ' ' -f 1,2,3
28 $ egrep 'man[15]' boms.txt | cut -d ' ' -f 1,2
26 ./usr/local/share/man/man1 40755 0/0
29 $ grep bser boms.txt | cut -d ' ' -f 1,2
27 ./usr/local/share/man/man1/hg.1 100644 0/0
30 ./hgext/fsmonitor/pywatchman/bser.so 100775
28 ./usr/local/share/man/man5 40755 0/0
31 ./hgext/fsmonitor/pywatchman/pybser.py 100664
29 ./usr/local/share/man/man5/hgignore.5 100644 0/0
32 ./hgext/fsmonitor/pywatchman/pybser.pyc 100664
30 ./usr/local/share/man/man5/hgrc.5 100644 0/0
33 ./hgext/fsmonitor/pywatchman/pybser.pyo 100664
31 $ grep bser boms.txt | cut -d ' ' -f 1,2,3
34 $ grep localrepo boms.txt | cut -d ' ' -f 1,2
32 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/bser.so 100755 0/0
35 ./mercurial/localrepo.py 100664
33 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.py 100644 0/0
36 ./mercurial/localrepo.pyc 100664
34 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyc 100644 0/0
37 ./mercurial/localrepo.pyo 100664
35 ./Library/Python/2.7/site-packages/hgext/fsmonitor/pywatchman/pybser.pyo 100644 0/0
38 $ grep '/hg ' boms.txt | cut -d ' ' -f 1,2
36 $ grep localrepo boms.txt | cut -d ' ' -f 1,2,3
39 ./hg 100775
37 ./Library/Python/2.7/site-packages/mercurial/localrepo.py 100644 0/0
38 ./Library/Python/2.7/site-packages/mercurial/localrepo.pyc 100644 0/0
39 ./Library/Python/2.7/site-packages/mercurial/localrepo.pyo 100644 0/0
40 $ grep '/hg ' boms.txt | cut -d ' ' -f 1,2,3
41 ./usr/local/bin/hg 100755 0/0
40
42
41 Note that we're not currently installing any /etc/mercurial stuff,
43 Note that we're not currently installing any /etc/mercurial stuff,
42 including merge-tool configurations.
44 including merge-tool configurations.
General Comments 0
You need to be logged in to leave comments. Login now