7 |
# include alx functions |
# include alx functions |
8 |
INHERITS="${INHERITS} alx" |
INHERITS="${INHERITS} alx" |
9 |
|
|
|
# all deprecated mage-targets |
|
|
DEPRECATED_MAGE_TARGETS="alx_dev alx_livecd alx" |
|
|
|
|
|
# variable to save pname |
|
|
_PNAME="${PNAME}" |
|
|
|
|
|
SPECIAL_VARS="${SPECIAL_VARS} DEPRECATED_MAGE_TARGETS REMOVE_DEPRECATED_MAGE_TARGETS _PNAME" |
|
|
SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} alx_postinstall" |
|
|
|
|
|
alx_postinstall() |
|
|
{ |
|
|
local target |
|
|
|
|
|
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 |
|
|
} |
|
|
|
|
10 |
# injects files to given path (defaults to /usr/bin) |
# injects files to given path (defaults to /usr/bin) |
11 |
# mcinjectfile file {/path/to/dest} |
# mcinjectfile file {/path/to/dest} |
12 |
mcinjectfile() |
mcinjectfile() |
21 |
if [[ -z $2 ]] |
if [[ -z $2 ]] |
22 |
then |
then |
23 |
dest=/usr/bin |
dest=/usr/bin |
|
install -d ${BINDIR}/${dest} || die |
|
24 |
fi |
fi |
25 |
|
|
26 |
|
# needed directory |
27 |
|
#minstalldir ${dest} || die |
28 |
|
|
29 |
# install our configfile |
# install our configfile |
30 |
install -m 0644 -o root -g root ${file} ${BINDIR}/${dest} || die |
minstallfile ${file} ${dest} || die |
31 |
} |
} |
32 |
|
|
33 |
# injects executables to given path |
# injects executables to given path |
44 |
if [[ -z $2 ]] |
if [[ -z $2 ]] |
45 |
then |
then |
46 |
dest=/usr/bin |
dest=/usr/bin |
|
install -d ${BINDIR}/${dest} || die |
|
47 |
fi |
fi |
48 |
|
|
49 |
|
# needed directory |
50 |
|
#minstalldir ${dest} || die |
51 |
|
|
52 |
# install our configfile |
# install our configfile |
53 |
install -m 0755 -o root -g root ${file} ${BINDIR}/${dest} || die |
minstallexec ${file} ${dest} || die |
54 |
} |
} |
55 |
|
|
56 |
# injects a patch to the sourcecode |
# injects a patch to the sourcecode |
132 |
done < ${configurefile} |
done < ${configurefile} |
133 |
fi |
fi |
134 |
|
|
135 |
alx_oldmconfigure --disable-nls ${myconf} $@ ${ALX_CONFIGURE_OPTS} || die |
alx_oldmconfigure ${myconf} $@ ${ALX_CONFIGURE_OPTS} || die |
136 |
} |
} |
137 |
|
|
138 |
# get custom mcore functions |
# get custom mcore functions |
145 |
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}" |
146 |
source ${SMAGENAME%/*}/alx/${PNAME}.custom |
source ${SMAGENAME%/*}/alx/${PNAME}.custom |
147 |
fi |
fi |
|
|
|
|
export_inherits alx postinstall |
|