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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2776 - (hide annotations) (download) (as text)
Sun Jun 14 15:13:44 2015 UTC (7 years, 5 months ago) by schoenebeck
File MIME type: application/x-sh
File size: 7288 byte(s)
- Fix of previous commit.

1 persson 2211 #!/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 schoenebeck 2775 # command line tools shipped with libgig
13     gigtools_bins="akaidump akaiextract dlsdump gig2mono gig2stereo gigdump gigextract gigmerge korg2gig korgdump rifftree sf2dump"
14    
15 persson 2211 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 schoenebeck 2708 rm -rf components
24     rm -rf linuxsampler.prepkg
25 schoenebeck 2709 rm -rf LinuxSampler.pkg
26 persson 2211 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 persson 2608 createuniv lib/libgig/libgig.6.dylib lib/libgig.6.dylib
38 persson 2211 createuniv lib/linuxsampler/liblinuxsampler.3.dylib lib/liblinuxsampler.3.dylib
39     createuniv bin/linuxsampler LinuxSampler/linuxsampler
40 schoenebeck 2520 createuniv bin/lscp LinuxSampler/lscp
41 persson 2212 cp README "$D"
42 persson 2211 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 schoenebeck 2775 # gigtools
57    
58 schoenebeck 2776 for x in $gigtools_bins
59 schoenebeck 2775 do
60     createuniv "bin/$x" "LinuxSampler/$x"
61     done
62    
63    
64 persson 2211 # 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 persson 2502 # 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 schoenebeck 2708 # generate OS X .pkg package / installer ...
124 persson 2211
125 schoenebeck 2708 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 schoenebeck 2775 component="gigtools"
150     dlib="components/$component.pkg/bin"
151     mkdir -p $dlib
152 schoenebeck 2776 for f in $gigtools_bins; do
153 schoenebeck 2775 cp $D/LinuxSampler/$f $dlib
154     done
155    
156 schoenebeck 2708 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 schoenebeck 2711 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 schoenebeck 2708 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