/[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 2776 - (show annotations) (download) (as text)
Sun Jun 14 15:13:44 2015 UTC (5 years, 1 month ago) by schoenebeck
File MIME type: application/x-sh
File size: 7288 byte(s)
- Fix of previous commit.

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

Properties

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

  ViewVC Help
Powered by ViewVC