Chameleon

Chameleon Commit Details

Date:2011-10-03 18:07:53 (7 years 10 months ago)
Author:blackosx
Commit:1596
Parents: 1595
Message:Update slimpkg.sh to work with revised branch code.
Changes:
M/branches/blackosx/package/buildpkg.sh
M/branches/blackosx/package/Scripts/Main/Post/postinstall
M/branches/blackosx/package/slimpkg.sh

File differences

branches/blackosx/package/slimpkg.sh
88
99
1010
11
12
13
14
1115
1216
1317
......
2024
2125
2226
23
27
2428
2529
2630
2731
2832
2933
30
34
35
36
3137
32
33
34
35
3638
3739
3840
......
5052
5153
5254
53
54
55
55
56
57
5658
5759
5860
......
6163
6264
6365
64
6566
6667
67
68
69
70
71
72
73
7468
7569
7670
77
7871
7972
8073
8174
8275
8376
84
85
86
77
78
8779
8880
8981
......
9587
9688
9789
98
99
100
90
91
92
93
94
95
10196
10297
10398
10499
105100
106101
107
108
109
102
103
104
105
106
107
110108
111109
112110
......
114112
115113
116114
117
115
118116
117
118
119
120
119121
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
137138
138
139
140
141
142
143
144
145
139
140
141
142
143
144
145
146
146147
147
148
149
150
151
152
153
154
148
149
150
151
152
153
154
155
155156
156
157
158
159
160
161
162
163
157
158
159
160
161
162
163
164
165
164166
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
167
168
169
170
171
172
173
174
213175
176
177
178
179
180
181
182
183
184
185
214186
215187
216188
217189
218
190
191
192
193
219194
220195
221196
......
362337
363338
364339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
365355
366356
367357
pkgroot="${0%/*}"
# blackosx to use /usr/local as a place for temporary files
# taken from http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard#cite_note-27
chamTemp="usr/local/chamTemp"
COL_BLACK="\x1b[30;01m"
COL_RED="\x1b[31;01m"
COL_GREEN="\x1b[32;01m"
#version=$( grep I386BOOT_CHAMELEONVERSION vers.h | awk '{ print $3 }' | tr -d '\"' )
version=$( cat version )
stage=${version##*-}
stage=${version##*-}" (blackosx branch)"
revision=$( grep I386BOOT_CHAMELEONREVISION vers.h | awk '{ print $3 }' | tr -d '\"' )
builddate=$( grep I386BOOT_BUILDDATE vers.h | awk '{ print $3,$4 }' | tr -d '\"' )
timestamp=$( date -j -f "%Y-%m-%d %H:%M:%S" "${builddate}" "+%s" )
# =================
develop=" Crazor, Dense, fassl, fxtentacle, iNDi, JrCs, Kabyl, kaitek, mackerintel, mercurysquad, munky, Slice, meklort, mozodojo, rekursor, Turbo, cparm, valv & zef "
develop=$(awk "NR==6{print;exit}" ${pkgroot}/../CREDITS)
credits=$(awk "NR==10{print;exit}" ${pkgroot}/../CREDITS)
pkgdev=$(awk "NR==14{print;exit}" ${pkgroot}/../CREDITS)
credits=" andyvand, asereBLN, Azimut, bumby, cosmo1t, dfe, Galaxy, kalyway, Krazubu, MasterChief, netkas, sckevyn, smith@@, THeKiNG, DutchHockeyPro & Andy"
pkgdev=" blackosx, ErmaC , scrax"
# =================
distributioncount=0
rm -R -f "${1}"
echo ""
echo -e $COL_BLACK"---------------------"$COL_RESET
echo -e $COL_BLACK"Building Slim Package"$COL_RESET
echo -e $COL_BLACK"---------------------"$COL_RESET
echo -e $COL_CYAN"---------------------------------------"$COL_RESET
echo -e $COL_CYAN"Building $packagename Slim Install Package"$COL_RESET
echo -e $COL_CYAN"---------------------------------------"$COL_RESET
echo ""
outline[$((outlinecount++))]="${indent[$xmlindent]}<choices-outline>"
echo "================= Core ================="
((xmlindent++))
packagesidentity="org.chameleon.core"
mkdir -p ${1}/Core/Root/usr/sbin
mkdir -p ${1}/Core/Root/usr/local/bin
mkdir -p ${1}/Core/Root/usr/standalone/i386
# if [ "$(ls -A "${1%/*}/i386/modules")" ]; then
# echo "Modules found."
# mkdir -p ${1}/Core/Root/usr/standalone/i386/modules
# cp -R ${1%/*}/i386/modules ${1}/Core/Root/usr/standalone/i386
# else
# echo "No found modules into dir module"
# fi
ditto --noextattr --noqtn ${1%/*}/i386/boot ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot0 ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot0md ${1}/Core/Root/usr/standalone/i386
#ditto --noextattr --noqtn ${1%/*}/i386/boot0hf ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot1f32 ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot1h ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot1he ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot1hp ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/cdboot ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/chain0 ${1}/Core/Root/usr/standalone/i386
# fixperms "${1}/Core/Root/"
ditto --noextattr --noqtn ${1%/*}/i386/fdisk440 ${1}/Core/Root/usr/sbin
ditto --noextattr --noqtn ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/sbin
ditto --noextattr --noqtn ${1%/*}/i386/fdisk440 ${1}/Core/Root/usr/local/bin
ditto --noextattr --noqtn ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/local/bin
local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} )
echo "[BUILD] i386 "
buildpackage "${1}/Core" "/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
# build standard package
mkdir -p ${1}/Standard/Root
mkdir -p ${1}/Standard/Scripts/Tools
cp -f ${pkgroot}/Scripts/Standard/* ${1}/Standard/Scripts
# ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Tools/SetFile
mkdir -p ${1}/Standard/Scripts/Resources
cp -f ${pkgroot}/Scripts/Main/Standard/* ${1}/Standard/Scripts
cp -f ${pkgroot}/Scripts/Sub/* ${1}/Standard/Scripts
ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Resources/SetFile
ditto --noextattr --noqtn ${1%/*/*}/revision ${1}/Standard/Scripts/Resources/revision
ditto --noextattr --noqtn ${1%/*/*}/version ${1}/Standard/Scripts/Resources/version
echo "[BUILD] Standard "
buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" selected=\"exclusive(choices['EFI']) &amp;&amp; exclusive(choices['noboot'])\"" >/dev/null 2>&1
# End build standard package
# build efi package
mkdir -p ${1}/EFI/Root
mkdir -p ${1}/EFI/Scripts/Tools
cp -f ${pkgroot}/Scripts/EFI/* ${1}/EFI/Scripts
# ditto --arch i386 `which SetFile` ${1}/EFI/Scripts/Tools/SetFile
mkdir -p ${1}/EFI/Scripts/Resources
cp -f ${pkgroot}/Scripts/Main/EFI/* ${1}/EFI/Scripts
cp -f ${pkgroot}/Scripts/Sub/* ${1}/EFI/Scripts
ditto --arch i386 `which SetFile` ${1}/EFI/Scripts/Resources/SetFile
ditto --noextattr --noqtn ${1%/*/*}/revision ${1}/EFI/Scripts/Resources/revision
ditto --noextattr --noqtn ${1%/*/*}/version ${1}/EFI/Scripts/Resources/version
echo "[BUILD] EFI "
buildpackage "${1}/EFI" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['noboot'])\"" >/dev/null 2>&1
# End build efi package
# build reset choice package
mkdir -p ${1}/noboot/Root
echo "[BUILD] Reset choice "
buildpackage "${1}/noboot" "/tmpcham" "" "start_visible=\"true\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['EFI'])\"" >/dev/null 2>&1
buildpackage "${1}/noboot" "/$chamTemp" "" "start_visible=\"true\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) &amp;&amp; exclusive(choices['EFI'])\"" >/dev/null 2>&1
# End build reset choice package
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build Chameleon package
# build Modules package
echo "================= Modules ================="
###############################
# AMDGraphicsEnabler.dylib #
# ATiGraphicsEnabler.dylib #
# IntelGraphicsEnabler.dylib #
# klibc.dylib #
# NVIDIAGraphicsEnabler.dylib #
# Resolution.dylib #
# uClibcxx.dylib #
###############################
if [ "$(ls -A "${1%/*}/i386/modules")" ]; then
{
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Module\">"
choices[$((choicescount++))]="<choice\n\tid=\"Module\"\n\ttitle=\"Module_title\"\n\tdescription=\"Module_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.module"
# build Modules package
echo "================= Modules ================="
###############################
# Supported Modules #
###############################
# klibc.dylib #
# Resolution.dylib #
# uClibcxx.dylib #
# Keylayout.dylib #
###############################
if [ "$(ls -A "${1%/*}/i386/modules")" ]; then
{
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Module\">"
choices[$((choicescount++))]="<choice\n\tid=\"Module\"\n\ttitle=\"Module_title\"\n\tdescription=\"Module_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.modules"
# -
if [ -e ${1%/*}/i386/modules/AMDGraphicsEnabler.dylib ]; then
{
mkdir -p ${1}/AMDGraphicsEnabler/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/AMDGraphicsEnabler.dylib ${1}/AMDGraphicsEnabler/Root
echo "[BUILD] AMDGraphicsEnabler "
buildpackage "${1}/AMDGraphicsEnabler" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
if [ -e ${1%/*}/i386/modules/klibc.dylib ]; then
{
mkdir -p ${1}/klibc/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/klibc/Root
echo "[BUILD] klibc "
buildpackage "${1}/klibc" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
# -
if [ -e ${1%/*}/i386/modules/ATiGraphicsEnabler.dylib ]; then
{
mkdir -p ${1}/ATiGraphicsEnabler/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/ATiGraphicsEnabler.dylib ${1}/ATiGraphicsEnabler/Root
echo "[BUILD] ATiGraphicsEnabler "
buildpackage "${1}/ATiGraphicsEnabler" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
if [ -e ${1%/*}/i386/modules/Resolution.dylib ]; then
{
mkdir -p ${1}/AutoReso/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/Resolution.dylib ${1}/AutoReso/Root
echo "[BUILD] Resolution "
buildpackage "${1}/AutoReso" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
# -
if [ -e ${1%/*}/i386/modules/IntelGraphicsEnabler.dylib ]; then
{
mkdir -p ${1}/IntelGraphicsEnabler/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/IntelGraphicsEnabler.dylib ${1}/IntelGraphicsEnabler/Root
echo "[BUILD] IntelGraphicsEnabler "
buildpackage "${1}/IntelGraphicsEnabler" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
if [ -e ${1%/*}/i386/modules/uClibcxx.dylib ]; then
{
mkdir -p ${1}/uClibc/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/uClibcxx.dylib ${1}/uClibc/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/uClibc/Root
echo "[BUILD] uClibc++ "
buildpackage "${1}/uClibc" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
# -
if [ -e ${1%/*}/i386/modules/klibc.dylib ]; then
{
mkdir -p ${1}/klibc/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/klibc/Root
echo "[BUILD] klibc "
buildpackage "${1}/klibc" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
# -
if [ -e ${1%/*}/i386/modules/NVIDIAGraphicsEnabler.dylib ]; then
{
mkdir -p ${1}/NVIDIAGraphicsEnabler/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/NVIDIAGraphicsEnabler.dylib ${1}/NVIDIAGraphicsEnabler/Root
echo "[BUILD] NVIDIAGraphicsEnabler "
buildpackage "${1}/NVIDIAGraphicsEnabler" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
# -
if [ -e ${1%/*}/i386/modules/Resolution.dylib ]; then
{
mkdir -p ${1}/AutoReso/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/Resolution.dylib ${1}/AutoReso/Root
echo "[BUILD] Resolution "
buildpackage "${1}/AutoReso" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
# -
if [ -e ${1%/*}/i386/modules/uClibcxx.dylib ]; then
{
mkdir -p ${1}/uClibc/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/uClibcxx.dylib ${1}/uClibc/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/uClibc/Root
echo "[BUILD] uClibc++ "
buildpackage "${1}/uClibc" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
}
else
{
echo " -= no modules to include =-"
}
fi
# End build Modules packages
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
# End build Chameleon package
if [ -e ${1%/*}/i386/modules/Keylayout.dylib ]; then
{
mkdir -p ${1}/Keylayout/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/Keylayout.dylib ${1}/Keylayout/Root
echo "[BUILD] Keylayout "
buildpackage "${1}/Keylayout" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
}
else
{
echo " -= no modules to include =-"
}
fi
# End build Modules packages
# build post install package
echo "================= Post ================="
mkdir -p ${1}/Post/Root
mkdir -p ${1}/Post/Scripts
cp -f ${pkgroot}/Scripts/Post/* ${1}/Post/Scripts
cp -f ${pkgroot}/Scripts/Main/Post/* ${1}/Post/Scripts
cp -f ${pkgroot}/Scripts/Sub/InstallLog.sh ${1}/Post/Scripts
ditto --noextattr --noqtn ${1%/*/*}/revision ${1}/Post/Scripts/Resources/revision
ditto --noextattr --noqtn ${1%/*/*}/version ${1}/Post/Scripts/Resources/version
echo "[BUILD] Post "
buildpackage "${1}/Post" "/" "" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
outline[$((outlinecount++))]="${indent[$xmlindent]}</choices-outline>"
rm -rf "${pkgroot}/Icons/Icons"
# End
echo ""
echo -e $COL_GREEN"--------------------------"$COL_RESET
echo -e $COL_GREEN"Building process complete!"$COL_RESET
echo -e $COL_GREEN"--------------------------"$COL_RESET
echo ""
echo -e $COL_GREEN"Build info."
echo -e $COL_GREEN"==========="
echo -e $COL_BLUE"Package name:"$COL_RESET"$packagename-${version}-r$revision.pkg"
echo -e $COL_BLUE"MD5:"$COL_RESET"$md5"
echo -e $COL_BLUE"Version:"$COL_RESET"$version"
echo -e $COL_BLUE"Stage:"$COL_RESET"$stage"
echo -e $COL_BLUE"Date/Time:"$COL_RESET"$builddate"
echo ""
}
main "${1}" "${2}" "${3}" "${4}" "${5}"
branches/blackosx/package/Scripts/Main/Post/postinstall
8787
8888
8989
90
91
92
90
91
9392
94
95
96
97
98
99
93
94
95
10096
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
118137
119138
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135139
136140
137141
# in /usr/local/chamTemp/options/
# for example. Boot Banner=Yes
# Create template for org.chameleon.Boot.plist"
tempOCBP="$chamTemp"/Extra/org.chameleon.Boot.plist
cp "$4"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist "$tempOCBP"
# Are there any options to build?
if [ "$(ls -A ${chamTemp}/options )" ]; then
# Read list of all boot options the user added.
arrayCount=0
kernelFlagCount=0
while read FILE
do
options[arrayCount]="${FILE##*/}"
# Create template for org.chameleon.Boot.plist"
tempOCBP="$chamTemp"/Extra/org.chameleon.Boot.plist
cp "$4"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist "$tempOCBP"
# Check keyRead for 'KF' at beginning to
# indicate that should be a kernel flag
if [ ${options[arrayCount]:0:2} = "KF" ];then
# plistbuddy only add's if the key doesn't already exist.
# once we reach the end of the options list.
kernelflag[kernelFlagCount]="${options[arrayCount]##*flag=}"
"$scriptDir"InstallLog.sh "${dest_vol}" "Added kernel flag: ${kernelflag[kernelFlagCount]}"
(( kernelFlagCount++ ))
else
keyRead="${options[$arrayCount]%=*}"
value="${options[$arrayCount]#*=}"
# escape any spaces
keyToUse=$( echo $keyRead | sed 's/ /\\ /g' )
if [ "${keyToUse}" != "DONT" ] && [ "${value}" != "USE" ]; then
sudo /usr/libexec/plistbuddy -c "Add :${keyToUse} string ${value}" "$tempOCBP"
"$scriptDir"InstallLog.sh "${dest_vol}" "Added boot option: ${keyRead}=${value}"
# Read list of all boot options the user added.
arrayCount=0
kernelFlagCount=0
while read FILE
do
options[arrayCount]="${FILE##*/}"
# Check keyRead for 'KF' at beginning to
# indicate that should be a kernel flag
if [ ${options[arrayCount]:0:2} = "KF" ];then
# plistbuddy only add's if the key doesn't already exist.
# once we reach the end of the options list.
kernelflag[kernelFlagCount]="${options[arrayCount]##*flag=}"
"$scriptDir"InstallLog.sh "${dest_vol}" "Added kernel flag: ${kernelflag[kernelFlagCount]}"
(( kernelFlagCount++ ))
else
keyRead="${options[$arrayCount]%=*}"
value="${options[$arrayCount]#*=}"
# escape any spaces
keyToUse=$( echo $keyRead | sed 's/ /\\ /g' )
if [ "${keyToUse}" != "DONT" ] && [ "${value}" != "USE" ]; then
sudo /usr/libexec/plistbuddy -c "Add :${keyToUse} string ${value}" "$tempOCBP"
"$scriptDir"InstallLog.sh "${dest_vol}" "Added boot option: ${keyRead}=${value}"
fi
fi
(( arrayCount++ ))
done < <(ls "${chamTemp}"/options )
if [ $kernelFlagCount -gt 0 ]; then
# Add kernel flags
for (( i=0 ; i < $kernelFlagCount ; i++ ))
do
# Add any kernel flags together in to one string.
kernelFlagString="${kernelFlagString} ${kernelflag[i]}"
done
sudo /usr/libexec/plistbuddy -c "Add :Kernel\ Flags string $kernelFlagString" "$tempOCBP"
if [ ${returnValue}=1 ]; then # key already exists.
sudo /usr/libexec/plistbuddy -c "Delete :Kernel\ Flags" "$tempOCBP"
sudo /usr/libexec/plistbuddy -c "Add :Kernel\ Flags string $kernelFlagString" "$tempOCBP"
fi
fi
(( arrayCount++ ))
done < <(ls "${chamTemp}"/options )
if [ $kernelFlagCount -gt 0 ]; then
# Add kernel flags
for (( i=0 ; i < $kernelFlagCount ; i++ ))
do
# Add any kernel flags together in to one string.
kernelFlagString="${kernelFlagString} ${kernelflag[i]}"
done
sudo /usr/libexec/plistbuddy -c "Add :Kernel\ Flags string $kernelFlagString" "$tempOCBP"
if [ ${returnValue}=1 ]; then # key already exists.
sudo /usr/libexec/plistbuddy -c "Delete :Kernel\ Flags" "$tempOCBP"
sudo /usr/libexec/plistbuddy -c "Add :Kernel\ Flags string $kernelFlagString" "$tempOCBP"
fi
fi
# ---------------------------------------------
branches/blackosx/package/buildpkg.sh
3434
3535
3636
37
3738
3839
3940
......
119120
120121
121122
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
137138
138
139
140
141
142
143
144
145
139
140
141
142
143
144
145
146
146147
147
148
149
150
151
152
153
154
148
149
150
151
152
153
154
155
155156
156
157
158
159
160
161
162
163
164
157
158
159
160
161
162
163
164
165
165166
166
167
168
169
170
171
172
173
167
168
169
170
171
172
173
174
174175
175
176
177
178
179
180
181
182
183
176
177
178
179
180
181
182
183
184
184185
185186
186187
......
449450
450451
451452
452
453453
454454
455455
develop=$(awk "NR==6{print;exit}" ${pkgroot}/../CREDITS)
credits=$(awk "NR==10{print;exit}" ${pkgroot}/../CREDITS)
pkgdev=$(awk "NR==14{print;exit}" ${pkgroot}/../CREDITS)
# =================
distributioncount=0
# End build Chameleon package
# build Modules package
echo "================= Modules ================="
###############################
# Supported Modules #
###############################
# klibc.dylib #
# Resolution.dylib #
# uClibcxx.dylib #
# Keylayout.dylib #
###############################
if [ "$(ls -A "${1%/*}/i386/modules")" ]; then
{
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Module\">"
choices[$((choicescount++))]="<choice\n\tid=\"Module\"\n\ttitle=\"Module_title\"\n\tdescription=\"Module_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.modules"
echo "================= Modules ================="
###############################
# Supported Modules #
###############################
# klibc.dylib #
# Resolution.dylib #
# uClibcxx.dylib #
# Keylayout.dylib #
###############################
if [ "$(ls -A "${1%/*}/i386/modules")" ]; then
{
outline[$((outlinecount++))]="${indent[$xmlindent]}\t<line choice=\"Module\">"
choices[$((choicescount++))]="<choice\n\tid=\"Module\"\n\ttitle=\"Module_title\"\n\tdescription=\"Module_description\"\n>\n</choice>\n"
((xmlindent++))
packagesidentity="org.chameleon.modules"
# -
if [ -e ${1%/*}/i386/modules/klibc.dylib ]; then
{
mkdir -p ${1}/klibc/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/klibc/Root
echo "[BUILD] klibc "
buildpackage "${1}/klibc" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
if [ -e ${1%/*}/i386/modules/klibc.dylib ]; then
{
mkdir -p ${1}/klibc/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/klibc/Root
echo "[BUILD] klibc "
buildpackage "${1}/klibc" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
# -
if [ -e ${1%/*}/i386/modules/Resolution.dylib ]; then
{
mkdir -p ${1}/AutoReso/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/Resolution.dylib ${1}/AutoReso/Root
echo "[BUILD] Resolution "
buildpackage "${1}/AutoReso" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
if [ -e ${1%/*}/i386/modules/Resolution.dylib ]; then
{
mkdir -p ${1}/AutoReso/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/Resolution.dylib ${1}/AutoReso/Root
echo "[BUILD] Resolution "
buildpackage "${1}/AutoReso" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
# -
if [ -e ${1%/*}/i386/modules/uClibcxx.dylib ]; then
{
mkdir -p ${1}/uClibc/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/uClibcxx.dylib ${1}/uClibc/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/uClibc/Root
echo "[BUILD] uClibc++ "
buildpackage "${1}/uClibc" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
if [ -e ${1%/*}/i386/modules/uClibcxx.dylib ]; then
{
mkdir -p ${1}/uClibc/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/uClibcxx.dylib ${1}/uClibc/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/uClibc/Root
echo "[BUILD] uClibc++ "
buildpackage "${1}/uClibc" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
# -
if [ -e ${1%/*}/i386/modules/Keylayout.dylib ]; then
{
mkdir -p ${1}/Keylayout/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/Keylayout.dylib ${1}/Keylayout/Root
echo "[BUILD] Keylayout "
buildpackage "${1}/Keylayout" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
if [ -e ${1%/*}/i386/modules/Keylayout.dylib ]; then
{
mkdir -p ${1}/Keylayout/Root
ditto --noextattr --noqtn ${1%/*}/i386/modules/Keylayout.dylib ${1}/Keylayout/Root
echo "[BUILD] Keylayout "
buildpackage "${1}/Keylayout" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
}
fi
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
}
else
{
echo " -= no modules to include =-"
}
fi
# End build Modules packages
((xmlindent--))
outline[$((outlinecount++))]="${indent[$xmlindent]}\t</line>"
}
else
{
echo " -= no modules to include =-"
}
fi
# End build Modules packages
# build Extras package
fi
header+="</pkg-info>"
echo -e "${header}" >> ~/Desktop/header
echo -e "${header}" > "${1}/Temp/PackageInfo"
pushd "${1}/Root" >/dev/null
find . -print | cpio -o -z -H cpio > "../Temp/Payload"

Archive Download the corresponding diff file

Revision: 1596