PREUN
/bin/sh
rm /usr/share/octave/packages/NLopt-2.4.2/packinfo/on_uninstall.m
if [ -e /usr/share/octave/packages/NLopt-2.4.2/packinfo/on_uninstall.m.orig ]; then
mv /usr/share/octave/packages/NLopt-2.4.2/packinfo/on_uninstall.m.orig /usr/share/octave/packages/NLopt-2.4.2/packinfo/on_uninstall.m
cd /usr/share/octave/packages/NLopt-2.4.2/packinfo
octave -H -q --no-window-system --no-site-file --eval "l=pkg('list');on_uninstall(l{cellfun(@(x)strcmp(x.name,'NLopt'),l)});";fi
POSTIN
/bin/sh
octave -H -q --no-window-system --no-site-file --eval "pkg rebuild";
POSTUN
/bin/sh
octave -H -q --no-window-system --no-site-file --eval "pkg rebuild";