5 |
sminclude cleanutils mtools |
sminclude cleanutils mtools |
6 |
|
|
7 |
# include alx functions |
# include alx functions |
8 |
INHERIT="alx" |
INHERITS="${INHERITS} alx" |
9 |
|
|
10 |
# all deprecated mage-targets |
# add custom alx injection files to SRC_URI (required for proper spkg-tarball support) |
11 |
DEPRECATED_MAGE_TARGETS="alx_dev alx_livecd alx" |
# requires >=mage-0.4.109 |
12 |
|
if [ -d ${SMAGENAME%/*}/alx/files ] |
13 |
# variable to save pname |
then |
14 |
_PNAME="${PNAME}" |
alxfiles=$(find ${SMAGENAME%/*}/alx/files -mindepth 1 | sed "s:${SMAGENAME%/*}/alx/files/::g") |
15 |
|
for alxitem in ${alxfiles} |
16 |
SPECIAL_VARS="${SPECIAL_VARS} DEPRECATED_MAGE_TARGETS REMOVE_DEPRECATED_MAGE_TARGETS _PNAME" |
do |
17 |
SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} alx_postinstall" |
if [[ ! -z ${alxitem} ]] |
18 |
|
then |
19 |
alx_postinstall() |
SRC_URI+=( "file://${SMAGENAME%/*}/alx/files/${alxitem} alx/files" ) |
20 |
{ |
fi |
21 |
local target |
done |
22 |
|
fi |
|
case ${REMOVE_DEPRECATED_MAGE_TARGETS} in |
|
|
1|yes|true|TRUE) |
|
|
for target in ${DEPRECATED_MAGE_TARGETS} |
|
|
do |
|
|
if [[ ! -z $(magequery -n ${_PNAME}-${target}) ]] |
|
|
then |
|
|
echo "removing deprecated mage-target '${_PNAME}-${target}'" |
|
|
mage uninstall ${_PNAME}-${target} || die |
|
|
fi |
|
|
done |
|
|
;; |
|
|
esac |
|
|
} |
|
23 |
|
|
24 |
# injects files to given path (defaults to /usr/bin) |
# injects files to given path (defaults to /usr/bin) |
25 |
# mcinjectfile file {/path/to/dest} |
# mcinjectfile file {/path/to/dest} |
35 |
if [[ -z $2 ]] |
if [[ -z $2 ]] |
36 |
then |
then |
37 |
dest=/usr/bin |
dest=/usr/bin |
|
install -d ${BINDIR}/${dest} || die |
|
38 |
fi |
fi |
39 |
|
|
40 |
|
# needed directory |
41 |
|
#minstalldir ${dest} || die |
42 |
|
|
43 |
# install our configfile |
# install our configfile |
44 |
install -m 0644 -o root -g root ${file} ${BINDIR}/${dest} || die |
minstallfile ${file} ${dest} || die |
45 |
} |
} |
46 |
|
|
47 |
# injects executables to given path |
# injects executables to given path |
58 |
if [[ -z $2 ]] |
if [[ -z $2 ]] |
59 |
then |
then |
60 |
dest=/usr/bin |
dest=/usr/bin |
|
install -d ${BINDIR}/${dest} || die |
|
61 |
fi |
fi |
62 |
|
|
63 |
|
# needed directory |
64 |
|
#minstalldir ${dest} || die |
65 |
|
|
66 |
# install our configfile |
# install our configfile |
67 |
install -m 0755 -o root -g root ${file} ${BINDIR}/${dest} || die |
minstallexec ${file} ${dest} || die |
68 |
} |
} |
69 |
|
|
70 |
# injects a patch to the sourcecode |
# injects a patch to the sourcecode |
110 |
else |
else |
111 |
alx_old_mconfigure=alx_old$(typeset -f oldmconfigure) |
alx_old_mconfigure=alx_old$(typeset -f oldmconfigure) |
112 |
fi |
fi |
113 |
eval ${alx_old_mconfigure} |
eval "${alx_old_mconfigure}" |
114 |
mconfigure() |
mconfigure() |
115 |
{ |
{ |
116 |
local myconf |
local myconf |
146 |
done < ${configurefile} |
done < ${configurefile} |
147 |
fi |
fi |
148 |
|
|
149 |
alx_oldmconfigure --disable-nls ${myconf} $@ ${ALX_CONFIGURE_OPTS} || die |
alx_oldmconfigure ${myconf} $@ ${ALX_CONFIGURE_OPTS} || die |
150 |
} |
} |
151 |
|
|
152 |
# get custom mcore functions |
# get custom mcore functions |
159 |
echo -e "${COLBLUE}*** ${COLGREEN}Using custom build info from ${SMAGENAME%/*}/alx/${PNAME}.custom${COLDEFAULT}" |
echo -e "${COLBLUE}*** ${COLGREEN}Using custom build info from ${SMAGENAME%/*}/alx/${PNAME}.custom${COLDEFAULT}" |
160 |
source ${SMAGENAME%/*}/alx/${PNAME}.custom |
source ${SMAGENAME%/*}/alx/${PNAME}.custom |
161 |
fi |
fi |
|
|
|
|
export_inherits alx postinstall |
|