clarify the purpose of this project
[nyanglibc.git] / install_runtime.sh
blob8d29c88262496c937372ccd86eb62170ea24d1a8
1 #!/bin/sh
2 set -e
3 ################################################################################
4 #### CONFIGURATION
5 destdir=
6 prefix=/nyan/glibc/nyan/1
7 user_id=0
8 group_id=0
9 ################################################################################
10 build_dir=$(readlink -f .)
11 printf "BUILD_DIR=$build_dir\n"
13 mkdir -p $destdir$prefix
15 #ELF loader, isolate it or linking conflict may happen.
16 mkdir -p $destdir$prefix/lib64
17 cp -f $build_dir/elf/ld-linux-x86-64.so.2 $destdir$prefix/lib64
18 chmod 755 $destdir$prefix/lib64/ld-linux-x86-64.so.2
20 #libc
21 mkdir -p $destdir$prefix/lib
22 cp -f $build_dir/libc.so $destdir$prefix/lib/libc-2.33.so
23 chmod 755 $destdir$prefix/lib/libc-2.33.so
24 ln -sTf libc-2.33.so $destdir$prefix/lib/libc.so.6
26 #libdl
27 mkdir -p $destdir$prefix/lib
28 cp -f $build_dir/dlfcn/libdl/libdl.so $destdir$prefix/lib/libdl-2.33.so
29 chmod 755 $destdir$prefix/lib/libdl-2.33.so
30 ln -sTf libdl-2.33.so $destdir$prefix/lib/libdl.so.2
32 #libpthread
33 mkdir -p $destdir$prefix/lib
34 cp -f $build_dir/nptl/libpthread.so $destdir$prefix/lib/libpthread-2.33.so
35 chmod 755 $destdir$prefix/lib/libpthread-2.33.so
36 ln -sTf libpthread-2.33.so $destdir$prefix/lib/libpthread.so.0
38 #librt
39 mkdir -p $destdir$prefix/lib
40 cp -f $build_dir/rt/librt.so $destdir$prefix/lib/librt-2.33.so
41 chmod 755 $destdir$prefix/lib/librt-2.33.so
42 ln -sTf librt-2.33.so $destdir$prefix/lib/librt.so.1
44 #libcrypt
45 mkdir -p $destdir$prefix/lib
46 cp -f $build_dir/crypt/libcrypt.so $destdir$prefix/lib/libcrypt-2.33.so
47 chmod 755 $destdir$prefix/lib/libcrypt-2.33.so
48 ln -sTf libcrypt-2.33.so $destdir$prefix/lib/libcrypt.so.1
50 #libm
51 mkdir -p $destdir$prefix/lib
52 cp -f $build_dir/math/libm/libm.so $destdir$prefix/lib/libm-2.33.so
53 chmod 755 $destdir$prefix/lib/libm-2.33.so
54 ln -sTf libm-2.33.so $destdir$prefix/lib/libm.so.6
56 #libmvec
57 mkdir -p $destdir$prefix/lib
58 cp -f $build_dir/mathvec/libmvec.so $destdir$prefix/lib/libmvec-2.33.so
59 chmod 755 $destdir$prefix/lib/libmvec-2.33.so
60 ln -sTf libmvec-2.33.so $destdir$prefix/lib/libmvec.so.1
62 #libresolv
63 mkdir -p $destdir$prefix/lib
64 cp -f $build_dir/resolv/libresolv/libresolv.so $destdir$prefix/lib/libresolv-2.33.so
65 chmod 755 $destdir$prefix/lib/libresolv-2.33.so
66 ln -sTf libresolv-2.33.so $destdir$prefix/lib/libresolv.so.2
68 #libanl
69 mkdir -p $destdir$prefix/lib
70 cp -f $build_dir/resolv/libanl/libanl.so $destdir$prefix/lib/libanl-2.33.so
71 chmod 755 $destdir$prefix/lib/libanl-2.33.so
72 ln -sTf libanl-2.33.so $destdir$prefix/lib/libanl.so.1
73 #===============================================================================
74 # nss
75 mkdir -p $destdir$prefix/lib
76 cp -f $build_dir/resolv/libnss_dns/libnss_dns.so $destdir$prefix/lib/libnss_dns-2.33.so
77 chmod 755 $destdir$prefix/lib/libnss_dns-2.33.so
78 ln -sTf libnss_dns-2.33.so $destdir$prefix/lib/libnss_dns.so.2
80 cp -f $build_dir/nss/libnss_compat/libnss_compat.so $destdir$prefix/lib/libnss_compat-2.33.so
81 chmod 755 $destdir$prefix/lib/libnss_compat-2.33.so
82 ln -sTf libnss_compat-2.33.so $destdir$prefix/lib/libnss_compat.so.2
84 cp -f $build_dir/nss/libnss_db/libnss_db.so $destdir$prefix/lib/libnss_db-2.33.so
85 chmod 755 $destdir$prefix/lib/libnss_db-2.33.so
86 ln -sTf libnss_db-2.33.so $destdir$prefix/lib/libnss_db.so.2
88 cp -f $build_dir/nss/libnss_files/libnss_files.so $destdir$prefix/lib/libnss_files-2.33.so
89 chmod 755 $destdir$prefix/lib/libnss_files-2.33.so
90 ln -sTf libnss_files-2.33.so $destdir$prefix/lib/libnss_files.so.2
92 cp -f $build_dir/hesiod/libnss_hesiod.so $destdir$prefix/lib/libnss_hesiod-2.33.so
93 chmod 755 $destdir$prefix/lib/libnss_hesiod-2.33.so
94 ln -sTf libnss_hesiod-2.33.so $destdir$prefix/lib/libnss_hesiod.so.2
95 #===============================================================================
96 #libutil
97 mkdir -p $destdir$prefix/lib
98 cp -f $build_dir/login/libutil/libutil.so $destdir$prefix/lib/libutil-2.33.so
99 chmod 755 $destdir$prefix/lib/libutil-2.33.so
100 ln -sTf libutil-2.33.so $destdir$prefix/lib/libutil.so.1
102 #gconv modules: for the web and email until utf-8 is really there
103 mkdir -p $destdir$prefix/lib/gconv
104 cp -f $build_dir/gconv-modules $destdir$prefix/lib/gconv/gconv-modules
105 chmod 644 $destdir$prefix/lib/gconv/gconv-modules
106 gconv_modules="\
107 ANSI_X3.110.so \
108 ARMSCII-8.so \
109 ASMO_449.so \
110 BIG5.so \
111 BIG5HKSCS.so \
112 BRF.so \
113 CP10007.so \
114 CP1125.so \
115 CP1250.so \
116 CP1251.so \
117 CP1252.so \
118 CP1253.so \
119 CP1254.so \
120 CP1255.so \
121 CP1256.so \
122 CP1257.so \
123 CP1258.so \
124 CP737.so \
125 CP770.so \
126 CP771.so \
127 CP772.so \
128 CP773.so \
129 CP774.so \
130 CP775.so \
131 CP932.so \
132 CSN_369103.so \
133 CWI.so \
134 DEC-MCS.so \
135 EBCDIC-AT-DE-A.so \
136 EBCDIC-AT-DE.so \
137 EBCDIC-CA-FR.so \
138 EBCDIC-DK-NO-A.so \
139 EBCDIC-DK-NO.so \
140 EBCDIC-ES-A.so \
141 EBCDIC-ES-S.so \
142 EBCDIC-ES.so \
143 EBCDIC-FI-SE-A.so \
144 EBCDIC-FI-SE.so \
145 EBCDIC-FR.so \
146 EBCDIC-IS-FRISS.so \
147 EBCDIC-IT.so \
148 EBCDIC-PT.so \
149 EBCDIC-UK.so \
150 EBCDIC-US.so \
151 ECMA-CYRILLIC.so \
152 EUC-CN.so \
153 EUC-JISX0213.so \
154 EUC-JP-MS.so \
155 EUC-JP.so \
156 EUC-KR.so \
157 EUC-TW.so \
158 GB18030.so \
159 GBBIG5.so \
160 GBGBK.so \
161 GBK.so \
162 GEORGIAN-ACADEMY.so \
163 GEORGIAN-PS.so \
164 GOST_19768-74.so \
165 GREEK-CCITT.so \
166 GREEK7-OLD.so \
167 GREEK7.so \
168 HP-GREEK8.so \
169 HP-ROMAN8.so \
170 HP-ROMAN9.so \
171 HP-THAI8.so \
172 HP-TURKISH8.so \
173 IBM037.so \
174 IBM038.so \
175 IBM1004.so \
176 IBM1008.so \
177 IBM1008_420.so \
178 IBM1025.so \
179 IBM1026.so \
180 IBM1046.so \
181 IBM1047.so \
182 IBM1097.so \
183 IBM1112.so \
184 IBM1122.so \
185 IBM1123.so \
186 IBM1124.so \
187 IBM1129.so \
188 IBM1130.so \
189 IBM1132.so \
190 IBM1133.so \
191 IBM1137.so \
192 IBM1140.so \
193 IBM1141.so \
194 IBM1142.so \
195 IBM1143.so \
196 IBM1144.so \
197 IBM1145.so \
198 IBM1146.so \
199 IBM1147.so \
200 IBM1148.so \
201 IBM1149.so \
202 IBM1153.so \
203 IBM1154.so \
204 IBM1155.so \
205 IBM1156.so \
206 IBM1157.so \
207 IBM1158.so \
208 IBM1160.so \
209 IBM1161.so \
210 IBM1162.so \
211 IBM1163.so \
212 IBM1164.so \
213 IBM1166.so \
214 IBM1167.so \
215 IBM12712.so \
216 IBM1364.so \
217 IBM1371.so \
218 IBM1388.so \
219 IBM1390.so \
220 IBM1399.so \
221 IBM16804.so \
222 IBM256.so \
223 IBM273.so \
224 IBM274.so \
225 IBM275.so \
226 IBM277.so \
227 IBM278.so \
228 IBM280.so \
229 IBM281.so \
230 IBM284.so \
231 IBM285.so \
232 IBM290.so \
233 IBM297.so \
234 IBM420.so \
235 IBM423.so \
236 IBM424.so \
237 IBM437.so \
238 IBM4517.so \
239 IBM4899.so \
240 IBM4909.so \
241 IBM4971.so \
242 IBM500.so \
243 IBM5347.so \
244 IBM803.so \
245 IBM850.so \
246 IBM851.so \
247 IBM852.so \
248 IBM855.so \
249 IBM856.so \
250 IBM857.so \
251 IBM858.so \
252 IBM860.so \
253 IBM861.so \
254 IBM862.so \
255 IBM863.so \
256 IBM864.so \
257 IBM865.so \
258 IBM866.so \
259 IBM866NAV.so \
260 IBM868.so \
261 IBM869.so \
262 IBM870.so \
263 IBM871.so \
264 IBM874.so \
265 IBM875.so \
266 IBM880.so \
267 IBM891.so \
268 IBM901.so \
269 IBM902.so \
270 IBM903.so \
271 IBM9030.so \
272 IBM904.so \
273 IBM905.so \
274 IBM9066.so \
275 IBM918.so \
276 IBM921.so \
277 IBM922.so \
278 IBM930.so \
279 IBM932.so \
280 IBM933.so \
281 IBM935.so \
282 IBM937.so \
283 IBM939.so \
284 IBM943.so \
285 IBM9448.so \
286 IEC_P27-1.so \
287 INIS-8.so \
288 INIS-CYRILLIC.so \
289 INIS.so \
290 ISIRI-3342.so \
291 ISO-2022-CN-EXT.so \
292 ISO-2022-CN.so \
293 ISO-2022-JP-3.so \
294 ISO-2022-JP.so \
295 ISO-2022-KR.so \
296 ISO-IR-197.so \
297 ISO-IR-209.so \
298 ISO646.so \
299 ISO8859-1.so \
300 ISO8859-10.so \
301 ISO8859-11.so \
302 ISO8859-13.so \
303 ISO8859-14.so \
304 ISO8859-15.so \
305 ISO8859-16.so \
306 ISO8859-2.so \
307 ISO8859-3.so \
308 ISO8859-4.so \
309 ISO8859-5.so \
310 ISO8859-6.so \
311 ISO8859-7.so \
312 ISO8859-8.so \
313 ISO8859-9.so \
314 ISO8859-9E.so \
315 ISO_10367-BOX.so \
316 ISO_11548-1.so \
317 ISO_2033.so \
318 ISO_5427-EXT.so \
319 ISO_5427.so \
320 ISO_5428.so \
321 ISO_6937-2.so \
322 ISO_6937.so \
323 JOHAB.so \
324 KOI-8.so \
325 KOI8-R.so \
326 KOI8-RU.so \
327 KOI8-T.so \
328 KOI8-U.so \
329 LATIN-GREEK-1.so \
330 LATIN-GREEK.so \
331 MAC-CENTRALEUROPE.so \
332 MAC-IS.so \
333 MAC-SAMI.so \
334 MAC-UK.so \
335 MACINTOSH.so \
336 MIK.so \
337 NATS-DANO.so \
338 NATS-SEFI.so \
339 PT154.so \
340 RK1048.so \
341 SAMI-WS2.so \
342 SHIFT_JISX0213.so \
343 SJIS.so \
344 T.61.so \
345 TCVN5712-1.so \
346 TIS-620.so \
347 TSCII.so \
348 UHC.so \
349 UNICODE.so \
350 UTF-16.so \
351 UTF-32.so \
352 UTF-7.so \
353 VISCII.so \
354 libCNS.so \
355 libGB.so \
356 libISOIR165.so \
357 libJIS.so \
358 libJISX0213.so \
359 libKSC.so \
361 for m in $gconv_modules
363 cp -f $build_dir/iconvdata/$m $destdir$prefix/lib/gconv/$m
364 chmod 755 $destdir$prefix/lib/gconv/$m
365 done
367 # TODO: move this in install_troubleshooting
368 # troubleshooting (not strictly runtime)
369 mkdir -p $destdir$prefix/lib
370 cp -f $build_dir/debug/libSegFault/libSegFault.so $destdir$prefix/lib/libSegFault.so
371 chmod 755 $destdir$prefix/lib/libSegFault.so
372 cp -f $build_dir/debug/libpcprofile/libpcprofile.so $destdir$prefix/lib/libpcprofile.so
373 chmod 755 $destdir$prefix/lib/libpcprofile.so
374 cp -f $build_dir/malloc/libmemusage/libmemusage.so $destdir$prefix/lib/libmemusage.so
375 chmod 755 $destdir$prefix/lib/libmemusage.so
376 cp -f $build_dir/nptl_db/libthread_db.so $destdir$prefix/lib/libthread_db-1.0.so
377 chmod 755 $destdir$prefix/lib/libthread_db-1.0.so
378 ln -sTf libthread_db-1.0.so $destdir$prefix/lib/libthread_db.so.1
379 mkdir -p $destdir$prefix/lib/audit
380 cp -f $build_dir/elf/sotruss-lib.so $destdir$prefix/lib/audit/sotruss-lib.so
381 chmod 755 $destdir$prefix/lib/audit/sotruss-lib.so
383 #C.utf8 locale
384 mkdir -p $destdir$prefix/lib/locale
385 cp -f $build_dir/locale/locale-archive $destdir$prefix/lib/locale/locale-archive
386 chmod 644 $destdir$prefix/lib/locale/locale-archive
387 mkdir -p $destdir$prefix/share/locale
388 printf "en_US.UTF-8 C.UTF-8\n" >$destdir$prefix/share/locale/locale.alias
389 chmod 644 $destdir$prefix/share/locale/locale.alias
391 chown $user_id:$group_id -R $destdir$prefix || true