/[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 2711 - (show annotations) (download) (as text)
Sun Jan 18 19:59:35 2015 UTC (7 years, 5 months ago) by schoenebeck
File MIME type: application/x-sh
File size: 6891 byte(s)
* Mac .pkg builder fix: libsigc was missing in package.

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

Properties

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

  ViewVC Help
Powered by ViewVC