/[svn]/misc/trunk/mac_package_builder/make-tar-file.sh
ViewVC logotype

Contents of /misc/trunk/mac_package_builder/make-tar-file.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2777 - (show annotations) (download) (as text)
Sun Jun 14 15:35:06 2015 UTC (4 years, 11 months ago) by schoenebeck
File MIME type: application/x-sh
File size: 7491 byte(s)
- Mac installer: Added man pages of gigtools.

1 #!/bin/sh -xe
2
3 # This script is primarily made for the linuxsampler build server. It
4 # copies the files created by the previous Max OS X build steps, and
5 # creates universal binaries from the i686, x86_64 and powerpc
6 # files. Then it packs all components as a .pkg Mac installer package and
7 # finally it wraps everything in a tar.bz2 archive.
8
9 LIPO=x86_64-apple-darwin9-lipo
10 P=/home/persson/mac
11 D=linuxsampler_`date +%Y%m%d`
12
13 # command line tools shipped with libgig
14 gigtools_bins="akaidump akaiextract dlsdump gig2mono gig2stereo gigdump gigextract gigmerge korg2gig korgdump rifftree sf2dump"
15
16 createuniv ()
17 {
18 $LIPO -create "$P/x86_64/$1" "$P/i686/$1" "$P/powerpc/$1" \
19 -output "$D/${2-$1}"
20 }
21
22
23 rm -rf linuxsampler_*
24 rm -rf components
25 rm -rf linuxsampler.prepkg
26 rm -rf LinuxSampler.pkg
27 mkdir -p "$D/LinuxSampler" "$D/lib"
28
29
30 # linuxsampler, libgig and dependencies
31
32 createuniv lib/libogg.0.dylib
33 createuniv lib/libvorbis.0.dylib
34 createuniv lib/libvorbisenc.2.dylib
35 createuniv lib/libFLAC.8.2.0.dylib
36 ln -s libFLAC.8.2.0.dylib "$D/lib/libFLAC.8.dylib"
37 createuniv lib/libsndfile.1.dylib
38 createuniv lib/libgig/libgig.6.dylib lib/libgig.6.dylib
39 createuniv lib/linuxsampler/liblinuxsampler.3.dylib lib/liblinuxsampler.3.dylib
40 createuniv bin/linuxsampler LinuxSampler/linuxsampler
41 createuniv bin/lscp LinuxSampler/lscp
42 cp README "$D"
43 cp licenses.txt "$D/LinuxSampler"
44
45 # AU plugin
46
47 cp -r "$P/i686/Components/LinuxSamplerAU.component" "$D"
48 createuniv Components/LinuxSamplerAU.component/Contents/MacOS/LinuxSamplerAU LinuxSamplerAU.component/Contents/MacOS/LinuxSamplerAU
49
50
51 # VST plugin
52
53 cp -r "$P/i686/VST/LinuxSampler.vst" "$D"
54 createuniv VST/LinuxSampler.vst/Contents/MacOS/LinuxSampler LinuxSampler.vst/Contents/MacOS/LinuxSampler
55
56
57 # gigtools
58
59 for x in $gigtools_bins
60 do
61 createuniv "bin/$x" "LinuxSampler/$x"
62 done
63
64
65 # Fantasia
66
67 cp -r "$P/Fantasia.app" "$D/LinuxSampler"
68
69
70 # QSampler
71
72 ./make-qsampler-app.sh
73 mv qsampler.app "$D/LinuxSampler"
74
75
76 # Gigedit
77
78 # no powerpc build of gigedit
79 createuniv ()
80 {
81 $LIPO -create "$P/x86_64/$1" "$P/i686/$1" \
82 -output "$D/${2-$1}"
83 }
84
85 mkdir -p "$D/LinuxSampler/gigedit.app/Contents/MacOS" \
86 "$D/lib/gdk-pixbuf-2.0/2.10.0/loaders" \
87 "$D/lib/pango/1.8.0/modules" \
88 "$D/lib/gtk-2.0" \
89 "$D/lib/locale/sv/LC_MESSAGES" \
90 "$D/lib/locale/de/LC_MESSAGES" \
91 "$D/lib/linuxsampler/plugins"
92
93 createuniv lib/gigedit/libgigedit.2.dylib lib/libgigedit.2.dylib
94 createuniv bin/gigedit LinuxSampler/gigedit.app/Contents/MacOS/gigedit
95 createuniv lib/linuxsampler/plugins/libgigeditlinuxsamplerplugin.so
96
97 for x in libatk-1.0.0.dylib libatkmm-1.6.1.dylib libcairo.2.dylib \
98 libcairomm-1.0.1.dylib libffi.6.dylib libfontconfig.1.dylib \
99 libfreetype.6.dylib libgailutil.18.dylib libgdkmm-2.4.1.dylib \
100 libgdk_pixbuf-2.0.0.dylib libgdk-quartz-2.0.0.dylib libgio-2.0.0.dylib \
101 libgiomm-2.4.1.dylib libglib-2.0.0.dylib libglibmm-2.4.1.dylib \
102 libgmodule-2.0.0.dylib libgobject-2.0.0.dylib libgthread-2.0.0.dylib \
103 libgtkmm-2.4.1.dylib libgtk-quartz-2.0.0.dylib libintl.8.dylib \
104 libjpeg.8.dylib libpango-1.0.0.dylib libpangocairo-1.0.0.dylib \
105 libpangomm-1.4.1.dylib libpixman-1.0.dylib libpng15.15.dylib \
106 libsigc-2.0.0.dylib libtiff.3.dylib \
107 gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so \
108 pango/1.8.0/modules/pango-basic-coretext.so
109 do
110 $LIPO -create "/home/persson/macgtk64/lib/$x" \
111 "/home/persson/macgtk32/lib/$x" \
112 -output "$D/lib/$x"
113 done
114
115 cp PkgInfo Info.plist "$D/LinuxSampler/gigedit.app/Contents"
116 cp pango.modules "$D/lib/pango/pango.modules"
117 cp gdk-pixbuf.loaders "$D/lib/gtk-2.0"
118 cp $P/x86_64/share/locale/de/LC_MESSAGES/gigedit.mo "$D/lib/locale/de/LC_MESSAGES"
119 cp $P/x86_64/share/locale/sv/LC_MESSAGES/gigedit.mo "$D/lib/locale/sv/LC_MESSAGES"
120 cp /home/persson/macgtk64/share/locale/de/LC_MESSAGES/gtk20.mo "$D/lib/locale/de/LC_MESSAGES"
121 cp /home/persson/macgtk64/share/locale/sv/LC_MESSAGES/gtk20.mo "$D/lib/locale/sv/LC_MESSAGES"
122
123
124 # generate OS X .pkg package / installer ...
125
126 component="codecs"
127 dlib="components/$component.pkg/lib"
128 mkdir -p $dlib
129 for f in `ls $D/lib/libFLAC* $D/lib/libogg* $D/lib/libsndfile* $D/lib/libvorbis*`; do
130 cp $f $dlib
131 done
132
133 component="fantasia"
134 dlib="components/$component.pkg/LinuxSampler"
135 mkdir -p $dlib
136 cp -r $D/LinuxSampler/Fantasia.app $dlib
137
138 component="gigedit"
139 dlib="components/$component.pkg/LinuxSampler"
140 mkdir -p $dlib
141 cp -r $D/LinuxSampler/$component.app $dlib
142
143 component="libgig"
144 dlib="components/$component.pkg/lib"
145 mkdir -p $dlib
146 for f in `ls $D/lib/libgig.*`; do
147 cp $f $dlib
148 done
149
150 component="gigtools"
151 dlib="components/$component.pkg/bin"
152 mkdir -p $dlib
153 for f in $gigtools_bins; do
154 cp $D/LinuxSampler/$f $dlib
155 done
156 dlib="components/$component.pkg/share/man/man1"
157 mkdir -p $dlib
158 for f in $gigtools_bins; do
159 cp $P/i686/share/man/man1/$f.1 $dlib
160 done
161
162 component="libgigedit"
163 dlib="$PWD/components/$component.pkg/lib"
164 mkdir -p $dlib
165 (
166 cd $D/lib/
167 for f in `ls -d linuxsampler libgigedit* locale/*/LC_MESSAGES/gigedit.mo`; do
168 cp -r --parents $f $dlib
169 done
170 )
171
172 component="libgtk"
173 dlib="$PWD/components/$component.pkg/lib"
174 mkdir -p $dlib
175 (
176 cd $D/lib/
177 for f in `ls -d gdk* gtk* locale/*/LC_MESSAGES/gtk20.mo pango libatk* libcairo* libffi* libfont* libfreetype* libgailutil* libgdk* libgio* libglib* libgmodule* libgobject* libgthread* libgtk* libintl* libjpeg* libpango* libpixman* libpng* libsigc* libtiff*`; do
178 cp -r --parents $f $dlib
179 done
180 )
181
182 component="liblinuxsampler"
183 dlib="components/$component.pkg/lib"
184 mkdir -p $dlib
185 for f in `ls $D/lib/liblinuxsampler*`; do
186 cp $f $dlib
187 done
188 mkdir -p "$dlib/linuxsampler/plugins"
189
190 component="linuxsampler"
191 dlib="components/$component.pkg/bin"
192 mkdir -p $dlib
193 for f in `ls $D/LinuxSampler/linuxsampler $D/LinuxSampler/lscp`; do
194 cp $f $dlib
195 done
196
197 component="linuxsampler_au"
198 dlib="components/$component.pkg"
199 mkdir -p $dlib
200 cp -r $D/LinuxSamplerAU.component $dlib
201
202 component="linuxsampler_vst"
203 dlib="components/$component.pkg"
204 mkdir -p $dlib
205 cp -r $D/LinuxSampler.vst $dlib
206
207 component="qsampler"
208 dlib="components/$component.pkg/LinuxSampler"
209 mkdir -p $dlib
210 cp -r $D/LinuxSampler/$component.app $dlib
211
212
213 mkdir linuxsampler.prepkg
214 cp linuxsampler.unpkg/Distribution linuxsampler.prepkg
215 rsync -r --exclude='.svn' linuxsampler.unpkg/Resources linuxsampler.prepkg
216 (
217 cd components
218 for d in `ls -d *.pkg`; do
219 mkdir -p ../linuxsampler.prepkg/$d
220 (
221 cd $d
222 find . | cpio -o --format odc --owner 0:80 | gzip -c
223 ) > ../linuxsampler.prepkg/$d/Payload
224 mkbom -u 0 -g 80 $d ../linuxsampler.prepkg/$d/Bom
225 size_kb=`du -sk $d | cut -f 1`
226 entries_count=`find . | wc -l`
227 cp ../linuxsampler.unpkg/$d/PackageInfo ../linuxsampler.prepkg/$d
228 xmltxt=`xmlstarlet ed -u '/pkg-info/payload/@numberOfFiles' -v $entries_count ../linuxsampler.prepkg/$d/PackageInfo | xmlstarlet ed -u '/pkg-info/payload/@installKBytes' -v $size_kb -`
229 echo $xmltxt > ../linuxsampler.prepkg/$d/PackageInfo
230 identifier=`xmlstarlet sel -t -v '/pkg-info/@identifier' ../linuxsampler.prepkg/$d/PackageInfo`
231 xmltxt=`xmlstarlet ed -u "/installer-gui-script/pkg-ref[@id='$identifier']/@installKBytes" -v $size_kb ../linuxsampler.prepkg/Distribution`
232 echo $xmltxt > ../linuxsampler.prepkg/Distribution
233 done
234 )
235 (
236 cd linuxsampler.prepkg
237 xar --compression none -cf ../LinuxSampler.pkg .
238 )
239
240 tar cjf "$D.tar.bz2" README LinuxSampler.pkg

Properties

Name Value
svn:eol-style native
svn:executable *

  ViewVC Help
Powered by ViewVC