Chameleon

Chameleon Svn Source Tree

Root/trunk/package/buildpkg.sh

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

Archive Download this file

Revision: 1391