Chameleon Applications

Chameleon Applications Svn Source Tree

Root/branches/iFabio/Chameleon/package/buildpkg.sh

  • Property svn:executable set to
Source at commit 330 created 12 years 9 months ago.
By ifabio, Minus update from latest main Chamleon trunk
1#!/bin/bash
2
3# $1 Path to store built package
4
5packagesidentity="org.chameleon"
6
7packagename="Chameleon"
8
9pkgroot="${0%/*}"
10
11COL_BLACK="\x1b[30;01m"
12COL_RED="\x1b[31;01m"
13COL_GREEN="\x1b[32;01m"
14COL_YELLOW="\x1b[33;01m"
15COL_MAGENTA="\x1b[35;01m"
16COL_CYAN="\x1b[36;01m"
17COL_WHITE="\x1b[37;01m"
18COL_BLUE="\x1b[34;01m"
19COL_RESET="\x1b[39;49;00m"
20
21#version=$( grep I386BOOT_CHAMELEONVERSION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' )
22version=$( cat version )
23stage=${version##*-}
24revision=$( grep I386BOOT_CHAMELEONREVISION sym/i386/vers.h | awk '{ print $3 }' | tr -d '\"' )
25builddate=$( grep I386BOOT_BUILDDATE sym/i386/vers.h | awk '{ print $3,$4 }' | tr -d '\"' )
26timestamp=$( date -j -f "%Y-%m-%d %H:%M:%S" "${builddate}" "+%s" )
27
28# =================
29
30develop=" Crazor, Dense, fassl, fxtentacle, iNDi, JrCs, Kabyl, kaitek, mackerintel, mercurysquad, munky, Slice, meklort, mozodojo, rekursor, Turbo, cparm, valv & zef "
31
32credits=" andyvand, asereBLN, Azimut, bumby, cosmo1t, dfe, Galaxy, kalyway, Krazubu, MasterChief, netkas, sckevyn, smith@@, THeKiNG, blackosx, .: ErmaC :., scrax, DutchHockeyPro & Andy"
33
34# =================
35
36distributioncount=0
37xmlindent=0
38
39indent[0]="\t"
40indent[1]="\t\t"
41indent[2]="\t\t\t"
42indent[3]="\t\t\t\t"
43
44main ()
45{
46
47# clean up the destination path
48
49rm -R -f "${1}"
50echo ""
51echo -e $COL_BLACK"----------------------------------"$COL_RESET
52echo -e $COL_BLACK"Building $packagename Install Package"$COL_RESET
53echo -e $COL_BLACK"----------------------------------"$COL_RESET
54echo ""
55
56outline[$((outlinecount++))]="${indent[$xmlindent]}<choices-outline>"
57
58# build core package
59echo "================= Core ================="
60((xmlindent++))
61packagesidentity="org.chameleon.core"
62mkdir -p ${1}/Core/Root/usr/sbin
63mkdir -p ${1}/Core/Root/usr/local/bin
64mkdir -p ${1}/Core/Root/usr/standalone/i386
65mkdir -p ${1}/Core/Root/usr/standalone/i386/modules
66cp -R ${1%/*}/i386/modules ${1}/Core/Root/usr/standalone/i386
67cp -f ${1%/*}/i386/boot ${1}/Core/Root/usr/standalone/i386
68cp -f ${1%/*}/i386/boot0 ${1}/Core/Root/usr/standalone/i386
69cp -f ${1%/*}/i386/boot0md ${1}/Core/Root/usr/standalone/i386
70cp -f ${1%/*}/i386/boot1f32 ${1}/Core/Root/usr/standalone/i386
71cp -f ${1%/*}/i386/boot1h ${1}/Core/Root/usr/standalone/i386
72cp -f ${1%/*}/i386/boot1he ${1}/Core/Root/usr/standalone/i386
73cp -f ${1%/*}/i386/boot1hp ${1}/Core/Root/usr/standalone/i386
74cp -f ${1%/*}/i386/cdboot ${1}/Core/Root/usr/standalone/i386
75cp -f ${1%/*}/i386/chain0 ${1}/Core/Root/usr/standalone/i386
76fixperms "${1}/Core/Root/"
77cp -f ${1%/*}/i386/fdisk440 ${1}/Core/Root/usr/sbin
78cp -f ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/sbin
79local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} )
80echo "[BUILD] i386 "
81buildpackage "${1}/Core" "/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
82
83# build Chameleon package
84echo "================= Chameleon ================="
85outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Chameleon\">"
86choices[$((choicescount++))]="<choice\n\tid=\"Chameleon\"\n\ttitle=\"Chameleon_title\"\n\tdescription=\"Chameleon_description\"\n>\n</choice>\n"
87
88# build standard package
89mkdir -p ${1}/Standard/Root
90mkdir -p ${1}/Standard/Scripts/Tools
91cp -f ${pkgroot}/Scripts/Standard/* ${1}/Standard/Scripts
92# ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Tools/SetFile
93echo "[BUILD] Standard "
94buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" selected=\"exclusive(choices['EFI']) &amp;&amp; exclusive(choices['noboot'])\"" >/dev/null 2>&1
95# End build standard package
96
97# build efi package
98mkdir -p ${1}/EFI/Root
99mkdir -p ${1}/EFI/Scripts/Tools
100cp -f ${pkgroot}/Scripts/EFI/* ${1}/EFI/Scripts
101# ditto --arch i386 `which SetFile` ${1}/EFI/Scripts/Tools/SetFile
102echo "[BUILD] EFI "
103buildpackage "${1}/EFI" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['noboot'])\"" >/dev/null 2>&1
104# End build efi package
105
106# build reset choice package
107mkdir -p ${1}/noboot/Root
108echo "[BUILD] Reset choice "
109buildpackage "${1}/noboot" "/tmpcham" "" "start_visible=\"true\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['EFI'])\"" >/dev/null 2>&1
110# End build reset choice package
111
112# build Modules package
113echo "================= Modules ================="
114outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Module\">"
115choices[$((choicescount++))]="<choice\n\tid=\"Module\"\n\ttitle=\"Module_title\"\n\tdescription=\"Module_description\"\n>\n</choice>\n"
116((xmlindent++))
117packagesidentity="org.chameleon.module"
118modules=($( find "${pkgroot}/Scripts/Modules" -type d -depth 1 -not -name '.svn' ))
119for (( i = 0 ; i < ${#modules[@]} ; i++ ))
120do
121mkdir -p "${1}/${modules[$i]##*/}/Root"
122mkdir -p "${1}/${modules[$i]##*/}/Scripts"
123ditto --noextattr --noqtn "${modules[$i]}/postinstall" "${1}/${modules[$i]##*/}/Scripts/postinstall"
124echo "[BUILD] ${modules[$i]##*/} "
125buildpackage "${1}/${modules[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
126rm -R -f "${1}/${i##*/}"
127done
128((xmlindent--))
129outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
130# End build Modules packages
131
132((xmlindent--))
133outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
134# End build Chameleon package
135
136# build Extras package
137echo "================= Extras ================="
138outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Extras\">"
139choices[$((choicescount++))]="<choice\n\tid=\"Extras\"\n\ttitle=\"Extras_title\"\n\tdescription=\"Extras_description\"\n>\n</choice>\n"
140((xmlindent++))
141packagesidentity="org.chameleon.extras.com"
142
143# build utility package
144outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Utility\">"
145choices[$((choicescount++))]="<choice\n\tid=\"Utility\"\n\ttitle=\"Utility_title\"\n\tdescription=\"Utility_description\"\n>\n</choice>\n"
146((xmlindent++))
147packagesidentity="org.chameleon.utility.com"
148
149# build package for Chameleon PrefPanel
150mkdir -p "${1}/PrefPanel/Root"
151ditto --noextattr --noqtn "${pkgroot}/Configuration/PrefPanel/Chameleon.prefPane" "${1}/PrefPanel/Root"
152echo "[BUILD] Chameleon Preference Panel "
153buildpackage "${1}/PrefPanel" "/Library/PreferencePanes/Chameleon.prefPane" "" "start_selected=\"false\"" >/dev/null 2>&1
154# End build package for Chameleon PrefPanel
155
156# build package for SMBIOSDefault
157mkdir -p "${1}/SMBIOSDefault/Root"
158ditto --noextattr --noqtn "${pkgroot}/Configuration/SMBIOSDefault/smbios.plist" "${1}/SMBIOSDefault/Root"
159echo "[BUILD] SMBIOSDefault "
160buildpackage "${1}/SMBIOSDefault" "/Extra/Example" "" "start_selected=\"false\"" >/dev/null 2>&1
161# End build package for SMBIOSDefault
162
163# build package for EFIMounter
164mkdir -p "${1}/EFIMounter/Root"
165ditto --noextattr --noqtn "${pkgroot}/Configuration/EFIMounter/EFI Mounter.app" "${1}/EFIMounter/Root"
166echo "[BUILD] EFIMounter "
167buildpackage "${1}/EFIMounter" "/Applications/EFI Mounter.app" "" "start_selected=\"false\"" >/dev/null 2>&1
168# End build package for EFIMounter
169
170# build package for Documentation
171mkdir -p "${1}/Documentation/Root"
172cp -f ${pkgroot}/doc/BootHelp.txt ${1}/Documentation/Root
173cp -f ${pkgroot}/doc/README ${1}/Documentation/Root
174cp -f ${pkgroot}/doc/Users_Guide0.5.pdf ${1}/Documentation/Root
175echo "[BUILD] Documentation "
176buildpackage "${1}/Documentation" "/Library/Documentation/Chameleon2RC5" "" "start_selected=\"false\"" >/dev/null 2>&1
177# End build package for Documentation
178
179((xmlindent--))
180outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
181# End utility package
182
183# build options packages
184echo "================= Options ================="
185outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Options\">"
186choices[$((choicescount++))]="<choice\n\tid=\"Options\"\n\ttitle=\"Options_title\"\n\tdescription=\"Options_description\"\n>\n</choice>\n"
187((xmlindent++))
188
189# build base options packages
190packagesidentity="org.chameleon.options.com"
191
192options=($( find "${pkgroot}/Scripts/BaseOptions" -type d -depth 1 -not -name '.svn' ))
193for (( i = 0 ; i < ${#options[@]} ; i++ ))
194do
195mkdir -p "${1}/${options[$i]##*/}/Root"
196mkdir -p "${1}/${options[$i]##*/}/Scripts"
197ditto --noextattr --noqtn "${options[$i]}/postinstall" "${1}/${options[$i]##*/}/Scripts/postinstall"
198echo "[BUILD] ${options[$i]##*/} "
199buildpackage "${1}/${options[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
200done
201# End build base options packages
202
203# build resolution packages
204echo "================= Res. Options ================="
205outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Resolution\">"
206choices[$((choicescount++))]="<choice\n\tid=\"Resolution\"\n\ttitle=\"Resolution_title\"\n\tdescription=\"Resolution_description\"\n>\n</choice>\n"
207((xmlindent++))
208packagesidentity="org.chameleon.resolution"
209resolutions=($( find "${pkgroot}/Scripts/Resolutions" -type d -depth 1 -not -name '.svn' ))
210for (( i = 0 ; i < ${#resolutions[@]} ; i++ ))
211do
212mkdir -p "${1}/${resolutions[$i]##*/}/Root/"
213mkdir -p "${1}/${resolutions[$i]##*/}/Scripts/"
214ditto --noextattr --noqtn "${resolutions[$i]}/postinstall" "${1}/${resolutions[$i]##*/}/Scripts/postinstall"
215echo "[BUILD] ${resolutions[$i]##*/} "
216buildpackage "${1}/${resolutions[$i]##*/}" "/tmpcham" "" "start_selected=\"false\"" >/dev/null 2>&1
217done
218
219((xmlindent--))
220outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
221# End build resolution packages
222
223# build Advanced packages
224echo "================= Adv. Options ================="
225outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Advanced\">"
226choices[$((choicescount++))]="<choice\n\tid=\"Advanced\"\n\ttitle=\"Advanced_title\"\n\tdescription=\"Advanced_description\"\n>\n</choice>\n"
227((xmlindent++))
228
229packagesidentity="org.chameleon.advanced.options.pkg"
230optionsadv=($( find "${pkgroot}/Scripts/Advanced" -type d -depth 1 -not -name '.svn' ))
231for (( i = 0 ; i < ${#optionsadv[@]} ; i++ ))
232do
233mkdir -p "${1}/${optionsadv[$i]##*/}/Root"
234mkdir -p "${1}/${optionsadv[$i]##*/}/Scripts"
235ditto --noextattr --noqtn "${optionsadv[$i]}/postinstall" "${1}/${optionsadv[$i]##*/}/Scripts/postinstall"
236echo "[BUILD] ${optionsadv[$i]##*/} "
237buildpackage "${1}/${optionsadv[$i]##*/}" "/" "" "start_selected=\"false\"" >/dev/null 2>&1
238done
239
240((xmlindent--))
241outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
242# End build Advanced packages
243
244((xmlindent--))
245outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
246
247# End build options packages
248
249# build theme packages
250echo "================= Themes ================="
251outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Themes\">"
252choices[$((choicescount++))]="<choice\n\tid=\"Themes\"\n\ttitle=\"Themes_title\"\n\tdescription=\"Themes_description\"\n>\n</choice>\n"
253((xmlindent++))
254packagesidentity="org.chameleon.theme.pkg"
255artwork="${1%/*}"
256themes=($( find "${artwork%/*}/artwork/themes" -type d -depth 1 -not -name '.svn' ))
257for (( i = 0 ; i < ${#themes[@]} ; i++ ))
258do
259theme=$( echo ${themes[$i]##*/} | awk 'BEGIN{OFS=FS=""}{$1=toupper($1);print}' )
260mkdir -p "${1}/${theme}/Root/"
261 rsync -r --exclude=.svn "${themes[$i]}" "${1}/${themes[$i]##*/}/Root/${theme}"
262 # #### Comment out thx meklort
263 # ditto --noextattr --noqtn "${themes[$i]}" "${1}/${themes[$i]##*/}/Root/${theme}"
264 # ####
265 find "${1}/${themes[$i]##*/}" -name '.DS_Store' -or -name '.svn' -exec rm -R {} \+
266find "${1}/${themes[$i]##*/}" -type f -exec chmod 644 {} \+
267echo "[BUILD] ${themes[$i]##*/} "
268buildpackage "${1}/${theme}" "/Extra/Themes" "" "start_selected=\"false\"" >/dev/null 2>&1
269rm -R -f "${1}/${i##*/}"
270done
271
272((xmlindent--))
273outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
274# End build theme packages
275
276# build kext packages
277echo "================= Kexts ================="
278outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Kexts\">"
279choices[$((choicescount++))]="<choice\n\tid=\"Kexts\"\n\ttitle=\"Kexts_title\"\n\tdescription=\"Kexts_description\"\n>\n</choice>\n"
280((xmlindent++))
281packagesidentity="org.chameleon.kext.pkg"
282kexts=($( find "${pkgroot}/Kexts" -type d -name '*.kext' -depth 1 ))
283for (( i = 0 ; i < ${#kexts[@]} ; i++ ))
284do
285filename="${kexts[$i]##*/}"
286mkdir -p "${1}/${filename%.kext}/Root"
287ditto --noextattr --noqtn --arch i386 "${kexts[$i]}" "${1}/${filename%.kext}/Root/${filename}"
288find "${1}/${filename%.kext}" -name '.DS_Store' -or -name '.svn' -exec rm -R -f {} \; 2>/dev/null
289fixperms "${1}/${filename%.kext}/Root"
290chown 501:20 "${1}/${filename%.kext}/Root"
291echo "[BUILD] ${filename%.kext} "
292buildpackage "${1}/${filename%.kext}" "/Extra/Extensions" "" "start_selected=\"false\"" >/dev/null 2>&1
293rm -R -f "${1}/${filename%.kext}"
294done
295((xmlindent--))
296outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
297# End build kext packages
298
299((xmlindent--))
300outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
301# End build Extras package
302
303# build post install package
304echo "================= Post ================="
305mkdir -p ${1}/Post/Root
306mkdir -p ${1}/Post/Scripts
307cp -f ${pkgroot}/Scripts/Post/* ${1}/Post/Scripts
308echo "[BUILD] Post "
309buildpackage "${1}/Post" "/" "" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
310outline[$((outlinecount++))]="${indent[$xmlindent]}</choices-outline>"
311
312# build meta package
313makedistribution "${1}" "${2}" "${3}" "${4}" "${5}"
314
315# clean up
316rm -R -f "${1}"
317
318}
319
320fixperms ()
321{
322# $1 path
323find "${1}" -type f -exec chmod 644 {} \;
324find "${1}" -type d -exec chmod 755 {} \;
325chown -R 0:0 "${1}"
326}
327
328buildpackage ()
329{
330# $1 Path to package to build containing Root and or Scripts
331# $2 Install Location
332# $3 Size
333# $4 Options
334
335if [ -d "${1}/Root" ] && [ "${1}/Scripts" ]; then
336
337local packagename="${1##*/}"
338local identifier=$( echo ${packagesidentity}.${packagename//_/.} | tr [:upper:] [:lower:] )
339find "${1}" -name '.DS_Store' -delete
340local filecount=$( find "${1}/Root" | wc -l )
341if [ "${3}" ]; then
342local installedsize="${3}"
343else
344local installedsize=$( du -hkc "${1}/Root" | tail -n1 | awk {'print $1'} )
345fi
346local header="<?xml version=\"1.0\"?>\n<pkg-info format-version=\"2\" "
347
348#[ "${3}" == "relocatable" ] && header+="relocatable=\"true\" "
349
350header+="identifier=\"${identifier}\" "
351header+="version=\"${version}\" "
352
353[ "${2}" != "relocatable" ] && header+="install-location=\"${2}\" "
354
355header+="auth=\"root\">\n"
356header+="\t<payload installKBytes=\"${installedsize##* }\" numberOfFiles=\"${filecount##* }\"/>\n"
357rm -R -f "${1}/Temp"
358
359[ -d "${1}/Temp" ] || mkdir -m 777 "${1}/Temp"
360[ -d "${1}/Root" ] && mkbom "${1}/Root" "${1}/Temp/Bom"
361
362if [ -d "${1}/Scripts" ]; then
363header+="\t<scripts>\n"
364for script in $( find "${1}/Scripts" -type f \( -name 'pre*' -or -name 'post*' \) )
365do
366header+="\t\t<${script##*/} file=\"./${script##*/}\"/>\n"
367done
368header+="\t</scripts>\n"
369chown -R 0:0 "${1}/Scripts"
370pushd "${1}/Scripts" >/dev/null
371find . -print | cpio -o -z -H cpio > "../Temp/Scripts"
372popd >/dev/null
373fi
374
375header+="</pkg-info>"
376echo -e "${header}" > "${1}/Temp/PackageInfo"
377pushd "${1}/Root" >/dev/null
378find . -print | cpio -o -z -H cpio > "../Temp/Payload"
379popd >/dev/null
380pushd "${1}/Temp" >/dev/null
381
382xar -c -f "${1%/*}/${packagename// /}.pkg" --compression none .
383
384popd >/dev/null
385
386outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"${packagename// /}\"/>"
387
388if [ "${4}" ]; then
389local choiceoptions="${indent[$xmlindent]}${4}\n"
390fi
391choices[$((choicescount++))]="<choice\n\tid=\"${packagename// /}\"\n\ttitle=\"${packagename}_title\"\n\tdescription=\"${packagename}_description\"\n${choiceoptions}>\n\t<pkg-ref id=\"${identifier}\" installKBytes='${installedsize}' version='${version}.0.0.${timestamp}' auth='root'>#${packagename// /}.pkg</pkg-ref>\n</choice>\n"
392
393rm -R -f "${1}"
394fi
395}
396
397makedistribution ()
398{
399rm -f "${1%/*}/${packagename// /}"*.pkg
400
401find "${1}" -type f -name '*.pkg' -depth 1 | while read component
402do
403mkdir -p "${1}/${packagename}/${component##*/}"
404pushd "${1}/${packagename}/${component##*/}" >/dev/null
405xar -x -f "${1%}/${component##*/}"
406popd >/dev/null
407done
408
409ditto --noextattr --noqtn "${pkgroot}/Distribution" "${1}/${packagename}/Distribution"
410ditto --noextattr --noqtn "${pkgroot}/Resources" "${1}/${packagename}/Resources"
411
412find "${1}/${packagename}/Resources" -type d -name '.svn' -exec rm -R -f {} \; 2>/dev/null
413
414for (( i=0; i < ${#outline[*]} ; i++));
415do
416echo -e "${outline[$i]}" >> "${1}/${packagename}/Distribution"
417done
418
419for (( i=0; i < ${#choices[*]} ; i++));
420do
421echo -e "${choices[$i]}" >> "${1}/${packagename}/Distribution"
422done
423
424echo "</installer-gui-script>" >> "${1}/${packagename}/Distribution"
425
426perl -i -p -e "s/%CHAMELEONVERSION%/${version%%-*}/g" `find "${1}/${packagename}/Resources" -type f`
427perl -i -p -e "s/%CHAMELEONREVISION%/${revision}/g" `find "${1}/${packagename}/Resources" -type f`
428
429# Adding Package type test (not translated)
430#perl -i -p -e "s/%PKGTYPE%/TEST/g" `find "${1}/${packagename}/Resources" -type f`
431#
432
433# Adding Developer and credits
434perl -i -p -e "s/%DEVELOP%/${develop}/g" `find "${1}/${packagename}/Resources" -type f`
435perl -i -p -e "s/%CREDITS%/${credits}/g" `find "${1}/${packagename}/Resources" -type f`
436#
437
438stage=${stage/RC/Release Candidate }
439stage=${stage/FINAL/2.0 Final}
440perl -i -p -e "s/%CHAMELEONSTAGE%/${stage}/g" `find "${1}/${packagename}/Resources" -type f`
441
442find "${1}/${packagename}" -name '.DS_Store' -delete
443pushd "${1}/${packagename}" >/dev/null
444xar -c -f "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" --compression none .
445popd >/dev/null
446
447# Here is the place for assign a Icon to the pkg
448# command use to generate the file:
449# ditto -c -k --sequesterRsrc --keepParent Icon.icns Icon.zip
450 ditto -xk "${pkgroot}/Icons/pkg.zip" "${pkgroot}/Icons/"
451 DeRez -only icns "${pkgroot}/Icons/Icons/pkg.icns" > tempicns.rsrc
452 Rez -append tempicns.rsrc -o "${1%/*}/${packagename// /}-${version}-r${revision}.pkg"
453 SetFile -a C "${1%/*}/${packagename// /}-${version}-r${revision}.pkg"
454 rm -f tempicns.rsrc
455 rm -rf "${pkgroot}/Icons/Icons"
456# End
457
458md5=$( md5 "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" | awk {'print $4'} )
459echo "MD5 (${packagename// /}-${version}-r${revision}.pkg) = ${md5}" > "${1%/*}/${packagename// /}-${version}-r${revision}.pkg.md5"
460echo ""
461
462echo -e $COL_BLACK"--------------------------"$COL_RESET
463echo -e $COL_BLACK"Building process complete!"$COL_RESET
464echo -e $COL_BLACK"--------------------------"$COL_RESET
465echo ""
466echo -e $COL_BLACK"Build info."
467echo -e $COL_BLACK"==========="
468echo -e $COL_BLUE"Package name:"$COL_BLACK"$packagename-${version}-r$revision.pkg"$COL_RESET
469echo -e $COL_BLUE"MD5:"$COL_BLACK"$md5"$COL_RESET
470echo -e $COL_BLUE"Version:"$COL_BLACK"$version"$COL_RESET
471echo -e $COL_BLUE"Stage:"$COL_BLACK"$stage"$COL_RESET
472echo -e $COL_BLUE"Date/Time:"$COL_BLACK"$builddate"$COL_RESET
473echo ""
474
475}
476
477main "${1}" "${2}" "${3}" "${4}" "${5}"
478
479

Archive Download this file

Revision: 330