66 |
case ${method} in |
case ${method} in |
67 |
md5) cmd="md5sum" ;; |
md5) cmd="md5sum" ;; |
68 |
sha256) cmd="sha256sum" ;; |
sha256) cmd="sha256sum" ;; |
69 |
*) die "mchecksum(): unkown method '${method}'" ;; |
*) die "mchecksum(): unknown method '${method}'" ;; |
70 |
esac |
esac |
71 |
|
|
72 |
if [[ -d ${rundir} ]] |
if [[ -d ${rundir} ]] |
1401 |
real_uris="$(convertmirrors ${uri})" |
real_uris="$(convertmirrors ${uri})" |
1402 |
|
|
1403 |
# verbose or not |
# verbose or not |
1404 |
mqueryfeature "!verbose" && wget_opts="--quiet" |
mqueryfeature "!verbose" && wget_opts+=" --quiet" |
1405 |
|
|
1406 |
# filter wget options if busybox was found |
# filter wget options if busybox was found |
1407 |
wget_opts="$(busybox_filter_wget_options ${WGET_FETCH_OPTIONS})" |
wget_opts+=" $(busybox_filter_wget_options ${WGET_FETCH_OPTIONS})" |
1408 |
|
|
1409 |
# create outputdir |
# create outputdir |
1410 |
[[ ! -d ${outputdir} ]] && install -d "${outputdir}" |
[[ ! -d ${outputdir} ]] && install -d "${outputdir}" |
1645 |
} |
} |
1646 |
|
|
1647 |
|
|
1648 |
# cuts full pathnames or versionized names down to basename |
# unused? |
1649 |
choppkgname() |
# |
1650 |
{ |
# # cuts full pathnames or versionized names down to basename |
1651 |
#we want this only if full name was used |
# choppkgname() |
1652 |
if [ -n "$(echo ${MAGENAME}|fgrep .mage)" ] |
# { |
1653 |
then |
# #we want this only if full name was used |
1654 |
#cuts ARCH and PBUILD |
# if [ -n "$(echo ${MAGENAME}|fgrep .mage)" ] |
1655 |
#ARCH comes from ${MAGERC} |
# then |
1656 |
MAGENAME=$(echo ${MAGENAME} |sed -e "s:-${ARCH}-r*.::g") |
# #cuts ARCH and PBUILD |
1657 |
|
# #ARCH comes from ${MAGERC} |
1658 |
|
# MAGENAME=$(echo ${MAGENAME} |sed -e "s:-${ARCH}$(print_distrotag)-r*.::g") |
1659 |
|
# |
1660 |
|
# #cuts version number |
1661 |
|
# MAGENAME=$(basename ${MAGENAME%-*} .mage) |
1662 |
|
# fi |
1663 |
|
# } |
1664 |
|
|
|
#cuts version number |
|
|
MAGENAME=$(basename ${MAGENAME%-*} .mage) |
|
|
fi |
|
|
} |
|
1665 |
|
|
1666 |
# get_categorie $PNAME, returns CATEGORIE |
# get_categorie $PNAME, returns CATEGORIE |
1667 |
# $1=pname |
# $1=pname |
3002 |
local state |
local state |
3003 |
local descriptiom |
local descriptiom |
3004 |
local homepage |
local homepage |
3005 |
|
local license |
3006 |
local i |
local i |
3007 |
local all_installed |
local all_installed |
3008 |
local ipver |
local ipver |
3039 |
state="$(get_value_from_magefile STATE ${magefile})" |
state="$(get_value_from_magefile STATE ${magefile})" |
3040 |
description="$(get_value_from_magefile DESCRIPTION ${magefile})" |
description="$(get_value_from_magefile DESCRIPTION ${magefile})" |
3041 |
homepage="$(get_value_from_magefile HOMEPAGE ${magefile})" |
homepage="$(get_value_from_magefile HOMEPAGE ${magefile})" |
3042 |
|
license="$(get_value_from_magefile LICENSE ${magefile})" |
3043 |
|
|
3044 |
# all installed |
# all installed |
3045 |
for i in $(get_uninstall_candidates --pname ${pname} --pcat ${pcat}) |
for i in $(get_uninstall_candidates --pname ${pname} --pcat ${pcat}) |
3046 |
do |
do |
3047 |
ipver="$(magename2pver ${i})" |
ipver="$(magename2pver ${i})" |
3048 |
ipbuild="$(magename2pbuild ${i})" |
ipbuild="$(magename2pbuild ${i})" |
3049 |
|
|
3050 |
if [[ -z ${all_installed} ]] |
if [[ -z ${all_installed} ]] |
3051 |
then |
then |
3052 |
all_installed="${ipver}-${ipbuild}" |
all_installed="${ipver}-${ipbuild}" |
3055 |
fi |
fi |
3056 |
done |
done |
3057 |
[[ -z ${all_installed} ]] && all_installed="none" |
[[ -z ${all_installed} ]] && all_installed="none" |
3058 |
|
|
3059 |
case ${state} in |
case ${state} in |
3060 |
stable) state=${COLGREEN}"[s] ";; |
stable) state=${COLGREEN}"[s] ";; |
3061 |
testing) state=${COLYELLOW}"[t] ";; |
testing) state=${COLYELLOW}"[t] ";; |
3100 |
echo " Installed versions: ${all_installed}" |
echo " Installed versions: ${all_installed}" |
3101 |
echo " Description: ${description}" |
echo " Description: ${description}" |
3102 |
echo " Homepage: ${homepage}" |
echo " Homepage: ${homepage}" |
3103 |
|
if [[ ! -z ${license} ]] |
3104 |
|
then |
3105 |
|
echo " License: ${license}" |
3106 |
|
fi |
3107 |
echo " Depends: ${deps}" |
echo " Depends: ${deps}" |
3108 |
echo " SDepends: ${sdeps}" |
echo " SDepends: ${sdeps}" |
3109 |
echo |
echo |
3294 |
ccache|!ccache) retval=0 ;; |
ccache|!ccache) retval=0 ;; |
3295 |
check|!check) retval=0 ;; |
check|!check) retval=0 ;; |
3296 |
compressdoc|!compressdoc) retval=0 ;; |
compressdoc|!compressdoc) retval=0 ;; |
3297 |
|
debug|!debug) retval=0 ;; |
3298 |
distcc|!distcc) retval=0 ;; |
distcc|!distcc) retval=0 ;; |
3299 |
kernelsrcunpack|!kernelsrcunpack) retval=0 ;; |
kernelsrcunpack|!kernelsrcunpack) retval=0 ;; |
3300 |
libtool|!libtool) retval=0 ;; |
libtool|!libtool) retval=0 ;; |
3301 |
linuxsymlink|!linuxsymlink) retval=0 ;; |
linuxsymlink|!linuxsymlink) retval=0 ;; |
3302 |
pkgbuild|!pkgbuild) retval=0 ;; |
pkgbuild|!pkgbuild) retval=0 ;; |
3303 |
|
pkgdistrotag|!pkgdistrotag) retval=0 ;; |
3304 |
purge|!purge) retval=0 ;; |
purge|!purge) retval=0 ;; |
3305 |
qalint|!qalint) retval=0 ;; |
qalint|!qalint) retval=0 ;; |
3306 |
regentree|!regentree) retval=0 ;; |
regentree|!regentree) retval=0 ;; |
3307 |
stepbystep|!stepbystep) retval=0 ;; |
resume|!resume) retval=0 ;; |
3308 |
srcpkgbuild|!srcpkgbuild) retval=0 ;; |
srcpkgbuild|!srcpkgbuild) retval=0 ;; |
3309 |
srcpkgtarball|!srcpkgtarball) retval=0 ;; |
srcpkgtarball|!srcpkgtarball) retval=0 ;; |
3310 |
|
static|!static) retval=0 ;; |
3311 |
|
stepbystep|!stepbystep) retval=0 ;; |
3312 |
strip|!strip) retval=0 ;; |
strip|!strip) retval=0 ;; |
3313 |
|
verbose|!verbose) retval=0 ;; |
3314 |
*) retval=1 ;; |
*) retval=1 ;; |
3315 |
esac |
esac |
3316 |
|
|
3319 |
|
|
3320 |
load_mage_features() |
load_mage_features() |
3321 |
{ |
{ |
|
echo -en "${COLBLUE}---${COLGREEN} Loading mage-features... ${COLDEFAULT}" |
|
3322 |
for i in ${MAGE_FEATURES_GLOBAL[*]} ${MAGE_FEATURES[*]} |
for i in ${MAGE_FEATURES_GLOBAL[*]} ${MAGE_FEATURES[*]} |
3323 |
do |
do |
3324 |
FVERBOSE=off msetfeature ${i} |
FVERBOSE=off msetfeature ${i} |
3325 |
done |
done |
|
|
|
|
echo -e "${COLGREEN}done${COLDEFAULT}" |
|
3326 |
} |
} |
3327 |
|
|
3328 |
msetfeature() |
msetfeature() |
3339 |
|
|
3340 |
if ! known_mage_feature "${feature}" |
if ! known_mage_feature "${feature}" |
3341 |
then |
then |
3342 |
[[ ${FVERBOSE} = off ]] || echo "unkown feature ${feature}, ignoring it" |
[[ ${FVERBOSE} = off ]] || echo -e "${COLRED}Unknown feature '${feature}', ignoring it${COLDEFAULT}" |
3343 |
return 3 |
return 3 |
3344 |
fi |
fi |
3345 |
|
|
3392 |
fi |
fi |
3393 |
done |
done |
3394 |
else |
else |
3395 |
|
[[ ${FVERBOSE} = off ]] || echo -e "${COLRED}Unknown feature '${feature}', ignoring it${COLDEFAULT}" |
3396 |
retval=3 |
retval=3 |
3397 |
fi |
fi |
3398 |
|
|