packages: Move remove(), pre_install(), post_install() to debfetcher

This commit is contained in:
2023-04-09 15:59:54 +02:00
parent 6240cb0a34
commit ff810caf10
4 changed files with 24 additions and 73 deletions

View File

@ -7,21 +7,6 @@ PACKAGE="spotify-client"
TS=$(date +%s)
THIS_BASEDIR="/opt/spotify"
remove()
{
rm -rf -- "${DEBFETCHER_INSTALL_DESTDIR}/${THIS_BASEDIR}"
}
pre_install()
{
CURRENT_DIR="${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}"
if [ -d "${CURRENT_DIR}" ] ; then
mv -- "${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}" "${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}_${TS}"
fi
}
install()
{
mkdir -p ${DEBFETCHER_INSTALL_DESTDIR}/${THIS_BASEDIR}
@ -30,11 +15,3 @@ install()
ln -sf ${DEBFETCHER_INSTALL_DESTDIR}/opt/spotify/spotify "${DEBFETCHER_BIN_SYMLINK_DIR}"
}
post_install()
{
if [ ${KEEP_OLD} -eq 0 ] ; then
rm -rf -- "${DEBFETCHER_INSTALL_DESTDIR}${THIS_BASEDIR}_${TS}"
fi
}