Contents of /trunk/mage/usr/lib/mage/smage2.sh
Parent Directory | Revision Log
Revision 90 -
(show annotations)
(download)
(as text)
Tue Jun 28 20:39:35 2005 UTC (19 years, 3 months ago) by niro
File MIME type: application/x-sh
File size: 14366 byte(s)
Tue Jun 28 20:39:35 2005 UTC (19 years, 3 months ago) by niro
File MIME type: application/x-sh
File size: 14366 byte(s)
fixed version number
1 | #!/bin/bash |
2 | |
3 | # compiles/installs .smage2 source install scripts |
4 | # needs pkgbuild_dir (mage) |
5 | |
6 | # SMAGE2 |
7 | # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.13 2005-06-28 20:39:35 niro Exp $ |
8 | |
9 | #01.10.2004 |
10 | # added ccache support |
11 | # added distcc support |
12 | |
13 | ## setup ## |
14 | SMAGEVERSION=0.3.6-r17 |
15 | PKGSUFFIX="mpk" |
16 | SMAGENAME="$1" |
17 | SMAGESUFFIX="smage2" |
18 | #SOURCEDIR="/bootstrap/sources" |
19 | #SMAGESCRIPTSDIR="/bootstrap/smage2-install-scripts" |
20 | #SMAGE2RSYNC="rsync://192.168.0.2/smage2-scripts" |
21 | MLIBDIR=/usr/lib/mage |
22 | |
23 | source /etc/mage.rc |
24 | |
25 | showversion() { |
26 | echo -en "Magellan Source Install v${SMAGEVERSION} " |
27 | echo -e "-- Niels Rogalla (niro@magellan-linux.de)" |
28 | } |
29 | |
30 | die() { |
31 | xtitleclean |
32 | echo "SMAGE failed: $@" |
33 | exit 1 |
34 | } |
35 | |
36 | xtitle() { |
37 | if [ ${TERM} == "xterm" ] |
38 | then |
39 | echo -ne "\033]0;[sMage: $@]\007" |
40 | fi |
41 | return 0 |
42 | } |
43 | |
44 | xtitleclean() { |
45 | if [ ${TERM} == "xterm" ] |
46 | then |
47 | echo -ne "\033]0;\007" |
48 | fi |
49 | return 0 |
50 | } |
51 | |
52 | syncsmage2() { |
53 | xtitle "Updating smage2-script tree ..." |
54 | local i |
55 | for i in ${SMAGE2RSYNC} |
56 | do |
57 | rsync \ |
58 | --recursive \ |
59 | --links \ |
60 | --perms \ |
61 | --times \ |
62 | --devices \ |
63 | --timeout=600 \ |
64 | --verbose \ |
65 | --compress \ |
66 | --progress \ |
67 | --stats \ |
68 | --delete \ |
69 | --delete-after \ |
70 | ${i} ${SMAGESCRIPTSDIR} |
71 | |
72 | if [ "$?" == "0" ] |
73 | then |
74 | break |
75 | else |
76 | continue |
77 | fi |
78 | |
79 | done |
80 | |
81 | #clean up backup files (foo~) |
82 | find ${SMAGESCRIPTSDIR} -name *~ -exec rm '{}' ';' |
83 | |
84 | xtitleclean |
85 | } |
86 | |
87 | # $1 filename |
88 | get_db_md5_sum() { |
89 | local DB_FILE |
90 | local MD5_FILE |
91 | local i |
92 | |
93 | DB_ENTRY="$(basename $1)" |
94 | MD5_FILE="${MD5DIR}/$(basename ${SMAGENAME} ${SMAGESUFFIX})" |
95 | |
96 | i="$(cat ${MD5_FILE}| grep ${DB_ENTRY} | cut -d' ' -f1)" |
97 | |
98 | echo "${i}" |
99 | } |
100 | |
101 | download_sources() { |
102 | |
103 | [ -z "${SRC_URI}" ] && echo -e "\nNothing declared to download.\n" && return 0 |
104 | |
105 | local EOA=${#SRC_URI[*]} |
106 | local my_SRC_URI |
107 | local my_SRC_URI_DEST |
108 | local my_SRC_URI_MIRROR |
109 | local my_SOURCEDIR |
110 | local DB_MD5_SUM_FILE="${MD5DIR}/$(basename ${SMAGENAME} .${SMAGESUFFIX}).md5" |
111 | local FETCHING |
112 | local i mirror |
113 | |
114 | |
115 | #install SRCDIR/PNAME if not exist |
116 | [ ! -d ${SOURCEDIR}/${PNAME} ] && install -d ${SOURCEDIR}/${PNAME} |
117 | |
118 | # check if FETCHING is needed |
119 | ( cd ${SOURCEDIR}/${PNAME}; md5sum --check ${DB_MD5_SUM_FILE} &> /dev/null ) |
120 | if [[ $? == 0 ]] |
121 | then |
122 | # md5's ok, not fetching needed |
123 | FETCHING=false |
124 | else |
125 | FETCHING=true |
126 | fi |
127 | |
128 | for ((i=0; i < EOA; i++)) |
129 | do |
130 | # url to file |
131 | my_SRC_URI="$(echo ${SRC_URI[${i}]} | cut -d' ' -f1)" |
132 | |
133 | # subdir in sources dir; the my_SRCI_URI file goes to there |
134 | my_SRC_URI_DEST="$(echo ${SRC_URI[${i}]} | cut -d' ' -f2)" |
135 | |
136 | # if my_src_uri_dest is not equal my_src_uri; than an other dir is used |
137 | if [[ ${my_SRC_URI_DEST} != ${my_SRC_URI} ]] |
138 | then |
139 | my_SOURCEDIR="${SOURCEDIR}/${PNAME}/${my_SRC_URI_DEST}" |
140 | else |
141 | my_SOURCEDIR="${SOURCEDIR}/${PNAME}" |
142 | fi |
143 | |
144 | # if an mirrored file than replace first the mirror uri |
145 | if [ -n "$(echo ${my_SRC_URI} | grep 'mirror://')" ] |
146 | then |
147 | for mirror in ${MIRRORS} |
148 | do |
149 | my_SRC_URI_MIRROR="$(echo ${my_SRC_URI} | sed "s|mirror:/|${mirror}/sources|g")" |
150 | |
151 | #echo "DEBUG: ${MY_SRC_URI}" |
152 | if [[ ${FETCHING} == true ]] |
153 | then |
154 | echo "==> fetching ${my_SRC_URI_MIRROR}" |
155 | wget \ |
156 | --passive-ftp \ |
157 | --tries 3 \ |
158 | --continue \ |
159 | --progress bar \ |
160 | --directory-prefix="${my_SOURCEDIR}" \ |
161 | "${my_SRC_URI_MIRROR}" |
162 | if [ "$?" == "0" ] |
163 | then |
164 | break |
165 | else |
166 | continue |
167 | fi |
168 | fi |
169 | done |
170 | else |
171 | #echo "DEBUG: ${SRC_URI[${i}]}" |
172 | if [[ ${FETCHING} == true ]] |
173 | then |
174 | echo "==> fetching ${my_SRC_URI}" |
175 | wget \ |
176 | --passive-ftp \ |
177 | --tries 3 \ |
178 | --continue \ |
179 | --progress bar \ |
180 | --directory-prefix="${my_SOURCEDIR}" \ |
181 | "${my_SRC_URI}" |
182 | # only needed to run through a list of mirrors |
183 | # if [ "$?" == "0" ] |
184 | # then |
185 | # break |
186 | # else |
187 | # continue |
188 | # fi |
189 | fi |
190 | fi |
191 | |
192 | # unset them to be shure |
193 | unset my_SRC_URI |
194 | unset my_SRC_URI_DEST |
195 | unset my_SRC_URI_MIRROR |
196 | unset my_SOURCEDIR |
197 | done |
198 | |
199 | # recheck md5 sums |
200 | echo |
201 | echo ">== Checking MD5 sums:" |
202 | ( cd ${SOURCEDIR}/${PNAME}; md5sum --check ${DB_MD5_SUM_FILE} ) || die "md5 failed" |
203 | echo |
204 | |
205 | # not needed anymore |
206 | unset SRC_URI |
207 | } |
208 | |
209 | # dummy function, used if that not exist in smage file |
210 | src_prepare() { |
211 | echo "no src_prepare defined" |
212 | sleep 2 |
213 | return 0 |
214 | } |
215 | |
216 | # dummy function, used if that not exist in smage file |
217 | src_compile() { |
218 | echo "no src_compile defined" |
219 | sleep 2 |
220 | return 0 |
221 | } |
222 | |
223 | # dummy function, used if that not exist in smage file |
224 | src_install() { |
225 | echo "no src_install defined" |
226 | sleep 2 |
227 | return 0 |
228 | } |
229 | |
230 | |
231 | build_mage_script() { |
232 | return 0 |
233 | } |
234 | |
235 | mconfigure() { |
236 | if [ -x ./configure ] |
237 | then |
238 | ./configure \ |
239 | --prefix=/usr \ |
240 | --host=${CHOST} \ |
241 | --mandir=/usr/share/man \ |
242 | --infodir=/usr/share/info \ |
243 | --datadir=/usr/share \ |
244 | --sysconfdir=/etc \ |
245 | --localstatedir=/var/lib \ |
246 | "$@" || die "mconfigure failed" |
247 | else |
248 | echo "configure is not an executable ..." |
249 | exit 1 |
250 | fi |
251 | } |
252 | |
253 | minstall() { |
254 | if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then |
255 | make prefix=${BINDIR}/usr \ |
256 | datadir=${BINDIR}/usr/share \ |
257 | infodir=${BINDIR}/usr/share/info \ |
258 | localstatedir=${BINDIR}/var/lib \ |
259 | mandir=${BINDIR}/usr/share/man \ |
260 | sysconfdir=${BINDIR}/etc \ |
261 | "$@" install || die "minstall failed" |
262 | else |
263 | die "no Makefile found" |
264 | fi |
265 | } |
266 | |
267 | mmake() { |
268 | make ${MAKEOPTS} ${EXTRA_EMAKE} "$@" |
269 | } |
270 | |
271 | munpack() { |
272 | local SRCFILE |
273 | local IFTAR |
274 | local DEST |
275 | |
276 | SRCFILE=$1 |
277 | |
278 | if [ -z "$2" ] |
279 | then |
280 | DEST=${BUILDDIR} |
281 | else |
282 | DEST=$2 |
283 | fi |
284 | |
285 | case "${SRCFILE##*.}" in |
286 | bz2) |
287 | IFTAR="$(basename $SRCFILE .bz2)" |
288 | IFTAR="${IFTAR##*.}" |
289 | if [ "${IFTAR}" == "tar" ] |
290 | then |
291 | tar --no-same-owner -xvjf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} |
292 | fi |
293 | ;; |
294 | gz) |
295 | IFTAR="$(basename $SRCFILE .gz)" |
296 | IFTAR="${IFTAR##*.}" |
297 | if [ "${IFTAR}" == "tar" ] |
298 | then |
299 | tar --no-same-owner -xvzf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} |
300 | fi |
301 | ;; |
302 | tbz2) |
303 | tar --no-same-owner -xvjf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} |
304 | ;; |
305 | tgz) |
306 | tar --no-same-owner -xvzf ${SOURCEDIR}/${PNAME}/${SRCFILE} -C ${DEST} |
307 | ;; |
308 | *) |
309 | die "munpack failed" |
310 | ;; |
311 | esac |
312 | } |
313 | |
314 | mpatch() { |
315 | local PATCHOPTS |
316 | local PATCHFILE |
317 | |
318 | PATCHOPTS=$1 |
319 | PATCHFILE=$2 |
320 | |
321 | patch "${PATCHOPTS}" -i ${SOURCEDIR}/${PNAME}/${PATCHFILE} |
322 | } |
323 | |
324 | |
325 | minstalldocs() { |
326 | local docfiles |
327 | |
328 | docfiles="$@" |
329 | |
330 | if [ ! -d ${BINDIR}/usr/share/doc/${PNAME}-${PVER} ] |
331 | then |
332 | install -d ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "creating doc dirs." |
333 | fi |
334 | |
335 | for i in ${docfiles} |
336 | do |
337 | cat ${i} | gzip -9c > ${i}.gz || die "gzipping docs." |
338 | install -m 0644 ${SRCDIR}/${i}.gz \ |
339 | ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "coping docs." |
340 | done |
341 | } |
342 | |
343 | mstriplibs() { |
344 | local stripdir="$@" |
345 | |
346 | [ -z "${stripdir}" ] && stripdir=${BINDIR} |
347 | find ${stripdir} | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null |
348 | } |
349 | |
350 | mstripbins() { |
351 | local stripdir="$@" |
352 | |
353 | [ -z "${stripdir}" ] && stripdir=${BINDIR} |
354 | find ${stripdir} | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null |
355 | } |
356 | |
357 | setup_distcc_environment(){ |
358 | if [ -x /usr/bin/distcc ] |
359 | then |
360 | echo "Using DistCC for compilation ..." |
361 | export PATH=/usr/lib/distcc/bin:${PATH} || die "distcc: could not export new $PATH" |
362 | |
363 | #export distcc as compiler |
364 | # export CC="distcc" |
365 | # export CXX=distcc |
366 | |
367 | export DISTCC_DIR="${DISTCC_DIR}" || die "distcc_dir export failed" |
368 | |
369 | |
370 | #ccache + distcc together |
371 | if [ "${SMAGE_USE_CCACHE}" == "true" ] |
372 | then |
373 | if [ -x /usr/bin/ccache ] |
374 | then |
375 | echo "Preparing DistCC to work together with CCache ..." |
376 | #export CCACHE_PREFIX="distcc" || die "distcc: could not set ccach_prefix" |
377 | # export CC="ccache distcc" |
378 | # export CXX="ccache distcc" |
379 | fi |
380 | fi |
381 | |
382 | #creating distcc tempdir |
383 | install -o distcc -g daemon -d ${DISTCC_DIR} |
384 | chmod 1777 ${DISTCC_DIR} |
385 | fi |
386 | } |
387 | |
388 | setup_ccache_environment(){ |
389 | if [ -x /usr/bin/ccache ] |
390 | then |
391 | echo "Using CCache for compilation ..." |
392 | export PATH=/usr/lib/ccache/bin:${PATH} || die "ccache: could not export new $PATH" |
393 | #unset CC CXX |
394 | fi |
395 | } |
396 | |
397 | # print out our version |
398 | showversion |
399 | echo |
400 | |
401 | if [ -z "$1" ] |
402 | then |
403 | echo "No .smage2 file given. Exiting." |
404 | echo |
405 | exit 1 |
406 | fi |
407 | |
408 | #updating smage2-scripts |
409 | if [ "$1" == "update" ] |
410 | then |
411 | if [ ! -d ${SOURCEDIR} ] |
412 | then |
413 | install -d ${SOURCEDIR} |
414 | fi |
415 | syncsmage2 |
416 | exit 0 |
417 | fi |
418 | |
419 | #creates md5sums for smages to given dir |
420 | if [ "$1" == "calcmd5" ] |
421 | then |
422 | if [ $# -ge 3 ] |
423 | then |
424 | SMAGENAME="$2" |
425 | MD5DIR="$3" |
426 | source ${SMAGENAME} || die "download source failed" |
427 | |
428 | # overridable sourcedir; must be declared after source of the smage2 |
429 | CALC_SOURCEDIR="${CALC_SOURCEDIR:="${SOURCEDIR}/${PNAME}"}" |
430 | |
431 | [ -z "${SRC_URI}" ] && die "Nothing declared to calculate." |
432 | |
433 | # end of array |
434 | EOA=${#SRC_URI[*]} |
435 | |
436 | [ ! -d ${MD5DIR} ] && install -d ${MD5DIR} |
437 | |
438 | # clear md5sum file |
439 | MY_MD5_FILE="${MD5DIR}/$(basename ${SMAGENAME} .${SMAGESUFFIX}).md5" |
440 | echo -n > ${MY_MD5_FILE} |
441 | |
442 | for ((i=0; i < EOA; i++)) |
443 | do |
444 | # url to file |
445 | my_SRC_URI="$(echo ${SRC_URI[${i}]} | cut -d' ' -f1)" |
446 | |
447 | # subdir in sources dir; the my_SRCI_URI file goes to there |
448 | my_SRC_URI_DEST="$(echo ${SRC_URI[${i}]} | cut -d' ' -f2)" |
449 | |
450 | # if my_src_uri_dest is not equal my_src_uri; than an other dir is used |
451 | if [[ ${my_SRC_URI_DEST} != ${my_SRC_URI} ]] |
452 | then |
453 | MY_SRC_FILE="${my_SRC_URI_DEST}/$(basename ${SRC_URI[${i}]})" |
454 | else |
455 | MY_SRC_FILE="$(basename ${SRC_URI[${i}]})" |
456 | fi |
457 | |
458 | if [ -e "${CALC_SOURCEDIR}/${MY_SRC_FILE}" ] |
459 | then |
460 | echo "calculating $(basename ${MY_SRC_FILE}) ..." |
461 | ( cd ${CALC_SOURCEDIR}; md5sum "${MY_SRC_FILE}" ) >> ${MY_MD5_FILE} |
462 | else |
463 | echo "WARNING: File '$(basename ${MY_SRC_FILE}) not found in ${CALC_SOURCEDIR}." |
464 | fi |
465 | |
466 | # unset them to be shure |
467 | unset my_SRC_URI |
468 | unset my_SRC_URI_DEST |
469 | unset my_SRC_URI_MIRROR |
470 | unset my_SOURCEDIR |
471 | done |
472 | |
473 | echo |
474 | echo "Calculating of md5 sums for '$(basename ${SMAGENAME} .${SMAGESUFFIX})' done." |
475 | echo |
476 | else |
477 | echo "Usage: Calculating MD5 Sums:" |
478 | echo " $(basename $0) calcmd5 /path/to/SMAGENAME /path/to/MD5DIR" |
479 | echo |
480 | echo |
481 | echo "Export the CALC_SOURCEDIR variable to override current SOURCEDIRs." |
482 | echo |
483 | exit 1 |
484 | fi |
485 | |
486 | exit 0 |
487 | fi |
488 | |
489 | #download sources |
490 | if [ "$1" == "download" -a -n "$2" ] |
491 | then |
492 | showversion |
493 | if [ ! -d ${SMAGESCRIPTSDIR} ] |
494 | then |
495 | install -d ${SMAGESCRIPTSDIR} |
496 | fi |
497 | |
498 | # get smage |
499 | SMAGENAME="$2" |
500 | MD5DIR="$(dirname ${SMAGENAME})/md5" |
501 | source ${SMAGENAME} || die "download source failed" |
502 | |
503 | download_sources |
504 | exit 0 |
505 | fi |
506 | |
507 | if [ ! -e ${MLIBDIR}/pkgbuild_dir.sh ] |
508 | then |
509 | die "Error: ${MLIBDIR}/pkgbuild_dir.sh not found. Aborting." |
510 | fi |
511 | |
512 | if [ -z "`basename ${SMAGENAME}|grep .${SMAGESUFFIX}`" ] |
513 | then |
514 | die "File '`basename ${SMAGENAME}`' is not a sMage v${SMAGEVERSION} file. Aborting." |
515 | fi |
516 | |
517 | if [ -z "${SOURCEDIR}" ] |
518 | then |
519 | die "\$SOURCEDIR not found. Please setup your mage.rc correctly." |
520 | fi |
521 | |
522 | if [ -z "${SMAGESCRIPTSDIR}" ] |
523 | then |
524 | die "\$SMAGESCRIPTSDIR not found. Please setup your mage.rc correctly." |
525 | fi |
526 | |
527 | if [ -z "${SMAGE2RSYNC}" ] |
528 | then |
529 | echo "\$SMAGE2RSYNC not found. Please setup your mage.rc correctly." |
530 | exit 1 |
531 | fi |
532 | |
533 | if [ -z "${BINDIR}" ] |
534 | then |
535 | die "no BINDIR variable found in /etc/mage.rc" |
536 | fi |
537 | |
538 | if [ -z "${CHOST}" ] |
539 | then |
540 | die "no CHOST variable found in /etc/mage.rc" |
541 | fi |
542 | |
543 | if [ -z "${CFLAGS}" ] |
544 | then |
545 | die "no CFLAGS variable found in /etc/mage.rc" |
546 | fi |
547 | |
548 | if [ -z "${CXXFLAGS}" ] |
549 | then |
550 | die "no CXXFLAGS variable found in /etc/mage.rc" |
551 | fi |
552 | |
553 | |
554 | source ${SMAGENAME} || die "source failed" |
555 | PKGNAME="${PNAME}-${PVER}-${CHOST%%-*}-${PBUILD}" |
556 | MD5DIR="$(dirname ${SMAGENAME})/md5" |
557 | |
558 | xtitle "Compiling ${PKGNAME}" |
559 | echo "Compiling ${PKGNAME}" |
560 | |
561 | #download sources |
562 | download_sources |
563 | |
564 | #fixes some issues with these functions |
565 | export -f src_prepare || die "src_prepare export failed" |
566 | export -f src_compile || die "src_compile export failed" |
567 | export -f src_install || die "src_install export failed" |
568 | |
569 | #fixes some compile issues |
570 | export CHOST="${CHOST}" || die "CHOST export failed" |
571 | export CFLAGS="${CFLAGS}" || die "CFLAGS export failed" |
572 | export CXXFLAGS="${CFLAGS}" || die "CXXFLAGS export failed" |
573 | export BINDIR="${BINDIR}" || die "BINDIR export failed" |
574 | export MAKEOPTS="${MAKEOPTS}" || die "MAKEOPTS export failed" |
575 | |
576 | |
577 | #setup distcc |
578 | #distcc mus be setup *before* ccache, as ccache need to be before distcc in path |
579 | if [ "${SMAGE_USE_DISTCC}" == "true" ] |
580 | then |
581 | setup_distcc_environment |
582 | fi |
583 | |
584 | #setup ccache |
585 | if [ "${SMAGE_USE_CCACHE}" == "true" ] |
586 | then |
587 | setup_ccache_environment |
588 | fi |
589 | |
590 | |
591 | # small sleep to show our settings |
592 | sleep 1 |
593 | |
594 | #debug |
595 | #echo "CC=${CC}" |
596 | #echo "CXX=${CXX}" |
597 | #echo "DISTCC_DIR=${DISTCC_DIR}" |
598 | #echo "PATH: ${PATH}" |
599 | #echo "--------------------------------------" |
600 | #env |
601 | #echo "--------------------------------------" |
602 | #read |
603 | #debug end |
604 | |
605 | #cleans up build if a previously one exists |
606 | if [ -d ${BUILDDIR} ] |
607 | then |
608 | rm -rf ${BUILDDIR}/* || die "couldn't cleanup \$BUILDDIR." |
609 | fi |
610 | install -d ${BUILDDIR} || die "couldn't create \$BUILDDIR." |
611 | |
612 | #cleans up srcdir if a previously unpacked one exists |
613 | if [ -d ${SRCDIR} ] |
614 | then |
615 | rm -rf ${SRCDIR} |
616 | fi |
617 | |
618 | #cleans up bindir if a previous build exists or creates a new one |
619 | if [ -d ${BINDIR} ] |
620 | then |
621 | rm -rf ${BINDIR} |
622 | fi |
623 | install -d ${BINDIR} || die "couldn't create \$BINDIR." |
624 | |
625 | #cleans up package temp dir if a previous build exists |
626 | if [ -d ${BUILDDIR}/${PKGNAME} ] |
627 | then |
628 | rm -rf ${BUILDDIR}/${PKGNAME} |
629 | fi |
630 | |
631 | #cleans up timestamp if one exists |
632 | if [ -f /var/tmp/timestamp ] |
633 | then |
634 | mage rmstamp |
635 | fi |
636 | |
637 | src_prepare || die "src_prepare failed" |
638 | src_compile || die "src_compile failed" |
639 | src_install || die "src_install failed" |
640 | |
641 | |
642 | #compressing doc, info & man files |
643 | echo -e "Compressing man-pages ..." |
644 | if [ -d ${BUILDDIR}/builded/usr/share/man ] |
645 | then |
646 | ${MLIBDIR}/compressdoc -g -9 ${BUILDDIR}/builded/usr/share/man |
647 | fi |
648 | |
649 | echo -e "Compressing info-pages ..." |
650 | if [ -d ${BUILDDIR}/builded/usr/share/info ] |
651 | then |
652 | ${MLIBDIR}/compressdoc -g -9 ${BUILDDIR}/builded/usr/share/info |
653 | fi |
654 | |
655 | # stripping all bins and libs |
656 | case ${NOSTRIP} in |
657 | true|TRUE|yes|y) |
658 | echo -e "NOSTRIP=true detected; Package will not be stripped ..." |
659 | ;; |
660 | *) |
661 | echo -e "Stripping binaries ..." |
662 | mstripbins ${BINDIR} |
663 | echo -e "Stripping libraries ..." |
664 | mstriplibs ${BINDIR} |
665 | ;; |
666 | esac |
667 | |
668 | #the new buildpkg command |
669 | case ${NOPKGBUILD} in |
670 | true|TRUE|yes|y) |
671 | echo -e "NOPGKBUILD=true detected; Package will not be build ..." |
672 | ;; |
673 | *) |
674 | ${MLIBDIR}/pkgbuild_dir.sh ${PKGNAME} ${BINDIR} || die "package-build failed" |
675 | echo -e "\nPackage ${PKGNAME} successfully builded.\n" |
676 | ;; |
677 | esac |
678 | |
679 | #for sure |
680 | unset NOPKGBUILD |
681 | unset NOSTRIP |
682 | |
683 | xtitleclean |
684 | #echo -e "\nPackage ${PKGNAME} successfully builded.\n" |
Properties
Name | Value |
---|---|
svn:executable | * |