]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blob - misc/build_helpers/build-osx-pkg.sh
create/test/upload tahoe-lafs-VERSION-osx.pkg, not tahoe-lafs-osx.pkg
[tahoe-lafs/tahoe-lafs.git] / misc / build_helpers / build-osx-pkg.sh
1 #!/bin/sh
2
3 APPNAME=$1
4 VERSION=$2
5 PWD=`pwd`
6
7 # The editing of allmydata-tahoe.egg-link and easy-install.pth files
8 # (*in-place*) ensures that we reference the source at the correct path,
9 # removing the hard-coded local source tree directory names.
10 #
11 find support -name $APPNAME.egg-link -execdir sh -c "echo >> {}; echo /Applications/tahoe.app/src >> {}" \;
12 find support -name easy-install.pth -execdir sed -i.bak 's|^.*/src$|../../../../src|' '{}' \;
13
14 # create component pkg
15 pkgbuild --root $PWD \
16          --identifier com.leastauthority.tahoe \
17          --version $VERSION \
18          --ownership recommended \
19          --install-location /Applications/tahoe.app \
20          --scripts $PWD/misc/build_helpers/osx/scripts \
21          tahoe-lafs.pkg
22
23 # create product archive
24 productbuild --distribution $PWD/misc/build_helpers/osx/Distribution.xml \
25              --package-path . \
26              tahoe-lafs-$VERSION-osx.pkg
27
28 # remove intermediate pkg
29 rm -f tahoe-lafs.pkg