10 |
# set default user mage.rc |
# set default user mage.rc |
11 |
: ${MAGERC="/etc/mage.rc"} |
: ${MAGERC="/etc/mage.rc"} |
12 |
|
|
|
## setup ## |
|
|
SMAGENAME="$1" |
|
|
SMAGEVERSION="$( < ${MLIBDIR}/version)" |
|
|
|
|
13 |
# export default C locale |
# export default C locale |
14 |
export LC_ALL=C |
export LC_ALL=C |
15 |
|
|
17 |
source ${MAGERC} |
source ${MAGERC} |
18 |
source ${MLIBDIR}/mage4.functions.sh |
source ${MLIBDIR}/mage4.functions.sh |
19 |
|
|
20 |
|
## setup ## |
21 |
|
SMAGENAME="$1" |
22 |
|
SMAGEVERSION="$(< ${MLIBDIR}/version)" |
23 |
|
|
24 |
# set PKGDIR and BUILDDIR and BINDIR to MROOT |
# set PKGDIR and BUILDDIR and BINDIR to MROOT |
25 |
if [[ -n ${MROOT} ]] |
if [[ -n ${MROOT} ]] |
26 |
then |
then |
177 |
fi |
fi |
178 |
|
|
179 |
echo -e "${COLBLUE}==>${COLGREEN} fetching ${uri}${COLDEFAULT}" |
echo -e "${COLBLUE}==>${COLGREEN} fetching ${uri}${COLDEFAULT}" |
180 |
mdownload --uri "${uri}" --dir "${outputdir}" || die "Could not download '${uri}'" |
# always use verbose mode for source downloads |
181 |
|
FVERBOSE=off msetfeature "verbose" |
182 |
|
# do not die here, mchecksum catches download errors |
183 |
|
mdownload --uri "${uri}" --dir "${outputdir}" |
184 |
|
|
185 |
# unset them to be sure |
# unset them to be sure |
186 |
unset uri |
unset uri |
204 |
# dummy function, used if that does not exist in smage file |
# dummy function, used if that does not exist in smage file |
205 |
src_prepare() |
src_prepare() |
206 |
{ |
{ |
207 |
echo "no src_prepare defined" |
echo "no src_prepare defined; doing nothing ..." |
208 |
return 0 |
return 0 |
209 |
} |
} |
210 |
|
|
211 |
# dummy function, used if that does not exist in smage file |
# dummy function, used if that does not exist in smage file |
212 |
src_compile() |
src_compile() |
213 |
{ |
{ |
214 |
echo "no src_compile defined" |
echo "no src_compile defined; doing nothing ..." |
215 |
return 0 |
return 0 |
216 |
} |
} |
217 |
|
|
218 |
# dummy function, used if that does not exist in smage file |
# dummy function, used if that does not exist in smage file |
219 |
src_check() |
src_check() |
220 |
{ |
{ |
221 |
echo "no src_check defined" |
echo "no src_check defined; doing nothing ..." |
222 |
return 0 |
return 0 |
223 |
} |
} |
224 |
|
|
225 |
# dummy function, used if that does not exist in smage file |
# dummy function, used if that does not exist in smage file |
226 |
src_install() |
src_install() |
227 |
{ |
{ |
228 |
echo "no src_install defined" |
echo "no src_install defined; doing nothing ..." |
229 |
return 0 |
return 0 |
230 |
} |
} |
231 |
|
|
239 |
|
|
240 |
mconfigure() |
mconfigure() |
241 |
{ |
{ |
242 |
|
local myopts |
243 |
|
if [[ ! -z ${CTARGET} ]] |
244 |
|
then |
245 |
|
myopts+=" --target=${CTARGET}" |
246 |
|
fi |
247 |
|
|
248 |
if [ -x ./configure ] |
if [ -x ./configure ] |
249 |
then |
then |
250 |
|
# if requested disable-static |
251 |
|
if [[ ! -z $(./configure --help | grep -- '--.*able-static') ]] |
252 |
|
then |
253 |
|
if mqueryfeature '!static' |
254 |
|
then |
255 |
|
myopts+=" --disable-static" |
256 |
|
else |
257 |
|
myopts+=" --enable-static" |
258 |
|
fi |
259 |
|
fi |
260 |
|
|
261 |
|
# always enable shared by default |
262 |
|
if [[ ! -z $(./configure --help | grep -- '--.*able-shared') ]] |
263 |
|
then |
264 |
|
myopts+=" --enable-shared" |
265 |
|
fi |
266 |
|
|
267 |
./configure \ |
./configure \ |
268 |
--prefix=/usr \ |
--prefix=/usr \ |
269 |
--host=${CHOST} \ |
--host=${CHOST} \ |
274 |
--sysconfdir=/etc \ |
--sysconfdir=/etc \ |
275 |
--localstatedir=/var/lib \ |
--localstatedir=/var/lib \ |
276 |
--libdir=/usr/$(mlibdir) \ |
--libdir=/usr/$(mlibdir) \ |
277 |
|
${myopts} \ |
278 |
"$@" || die "mconfigure failed" |
"$@" || die "mconfigure failed" |
279 |
else |
else |
280 |
echo "configure is not an executable ..." |
echo "configure is not an executable ..." |
370 |
rar) |
rar) |
371 |
unrar x ${SOURCEDIR}/${PNAME}/${SRCFILE} ${DEST} || die ".rar unpack failed." |
unrar x ${SOURCEDIR}/${PNAME}/${SRCFILE} ${DEST} || die ".rar unpack failed." |
372 |
;; |
;; |
373 |
zip|xpi) |
zip|xpi|jar) |
374 |
unzip ${SOURCEDIR}/${PNAME}/${SRCFILE} -d ${DEST} || die ".zip unpack failed." |
unzip ${SOURCEDIR}/${PNAME}/${SRCFILE} -d ${DEST} || die ".zip unpack failed." |
375 |
;; |
;; |
376 |
rpm) |
rpm) |
436 |
minstalldocs() |
minstalldocs() |
437 |
{ |
{ |
438 |
local docfiles |
local docfiles |
439 |
|
local doc |
440 |
docfiles="$@" |
docfiles="$@" |
441 |
|
|
442 |
if [ ! -d ${BINDIR}/usr/share/doc/${PNAME}-${PVER} ] |
if [ ! -d ${BINDIR}/usr/share/doc/${PNAME}-${PVER} ] |
444 |
install -d ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "creating doc dirs." |
install -d ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "creating doc dirs." |
445 |
fi |
fi |
446 |
|
|
447 |
local i |
for doc in ${docfiles} |
|
for i in ${docfiles} |
|
448 |
do |
do |
449 |
if [ -f ${i} ] |
if [ -f ${doc} ] |
450 |
then |
then |
451 |
cat ${i} | gzip -9c > ${i}.gz || die "gzipping docs." |
if mqueryfeature "compressdoc" |
452 |
install -m 0644 ${SRCDIR}/${i}.gz \ |
then |
453 |
${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "coping docs." |
cat ${doc} | gzip -9c > ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/$(basename ${doc}).gz || die "gzipping +installing ${doc}." |
454 |
|
chmod 0644 ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/$(basename ${doc}).gz || die "fixing permissions of ${doc}." |
455 |
|
else |
456 |
|
install -m 0644 ${doc} ${BINDIR}/usr/share/doc/${PNAME}-${PVER} || die "installing ${doc}." |
457 |
|
fi |
458 |
fi |
fi |
459 |
done |
done |
460 |
} |
} |
465 |
|
|
466 |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
467 |
[[ -z ${STRIP_DYN_LIB} ]] && STRIP_DYN_LIB="--strip-debug" |
[[ -z ${STRIP_DYN_LIB} ]] && STRIP_DYN_LIB="--strip-debug" |
468 |
find ${stripdir} ! -type d | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_LIB} 2> /dev/null |
find ${stripdir} ! -type d | xargs --no-run-if-empty file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_LIB} 2> /dev/null |
469 |
} |
} |
470 |
|
|
471 |
mstripbins() |
mstripbins() |
474 |
|
|
475 |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
476 |
[[ -z ${STRIP_DYN_BIN} ]] && STRIP_DYN_BIN="--strip-debug" |
[[ -z ${STRIP_DYN_BIN} ]] && STRIP_DYN_BIN="--strip-debug" |
477 |
find ${stripdir} ! -type d | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_BIN} 2> /dev/null |
find ${stripdir} ! -type d | xargs --no-run-if-empty file | grep "executable" | grep ELF | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_DYN_BIN} 2> /dev/null |
478 |
} |
} |
479 |
|
|
480 |
mstripstatic() |
mstripstatic() |
483 |
|
|
484 |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
485 |
[[ -z ${STRIP_STATIC_LIB} ]] && STRIP_STATIC_LIB="--strip-debug" |
[[ -z ${STRIP_STATIC_LIB} ]] && STRIP_STATIC_LIB="--strip-debug" |
486 |
find ${stripdir} ! -type d | xargs file | grep "ar archive" | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_STATIC_LIB} 2> /dev/null |
find ${stripdir} ! -type d | xargs --no-run-if-empty file | grep "ar archive" | cut -f 1 -d : | xargs --no-run-if-empty strip ${STRIP_STATIC_LIB} 2> /dev/null |
487 |
} |
} |
488 |
|
|
489 |
mstriplibtoolarchive() |
mstriplibtoolarchive() |
491 |
local stripdir="$@" |
local stripdir="$@" |
492 |
|
|
493 |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
[[ -z ${stripdir} ]] && stripdir="${BINDIR}" |
494 |
find ${stripdir} ! -type d -name \*.la | xargs file | grep "libtool library" | cut -f 1 -d : | xargs --no-run-if-empty rm -f -- 2> /dev/null |
find ${stripdir} ! -type d -name \*.la | xargs --no-run-if-empty file | grep "libtool library" | cut -f 1 -d : | xargs --no-run-if-empty rm -f -- 2> /dev/null |
495 |
} |
} |
496 |
|
|
497 |
mpurgetargets() |
mpurgetargets() |
571 |
fi |
fi |
572 |
} |
} |
573 |
|
|
|
|
|
574 |
# fixes given dependencies to match a MAGE_TARGET |
# fixes given dependencies to match a MAGE_TARGET |
575 |
# fix_mage_deps -target s/depend # <-- note -target ! |
# fix_mage_deps -target s/depend # <-- note -target ! |
576 |
fix_mage_deps() |
fix_mage_deps() |
757 |
local subpackage |
local subpackage |
758 |
|
|
759 |
# build them only if requested |
# build them only if requested |
760 |
if [[ ${REGEN_MAGE_TREE} = true ]] |
if mqueryfeature regentree |
761 |
then |
then |
762 |
# run it without targets |
# run it without targets |
763 |
if [[ -n ${MAGE_TARGETS} ]] |
if [[ -n ${MAGE_TARGETS} ]] |
820 |
unset STATE |
unset STATE |
821 |
unset DESCRIPTION |
unset DESCRIPTION |
822 |
unset HOMEPAGE |
unset HOMEPAGE |
823 |
unset PKGTYPE |
# unset PKGTYPE <-- don't do that either; smage needs this var |
824 |
unset INHERITS |
unset INHERITS |
825 |
unset DEPEND |
unset DEPEND |
826 |
unset SDEPEND |
unset SDEPEND |
846 |
export SAVED_DEPEND="${DEPEND}" |
export SAVED_DEPEND="${DEPEND}" |
847 |
export SAVED_SDEPEND="${SDEPEND}" |
export SAVED_SDEPEND="${SDEPEND}" |
848 |
export SAVED_PROVIDE="${PROVIDE}" |
export SAVED_PROVIDE="${PROVIDE}" |
849 |
export SAVED_NOPKGBUILD="${NOPKGBUILD}" |
export SAVED_PKGTYPE="${PKGTYPE}" |
850 |
|
|
851 |
|
# special handling needed for mage features |
852 |
|
# pkgbuild |
853 |
|
mqueryfeature "pkgbuild" && export SAVED_FEATURE_PKGBUILD="pkgbuild" |
854 |
|
mqueryfeature "!pkgbuild" && export SAVED_FEATURE_PKGBUILD="!pkgbuild" |
855 |
|
# strip |
856 |
|
mqueryfeature "strip" && export SAVED_FEATURE_STRIP="strip" |
857 |
|
mqueryfeature "!strip" && export SAVED_FEATURE_STRIP="!strip" |
858 |
|
# libtool |
859 |
|
mqueryfeature "libtool" && export SAVED_FEATURE_LIBTOOL="libtool" |
860 |
|
mqueryfeature "!libtool" && export SAVED_FEATURE_LIBTOOL="!libtool" |
861 |
|
# compressdoc |
862 |
|
mqueryfeature "compressdoc" && export SAVED_FEATURE_COMPRESSDOC="compressdoc" |
863 |
|
mqueryfeature "!compressdoc" && export SAVED_FEATURE_COMPRESSDOC="!compressdoc" |
864 |
|
|
865 |
# bindir too |
# bindir too |
866 |
export SAVED_BINDIR="${BINDIR}" |
export SAVED_BINDIR="${BINDIR}" |
921 |
export DEPEND="${SAVED_DEPEND}" |
export DEPEND="${SAVED_DEPEND}" |
922 |
export SDEPEND="${SAVED_SDEPEND}" |
export SDEPEND="${SAVED_SDEPEND}" |
923 |
export PROVIDE="${SAVED_PROVIDE}" |
export PROVIDE="${SAVED_PROVIDE}" |
924 |
export NOPKGBUILD="${SAVED_NOPKGBUILD}" |
export PKGTYPE="${SAVED_PKGTYPE}" |
925 |
|
|
926 |
|
# special handling needed for mage features |
927 |
|
# pkgbuild |
928 |
|
FVERBOSE=off msetfeature "${SAVED_FEATURE_PKGBUILD}" |
929 |
|
# strip |
930 |
|
FVERBOSE=off msetfeature "${SAVED_FEATURE_STRIP}" |
931 |
|
# libtool |
932 |
|
FVERBOSE=off msetfeature "${SAVED_FEATURE_LIBTOOL}" |
933 |
|
# compressdoc |
934 |
|
FVERBOSE=off msetfeature "${SAVED_FEATURE_COMPRESSDOC}" |
935 |
|
|
936 |
# bindir too |
# bindir too |
937 |
export BINDIR="${SAVED_BINDIR}" |
export BINDIR="${SAVED_BINDIR}" |
991 |
unset SAVED_SDEPEND |
unset SAVED_SDEPEND |
992 |
unset SAVED_PROVIDE |
unset SAVED_PROVIDE |
993 |
unset SAVED_BINDIR |
unset SAVED_BINDIR |
994 |
unset SAVED_NOPKGBUILD |
unset SAVED_PKGTYPE |
995 |
|
unset SAVED_FEATURE_PKGBUILD |
996 |
|
unset SAVED_FEATURE_STRIP |
997 |
|
unset SAVED_FEATURE_LIBTOOL |
998 |
|
unset SAVED_FEATURE_COMPRESSDOC |
999 |
unset SPLIT_PACKAGE_BASE |
unset SPLIT_PACKAGE_BASE |
1000 |
unset -f SAVED_preinstall |
unset -f SAVED_preinstall |
1001 |
unset -f SAVED_postinstall |
unset -f SAVED_postinstall |
1095 |
# fix target as it may be empty ! |
# fix target as it may be empty ! |
1096 |
[ -n "${target}" ] && target="-${target}" |
[ -n "${target}" ] && target="-${target}" |
1097 |
|
|
|
|
|
1098 |
# build pkgname |
# build pkgname |
1099 |
pkgname="${pname}${target}-${pver}-${parch}-${pbuild}" |
pkgname="${pname}${target}-${pver}-${parch}-${pbuild}" |
1100 |
|
|
1101 |
# build pkg-md5-sum only if requested |
# build pkg-md5-sum only if requested |
1102 |
if [[ ${REGEN_MAGE_TREE} = true ]] |
if mqueryfeature regentree |
1103 |
then |
then |
1104 |
echo -ne "${COLBLUE}===${COLGREEN} generating md5's for ${pkgname}.${PKGSUFFIX} ... ${COLDEFAULT}" |
echo -ne "${COLBLUE}===${COLGREEN} generating md5's for ${pkgname}.${PKGSUFFIX} ... ${COLDEFAULT}" |
1105 |
|
|
1154 |
|
|
1155 |
step_by_step() |
step_by_step() |
1156 |
{ |
{ |
1157 |
if [[ ${STEP_BY_STEP} = true ]] |
if mqueryfeature stepbystep |
1158 |
then |
then |
1159 |
echo -e "${COLRED}Step-by-step enabled! Paused after $1.${COLDEFAULT}" |
echo -e "${COLRED}Step-by-step enabled! Paused after $1.${COLDEFAULT}" |
1160 |
echo "Press [enter] to continue" |
echo "Press [enter] to continue" |
1162 |
fi |
fi |
1163 |
} |
} |
1164 |
|
|
1165 |
|
resume_stamp() |
1166 |
|
{ |
1167 |
|
local step="$1" |
1168 |
|
[[ ! -d ${BUILDDIR}/.stamps ]] && install -d ${BUILDDIR}/.stamps |
1169 |
|
touch ${BUILDDIR}/.stamps/smage-${PKGNAME}-${step} |
1170 |
|
} |
1171 |
|
|
1172 |
|
run_resume() |
1173 |
|
{ |
1174 |
|
local step="$1" |
1175 |
|
|
1176 |
|
if mqueryfeature "resume" && [[ -f ${BUILDDIR}/.stamps/smage-${PKGNAME}-${step} ]] |
1177 |
|
then |
1178 |
|
echo -e "${COLMAGENTA}${step} already processed; doing nothing${COLDEFAULT}" |
1179 |
|
return 0 |
1180 |
|
else |
1181 |
|
return 1 |
1182 |
|
fi |
1183 |
|
} |
1184 |
|
|
1185 |
# print out our version |
# print out our version |
1186 |
showversion |
showversion |
1193 |
exit 1 |
exit 1 |
1194 |
fi |
fi |
1195 |
|
|
1196 |
|
# load supported mage features |
1197 |
|
load_mage_features |
1198 |
|
|
1199 |
# updating smage2-scripts |
# updating smage2-scripts |
1200 |
if [[ $1 = update ]] |
if [[ $1 = update ]] |
1201 |
then |
then |
1380 |
if [ "$1" == "--src-tarball" -a -n "$2" ] || [ "$1" == "-st" -a -n "$2" ] |
if [ "$1" == "--src-tarball" -a -n "$2" ] || [ "$1" == "-st" -a -n "$2" ] |
1381 |
then |
then |
1382 |
SRCPKGTARBALL="${2}" |
SRCPKGTARBALL="${2}" |
1383 |
USE_SRC_PKG_TARBALL=true |
msetfeature "srcpkgtarball" |
1384 |
|
|
1385 |
# abort if given file is not a source pkg |
# abort if given file is not a source pkg |
1386 |
[[ ${SRCPKGTARBALL##*.} != ${SRCPKGSUFFIX} ]] && die "${SRCPKGTARBALL} is not a valid src-pkg file." |
[[ ${SRCPKGTARBALL##*.} != ${SRCPKGSUFFIX} ]] && die "${SRCPKGTARBALL} is not a valid src-pkg file." |
1401 |
[[ ! -f ${SMAGENAME} ]] && die "Included smage2 file in src-tarball not found: ${SMAGENAME}" |
[[ ! -f ${SMAGENAME} ]] && die "Included smage2 file in src-tarball not found: ${SMAGENAME}" |
1402 |
fi |
fi |
1403 |
|
|
1404 |
|
if [ "$1" == "--resume" -a -n "$2" ] |
1405 |
|
then |
1406 |
|
msetfeature "resume" |
1407 |
|
SMAGENAME="$2" |
1408 |
|
fi |
1409 |
|
|
1410 |
[ ! -e ${MLIBDIR}/pkgbuild_dir.sh ] && die "Error: ${MLIBDIR}/pkgbuild_dir.sh not found. Aborting." |
[ ! -e ${MLIBDIR}/pkgbuild_dir.sh ] && die "Error: ${MLIBDIR}/pkgbuild_dir.sh not found. Aborting." |
1411 |
[ -z "$(basename ${SMAGENAME} | grep .${SMAGESUFFIX})" ] && |
[ -z "$(basename ${SMAGENAME} | grep .${SMAGESUFFIX})" ] && |
1429 |
# auto regen mage tree if requested |
# auto regen mage tree if requested |
1430 |
regen_mage_tree |
regen_mage_tree |
1431 |
|
|
1432 |
if [[ ${CREATE_SRC_PKG_TARBALL} = true ]] |
if mqueryfeature "srcpkgbuild" |
1433 |
then |
then |
1434 |
if [[ -d ${SOURCEDIR}/${PNAME} ]] |
if [[ -d ${SOURCEDIR}/${PNAME} ]] |
1435 |
then |
then |
1439 |
fi |
fi |
1440 |
|
|
1441 |
# download sources |
# download sources |
1442 |
[[ ${USE_SRC_PKG_TARBALL} != true ]] && download_sources |
mqueryfeature "srcpkgtarball" || download_sources |
1443 |
|
|
1444 |
# fixes some issues with these functions |
# fixes some issues with these functions |
1445 |
export -f src_prepare || die "src_prepare export failed" |
export -f src_prepare || die "src_prepare export failed" |
1450 |
# fixes some compile issues |
# fixes some compile issues |
1451 |
export CHOST="${CHOST}" || die "CHOST export failed" |
export CHOST="${CHOST}" || die "CHOST export failed" |
1452 |
export CFLAGS="${CFLAGS}" || die "CFLAGS export failed" |
export CFLAGS="${CFLAGS}" || die "CFLAGS export failed" |
1453 |
export CXXFLAGS="${CFLAGS}" || die "CXXFLAGS export failed" |
if [[ -z ${CXXFLAGS} ]] |
1454 |
|
then |
1455 |
|
export CXXFLAGS="${CFLAGS}" || die "CXXFLAGS export failed" |
1456 |
|
else |
1457 |
|
export CXXFLAGS="${CXXFLAGS}" || die "CXXFLAGS export failed" |
1458 |
|
fi |
1459 |
|
export LDFLAGS="${LDFLAGS}" || die "LDFLAGS export failed" |
1460 |
export BINDIR="${BINDIR}" || die "BINDIR export failed" |
export BINDIR="${BINDIR}" || die "BINDIR export failed" |
1461 |
export MAKEOPTS="${MAKEOPTS}" || die "MAKEOPTS export failed" |
export MAKEOPTS="${MAKEOPTS}" || die "MAKEOPTS export failed" |
1462 |
|
|
|
|
|
1463 |
# setup distcc |
# setup distcc |
1464 |
# setup for distcc goes *before* ccache, so ccache comes before distcc in path |
# setup for distcc goes *before* ccache, so ccache comes before distcc in path |
1465 |
[[ ${SMAGE_USE_DISTCC} = true ]] && setup_distcc_environment |
mqueryfeature "distcc" && setup_distcc_environment |
1466 |
|
|
1467 |
# setup ccache |
# setup ccache |
1468 |
[[ ${SMAGE_USE_CCACHE} = true ]] && setup_ccache_environment |
mqueryfeature "ccache" && setup_ccache_environment |
1469 |
|
|
1470 |
# clean up builddir if a previously one exist |
if mqueryfeature "resume" |
|
if [ -d ${BUILDDIR} ] |
|
1471 |
then |
then |
1472 |
rm -rf ${BUILDDIR}/* || die "couldn't cleanup \$BUILDDIR." |
echo -e "${COLMAGENTA}Resume requested; continuing previous build${COLDEFAULT}" |
|
fi |
|
|
install -d ${BUILDDIR} || die "couldn't create \$BUILDDIR." |
|
1473 |
|
|
1474 |
# clean up srcdir if a previously unpacked one exist |
# setup build logging |
1475 |
if [ -d ${SRCDIR} ] |
[[ ! -d /var/log/smage ]] && install -d /var/log/smage |
1476 |
then |
if [[ -f /var/log/smage/${PKGNAME}.log.bz2 ]] |
1477 |
rm -rf ${SRCDIR} |
then |
1478 |
fi |
bunzip2 -f /var/log/smage/${PKGNAME}.log.bz2 |
1479 |
|
fi |
1480 |
|
echo -e "### Resume started on $(date) ###\n" >> /var/log/smage/${PKGNAME}.log |
1481 |
|
|
1482 |
# clean up bindir if a previous build exist or create a new one |
else |
1483 |
if [ -d ${BINDIR} ] |
# clean up builddir if a previously one exist |
1484 |
then |
if [ -d ${BUILDDIR} ] |
1485 |
rm -rf ${BINDIR} |
then |
1486 |
fi |
rm -rf ${BUILDDIR}/* || die "couldn't cleanup \$BUILDDIR." |
1487 |
install -d ${BINDIR} || die "couldn't create \$BINDIR." |
fi |
1488 |
|
install -d ${BUILDDIR} || die "couldn't create \$BUILDDIR." |
1489 |
|
|
1490 |
# clean up package temp dir if a previous build exist |
# clean up srcdir if a previously unpacked one exist |
1491 |
if [ -d ${BUILDDIR}/${PKGNAME} ] |
if [ -d ${SRCDIR} ] |
1492 |
then |
then |
1493 |
rm -rf ${BUILDDIR}/${PKGNAME} |
rm -rf ${SRCDIR} |
1494 |
fi |
fi |
1495 |
|
|
1496 |
# setup build logging |
# clean up bindir if a previous build exist or create a new one |
1497 |
[[ ! -d /var/log/smage ]] && install -d /var/log/smage |
if [ -d ${BINDIR} ] |
1498 |
echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log |
then |
1499 |
|
rm -rf ${BINDIR} |
1500 |
src_prepare | ${SMAGE_LOG_CMD} |
fi |
1501 |
die_pipestatus 0 "src_prepare failed" |
install -d ${BINDIR} || die "couldn't create \$BINDIR." |
|
step_by_step $_ |
|
|
|
|
|
src_compile | ${SMAGE_LOG_CMD} |
|
|
die_pipestatus 0 "src_compile failed" |
|
|
step_by_step $_ |
|
1502 |
|
|
1503 |
# only run checks if requested |
# clean up package temp dir if a previous build exist |
1504 |
if [[ ${MAGE_CHECK} != true ]] |
if [ -d ${BUILDDIR}/${PKGNAME} ] |
1505 |
then |
then |
1506 |
echo "MAGE_CHECK not requested; src_check() will not be run!" | ${SMAGE_LOG_CMD} |
rm -rf ${BUILDDIR}/${PKGNAME} |
1507 |
step_by_step src_check |
fi |
1508 |
else |
|
1509 |
src_check | ${SMAGE_LOG_CMD} |
# clean up stamps dir |
1510 |
die_pipestatus 0 "src_check failed" |
if [ -d ${BUILDDIR}/.stamps ] |
1511 |
step_by_step $_ |
then |
1512 |
|
rm -rf ${BUILDDIR}/.stamps |
1513 |
|
fi |
1514 |
|
|
1515 |
|
# setup build logging |
1516 |
|
[[ ! -d /var/log/smage ]] && install -d /var/log/smage |
1517 |
|
echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log |
1518 |
fi |
fi |
1519 |
|
|
1520 |
# build several subpackages |
if [[ ${PKGTYPE} = virtual ]] |
|
if [[ -n ${SPLIT_PACKAGES} ]] |
|
1521 |
then |
then |
1522 |
# save bindir & pname |
echo "virtual package detected; nothing will be build ..." |
1523 |
split_save_variables |
# automatically set !pkgbuild here too |
1524 |
export SAVED_BINDIR="${BINDIR}" |
msetfeature "!pkgbuild" |
|
for subpackage in ${SPLIT_PACKAGES} |
|
|
do |
|
|
if typeset -f src_install_${subpackage} > /dev/null |
|
|
then |
|
|
# export subpackage bindir |
|
|
export BINDIR="${SAVED_BINDIR}_${subpackage}" |
|
|
# export PNAME, several internal function and include |
|
|
# rely on this variable |
|
|
export PNAME="${subpackage}" |
|
|
|
|
|
echo |
|
|
echo -en "${COLBLUE}*** ${COLDEFAULT}" |
|
|
echo -en " Running ${COLGREEN}split src_install()${COLDEFAULT}" |
|
|
echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}" |
|
|
echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..." |
|
|
|
|
|
src_install_${subpackage} | ${SMAGE_LOG_CMD} |
|
|
die_pipestatus 0 "src_install_${subpackage} failed" |
|
|
step_by_step $_ |
|
|
fi |
|
|
done |
|
|
# restore bindir & pname |
|
|
split_restore_variables |
|
|
# unset all saved smage variables |
|
|
split_unset_variables |
|
1525 |
else |
else |
1526 |
src_install | ${SMAGE_LOG_CMD} |
( run_resume src_prepare || src_prepare ) | ${SMAGE_LOG_CMD} |
1527 |
die_pipestatus 0 "src_install failed" |
die_pipestatus 0 "src_prepare failed" |
1528 |
step_by_step $_ |
resume_stamp src_prepare |
1529 |
|
step_by_step src_prepare |
1530 |
|
|
1531 |
|
( run_resume src_compile || src_compile ) | ${SMAGE_LOG_CMD} |
1532 |
|
die_pipestatus 0 "src_compile failed" |
1533 |
|
resume_stamp src_compile |
1534 |
|
step_by_step src_compile |
1535 |
|
|
1536 |
|
# only run checks if requested |
1537 |
|
if mqueryfeature "!check" |
1538 |
|
then |
1539 |
|
echo "!check detected; src_check() will not be run!" | ${SMAGE_LOG_CMD} |
1540 |
|
else |
1541 |
|
( run_resume src_check || src_check ) | ${SMAGE_LOG_CMD} |
1542 |
|
die_pipestatus 0 "src_check failed" |
1543 |
|
resume_stamp src_check |
1544 |
|
fi |
1545 |
|
step_by_step src_check |
1546 |
|
|
1547 |
|
# build several subpackages |
1548 |
|
if [[ -n ${SPLIT_PACKAGES} ]] |
1549 |
|
then |
1550 |
|
# save bindir & pname |
1551 |
|
split_save_variables |
1552 |
|
export SAVED_BINDIR="${BINDIR}" |
1553 |
|
for subpackage in ${SPLIT_PACKAGES} |
1554 |
|
do |
1555 |
|
if typeset -f src_install_${subpackage} > /dev/null |
1556 |
|
then |
1557 |
|
# export subpackage bindir |
1558 |
|
export BINDIR="${SAVED_BINDIR}_${subpackage}" |
1559 |
|
# export PNAME, several internal function and include |
1560 |
|
# rely on this variable |
1561 |
|
export PNAME="${subpackage}" |
1562 |
|
|
1563 |
|
echo |
1564 |
|
echo -en "${COLBLUE}*** ${COLDEFAULT}" |
1565 |
|
echo -en " Running ${COLGREEN}split src_install()${COLDEFAULT}" |
1566 |
|
echo -en " for subpkg: ${COLBLUE}${PNAME}${COLDEFAULT}" |
1567 |
|
echo -e " - basepkg: ${COLBLUE}${SPLIT_PACKAGE_BASE}${COLDEFAULT} ..." |
1568 |
|
|
1569 |
|
( run_resume src_install_${subpackage} || src_install_${subpackage} ) | ${SMAGE_LOG_CMD} |
1570 |
|
die_pipestatus 0 "src_install_${subpackage} failed" |
1571 |
|
resume_stamp src_install_${subpackage} |
1572 |
|
step_by_step src_install_${subpackage} |
1573 |
|
fi |
1574 |
|
done |
1575 |
|
# restore bindir & pname |
1576 |
|
split_restore_variables |
1577 |
|
# unset all saved smage variables |
1578 |
|
split_unset_variables |
1579 |
|
else |
1580 |
|
( run_resume src_install || src_install ) | ${SMAGE_LOG_CMD} |
1581 |
|
die_pipestatus 0 "src_install failed" |
1582 |
|
resume_stamp src_install |
1583 |
|
step_by_step src_install |
1584 |
|
fi |
1585 |
fi |
fi |
1586 |
|
|
1587 |
# compressing doc, info & man files |
# echo for sake of good-looking |
1588 |
if [[ -n ${SPLIT_PACKAGES} ]] |
echo |
1589 |
|
|
1590 |
|
if mqueryfeature "!compressdoc" |
1591 |
then |
then |
1592 |
for subpackage in ${SPLIT_PACKAGES} |
echo -e "!compressdoc detected; documentation will not be compressed ..." |
1593 |
do |
elif mqueryfeature "!pkgbuild" |
1594 |
mcompressdocs ${BINDIR}_${subpackage} |
then |
1595 |
done |
echo "!pkgbuild detected; skipping documentation compression..." |
1596 |
else |
else |
1597 |
mcompressdocs ${BINDIR} |
# compressing doc, info & man files |
1598 |
|
if [[ -n ${SPLIT_PACKAGES} ]] |
1599 |
|
then |
1600 |
|
for subpackage in ${SPLIT_PACKAGES} |
1601 |
|
do |
1602 |
|
run_resume post-mcompressdoc_${subpackage} || mcompressdocs ${BINDIR}_${subpackage} |
1603 |
|
resume_stamp post-mcompressdoc_${subpackage} |
1604 |
|
done |
1605 |
|
else |
1606 |
|
run_resume post-mcompressdoc || mcompressdocs ${BINDIR} |
1607 |
|
resume_stamp post-mcompressdoc |
1608 |
|
fi |
1609 |
fi |
fi |
1610 |
|
|
1611 |
if [[ ${SMAGE_STRIP_LIBTOOL} = true ]] |
if mqueryfeature "!libtool" |
1612 |
then |
then |
1613 |
|
if mqueryfeature "!pkgbuild" |
1614 |
|
then |
1615 |
|
echo "!pkgbuild detected; skipping libtool archive stripping ..." |
1616 |
|
else |
1617 |
if [[ -n ${SPLIT_PACKAGES} ]] |
if [[ -n ${SPLIT_PACKAGES} ]] |
1618 |
then |
then |
1619 |
for subpackage in ${SPLIT_PACKAGES} |
for subpackage in ${SPLIT_PACKAGES} |
1620 |
do |
do |
1621 |
echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives for '${subpackage}' ...${COLDEFAULT}" |
echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives for '${subpackage}' ...${COLDEFAULT}" |
1622 |
mstriplibtoolarchive ${BINDIR}_${subpackage} |
run_resume post-mstriplibtoolarchive_${subpackage} || mstriplibtoolarchive ${BINDIR}_${subpackage} |
1623 |
|
resume_stamp post-mstriplibtoolarchive_${subpackage} |
1624 |
done |
done |
1625 |
else |
else |
1626 |
echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives ...${COLDEFAULT}" |
echo -e "${COLBLUE}===${COLGREEN} stripping libtool archives ...${COLDEFAULT}" |
1627 |
mstriplibtoolarchive ${BINDIR} |
run_resume post-mstriplibtoolarchive || mstriplibtoolarchive ${BINDIR} |
1628 |
|
resume_stamp post-mstriplibtoolarchive |
1629 |
fi |
fi |
1630 |
|
fi |
1631 |
fi |
fi |
1632 |
|
|
1633 |
if [[ ${SMAGE_PURGE} = true ]] |
if mqueryfeature "purge" |
1634 |
then |
then |
1635 |
|
if mqueryfeature "!pkgbuild" |
1636 |
|
then |
1637 |
|
echo "!pkgbuild detected; skipping file purgation..." |
1638 |
|
else |
1639 |
if [[ -n ${SPLIT_PACKAGES} ]] |
if [[ -n ${SPLIT_PACKAGES} ]] |
1640 |
then |
then |
1641 |
for subpackage in ${SPLIT_PACKAGES} |
for subpackage in ${SPLIT_PACKAGES} |
1642 |
do |
do |
1643 |
echo -e "${COLBLUE}===${COLGREEN} purging all purge targets in '${subpackage}' ...${COLDEFAULT}" |
echo -e "${COLBLUE}===${COLGREEN} purging all purge targets in '${subpackage}' ...${COLDEFAULT}" |
1644 |
mpurgetargets ${BINDIR}_${subpackage} |
run_resume post-mpurgetargets_${subpackage} || mpurgetargets ${BINDIR}_${subpackage} |
1645 |
|
resume_stamp post-mpurgetargets_${subpackage} |
1646 |
done |
done |
1647 |
else |
else |
1648 |
echo -e "${COLBLUE}===${COLGREEN} purging all purge targets ...${COLDEFAULT}" |
echo -e "${COLBLUE}===${COLGREEN} purging all purge targets ...${COLDEFAULT}" |
1649 |
mpurgetargets ${BINDIR} |
run_resume post-mpurgetargets || mpurgetargets ${BINDIR} |
1650 |
|
resume_stamp post-mpurgetargets |
1651 |
fi |
fi |
1652 |
|
fi |
1653 |
fi |
fi |
1654 |
|
|
1655 |
# stripping all bins and libs |
# stripping all bins and libs |
1656 |
case ${NOSTRIP} in |
if mqueryfeature "!strip" |
1657 |
true|TRUE|yes|y) |
then |
1658 |
echo -e "NOSTRIP=true detected; Package will not be stripped ..." |
echo -e "!strip detected; Package will not be stripped ..." |
1659 |
;; |
elif mqueryfeature "!pkgbuild" |
1660 |
*) |
then |
1661 |
if [[ -n ${SPLIT_PACKAGES} ]] |
echo "!pkgbuild detected; skipping stripping of the package ..." |
1662 |
then |
else |
1663 |
for subpackage in ${SPLIT_PACKAGES} |
if [[ -n ${SPLIT_PACKAGES} ]] |
1664 |
do |
then |
1665 |
echo -e "${COLBLUE}===${COLGREEN} stripping binaries for '${subpackage}' ...${COLDEFAULT}" |
for subpackage in ${SPLIT_PACKAGES} |
1666 |
mstripbins ${BINDIR}_${subpackage} |
do |
1667 |
echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries for '${subpackage}' ...${COLDEFAULT}" |
echo -e "${COLBLUE}===${COLGREEN} stripping binaries for '${subpackage}' ...${COLDEFAULT}" |
1668 |
mstriplibs ${BINDIR}_${subpackage} |
run_resume post-mstripbins_${subpackage} || mstripbins ${BINDIR}_${subpackage} |
1669 |
echo -e "${COLBLUE}===${COLGREEN} stripping static libraries for '${subpackage}' ...${COLDEFAULT}" |
resume_stamp post-mstripbins_${subpackage} |
1670 |
mstripstatic ${BINDIR}_${subpackage} |
echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries for '${subpackage}' ...${COLDEFAULT}" |
1671 |
done |
run_resume post-mstriplibs_${subpackage} || mstriplibs ${BINDIR}_${subpackage} |
1672 |
else |
resume_stamp post-mstriplibs_${subpackage} |
1673 |
echo -e "${COLBLUE}===${COLGREEN} stripping binaries ...${COLDEFAULT}" |
echo -e "${COLBLUE}===${COLGREEN} stripping static libraries for '${subpackage}' ...${COLDEFAULT}" |
1674 |
mstripbins ${BINDIR} |
run_resume post-mstripstatic_${subpackage} || mstripstatic ${BINDIR}_${subpackage} |
1675 |
echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries ...${COLDEFAULT}" |
resume_stamp post-mstripstatic_${subpackage} |
1676 |
mstriplibs ${BINDIR} |
done |
1677 |
echo -e "${COLBLUE}===${COLGREEN} stripping static libraries ...${COLDEFAULT}" |
else |
1678 |
mstripstatic ${BINDIR} |
echo -e "${COLBLUE}===${COLGREEN} stripping binaries ...${COLDEFAULT}" |
1679 |
fi |
run_resume post-mstripbins || mstripbins ${BINDIR} |
1680 |
;; |
resume_stamp post-mstripbins |
1681 |
esac |
echo -e "${COLBLUE}===${COLGREEN} stripping dynamic libraries ...${COLDEFAULT}" |
1682 |
|
run_resume post-mstriplibs || mstriplibs ${BINDIR} |
1683 |
|
resume_stamp post-mstriplibs |
1684 |
|
echo -e "${COLBLUE}===${COLGREEN} stripping static libraries ...${COLDEFAULT}" |
1685 |
|
run_resume post-mstripstatic || mstripstatic ${BINDIR} |
1686 |
|
resume_stamp post-mstripstatic |
1687 |
|
fi |
1688 |
|
fi |
1689 |
|
|
1690 |
# the new buildpkg command |
if mqueryfeature "!pkgbuild" |
1691 |
case ${NOPKGBUILD} in |
then |
1692 |
true|TRUE|yes|y) |
echo -e "!pkgbuild detected; Package will not be build ..." |
1693 |
echo -e "NOPGKBUILD=true detected; Package will not be build ..." |
else |
|
;; |
|
|
*) |
|
1694 |
# build several targets |
# build several targets |
1695 |
if [[ -n ${MAGE_TARGETS} ]] |
if [[ -n ${MAGE_TARGETS} ]] |
1696 |
then |
then |
1700 |
if typeset -f ${target}_pkgbuild > /dev/null |
if typeset -f ${target}_pkgbuild > /dev/null |
1701 |
then |
then |
1702 |
# run it |
# run it |
1703 |
${target}_pkgbuild |
run_resume post-${target}_pkgbuild || ${target}_pkgbuild |
1704 |
|
resume_stamp post-${target}_pkgbuild |
1705 |
fi |
fi |
1706 |
# now create the target package |
# now create the target package |
1707 |
${MLIBDIR}/pkgbuild_dir.sh \ |
run_resume post-pkg_builddir_${target} || ${MLIBDIR}/pkgbuild_dir.sh \ |
1708 |
"${PNAME}-${target}-${PVER}-${ARCH}-${PBUILD}" \ |
"${PNAME}-${target}-${PVER}-${ARCH}-${PBUILD}" \ |
1709 |
${BINDIR} || die "target: ${target} package-build failed" |
${BINDIR} || die "target: ${target} package-build failed" |
1710 |
|
resume_stamp post-pkg_builddir_${target} |
1711 |
|
|
1712 |
# build pkg-md5-sum if requested |
# build pkg-md5-sum if requested |
1713 |
generate_package_md5sum \ |
run_resume post-md5sum_${target} || generate_package_md5sum \ |
1714 |
--pcat "${PCATEGORIE}" \ |
--pcat "${PCATEGORIE}" \ |
1715 |
--pname "${PNAME}" \ |
--pname "${PNAME}" \ |
1716 |
--pver "${PVER}" \ |
--pver "${PVER}" \ |
1717 |
--pbuild "${PBUILD}" \ |
--pbuild "${PBUILD}" \ |
1718 |
--parch "${ARCH}" \ |
--parch "${ARCH}" \ |
1719 |
--target "${target}" |
--target "${target}" |
1720 |
|
resume_stamp post-md5sum_${target} |
1721 |
|
|
1722 |
echo -e "${COLGREEN}\nPackage ${PNAME}-${target}-${PVER}-${ARCH}-${PBUILD} successfully builded.\n${COLDEFAULT}" |
echo -e "${COLGREEN}\nPackage ${PNAME}-${target}-${PVER}-${ARCH}-${PBUILD} successfully builded.\n${COLDEFAULT}" |
1723 |
done |
done |
1732 |
export PNAME="${subpackage}" |
export PNAME="${subpackage}" |
1733 |
split_info_${PNAME} |
split_info_${PNAME} |
1734 |
|
|
1735 |
# jump to next one if NOPKGBUILD is set in split_info |
# jump to next one if !pkgbuild is set in split_info |
1736 |
case ${NOPKGBUILD} in |
mqueryfeature "!pkgbuild" && continue |
|
true|TRUE|yes|y) continue ;; |
|
|
esac |
|
1737 |
|
|
1738 |
# check if an special subpackage_pkgbuild exists |
# check if an special subpackage_pkgbuild exists |
1739 |
if typeset -f ${PNAME}_pkgbuild > /dev/null |
if typeset -f ${PNAME}_pkgbuild > /dev/null |
1740 |
then |
then |
1741 |
# run it |
# run it |
1742 |
${PNAME}_pkgbuild |
run_resume post-${PNAME}_pkgbuild || ${PNAME}_pkgbuild |
1743 |
|
resume_stamp post-${PNAME}_pkgbuild |
1744 |
fi |
fi |
1745 |
# now create the target package |
# now create the target package |
1746 |
${MLIBDIR}/pkgbuild_dir.sh \ |
run_resume post-pkg_builddir_${PNAME} || ${MLIBDIR}/pkgbuild_dir.sh \ |
1747 |
"${PNAME}-${PVER}-${ARCH}-${PBUILD}" \ |
"${PNAME}-${PVER}-${ARCH}-${PBUILD}" \ |
1748 |
"${BINDIR}_${PNAME}" || die "split_package: ${PNAME} package-build failed" |
"${BINDIR}_${PNAME}" || die "split_package: ${PNAME} package-build failed" |
1749 |
|
resume_stamp post-pkg_builddir_${PNAME} |
1750 |
|
|
1751 |
# build pkg-md5-sum if requested |
# build pkg-md5-sum if requested |
1752 |
generate_package_md5sum \ |
run_resume post-md5sum_${PNAME} || generate_package_md5sum \ |
1753 |
--pcat "${PCATEGORIE}" \ |
--pcat "${PCATEGORIE}" \ |
1754 |
--pname "${PNAME}" \ |
--pname "${PNAME}" \ |
1755 |
--pver "${PVER}" \ |
--pver "${PVER}" \ |
1756 |
--pbuild "${PBUILD}" \ |
--pbuild "${PBUILD}" \ |
1757 |
--parch "${ARCH}" |
--parch "${ARCH}" |
1758 |
|
resume_stamp post-md5sum_${PNAME} |
1759 |
|
|
1760 |
echo -e "${COLGREEN}\nPackage ${PNAME}-${PVER}-${ARCH}-${PBUILD} successfully builded.\n${COLDEFAULT}" |
echo -e "${COLGREEN}\nPackage ${PNAME}-${PVER}-${ARCH}-${PBUILD} successfully builded.\n${COLDEFAULT}" |
1761 |
|
|
1766 |
split_unset_variables |
split_unset_variables |
1767 |
|
|
1768 |
else |
else |
1769 |
${MLIBDIR}/pkgbuild_dir.sh ${PKGNAME} ${BINDIR} || die "package-build failed" |
run_resume post-pkg_builddir || ${MLIBDIR}/pkgbuild_dir.sh ${PKGNAME} ${BINDIR} || die "package-build failed" |
1770 |
|
resume_stamp post-pkg_builddir |
1771 |
|
|
1772 |
# build pkg-md5-sum if requested |
# build pkg-md5-sum if requested |
1773 |
generate_package_md5sum \ |
run_resume post-md5sum || generate_package_md5sum \ |
1774 |
--pcat "${PCATEGORIE}" \ |
--pcat "${PCATEGORIE}" \ |
1775 |
--pname "${PNAME}" \ |
--pname "${PNAME}" \ |
1776 |
--pver "${PVER}" \ |
--pver "${PVER}" \ |
1777 |
--pbuild "${PBUILD}" \ |
--pbuild "${PBUILD}" \ |
1778 |
--parch "${ARCH}" |
--parch "${ARCH}" |
1779 |
|
resume_stamp post-md5sum |
1780 |
|
|
1781 |
echo -e "${COLGREEN}\nPackage ${PKGNAME} successfully builded.\n${COLDEFAULT}" |
echo -e "${COLGREEN}\nPackage ${PKGNAME} successfully builded.\n${COLDEFAULT}" |
1782 |
fi |
fi |
1783 |
|
|
1784 |
# build src-pkg-tarball if requested |
# build src-pkg-tarball if requested |
1785 |
[[ ${CREATE_SRC_PKG_TARBALL} = true ]] && source_pkg_build ${SMAGENAME} |
if mqueryfeature "srcpkgbuild" |
1786 |
;; |
then |
1787 |
esac |
run_resume post-srcpkgbuild || source_pkg_build ${SMAGENAME} |
1788 |
|
resume_stamp post-srcpkgbuild |
1789 |
|
fi |
1790 |
|
fi |
1791 |
|
|
1792 |
if [[ ${SMAGE_BUILD_LOGGING} != false ]] |
if mqueryfeature "buildlog" |
1793 |
then |
then |
1794 |
bzip2 -9f /var/log/smage/${PKGNAME}.log |
bzip2 -9f /var/log/smage/${PKGNAME}.log |
1795 |
else |
else |
1796 |
[[ -f /var/log/smage/${PKGNAME}.log ]] && rm /var/log/smage/${PKGNAME}.log |
[[ -f /var/log/smage/${PKGNAME}.log ]] && rm /var/log/smage/${PKGNAME}.log |
1797 |
fi |
fi |
1798 |
|
|
|
# for sure |
|
|
unset NOPKGBUILD |
|
|
unset NOSTRIP |
|
|
|
|
1799 |
xtitleclean |
xtitleclean |