pkgsrc/mk/pkginstall/deinstall
prlw1 5c827f6f0e Essentially from OBATA Akio in private mail, June 2015:
Introduce Icon Theme cache handling framework

Icon Theme cache files are used by GTK+ and maintained with the
gtk-update-icon-cache tool.  Each Icon Theme package duplicates
its own maintainance scripts: only the specified icon theme directory
differs.  With this framework, if packages have ICON_THEMES=yes,
associated icon themes will be detected and their cache files will
be maintained automatically.

Change cache handling behaviour as follows:
* Icon theme caches will be updated if either gtk2+ or gtk3+
  gtk-update-icon-cache tool is available.
* With installation of gtk2+ package, not only hicolor icon theme but
  also any other icon theme cache files will be updated.
* Prevent removal of icon caches at deinstall, gtk3+ may be installed and
  using them.
* Ditto with gtk3+, gtk2+ may not be installed now, so caches must be
  maintained by gtk3+.
2017-06-14 16:23:09 +00:00

70 lines
1.6 KiB
Text

# $NetBSD: deinstall,v 1.5 2017/06/14 16:23:09 prlw1 Exp $
case ${STAGE} in
DEINSTALL)
#
# Unregister package from ocaml-findlib.
#
${TEST} ! -x ./+OCAML_FINDLIB_REGISTER ||
./+OCAML_FINDLIB_REGISTER REMOVE ${OCAML_FINDLIB_DIR}
#
# Unregister info files.
#
${TEST} ! -x ./+INFO_FILES ||
./+INFO_FILES REMOVE ${PKG_METADATA_DIR}
#
# Remove any icon theme caches.
#
${TEST} ! -x ./+ICON_THEMES ||
./+ICON_THEMES REMOVE ${PKG_METADATA_DIR}
#
# Remove shells from /etc/shells.
#
${TEST} ! -x ./+SHELL ||
./+SHELL REMOVE ${PKG_METADATA_DIR}
${TEST} ! -x ./+SHELL ||
./+SHELL CHECK-REMOVE ${PKG_METADATA_DIR}
# Remove configuration files if they don't differ from the default
# config file.
#
${TEST} ! -x ./+FILES ||
./+FILES REMOVE ${PKG_METADATA_DIR}
;;
POST-DEINSTALL)
#
# Update any fonts databases.
#
${TEST} ! -x ./+FONTS ||
./+FONTS ${PKG_METADATA_DIR}
#
# Update any icon theme caches.
#
${TEST} ! -x ./+ICON_THEMES ||
./+ICON_THEMES UPDATE ${PKG_METADATA_DIR}
#
# Rebuild the system run-time library search path database.
#
${TEST} ! -x ./+SHLIBS ||
./+SHLIBS REMOVE ${PKG_METADATA_DIR}
#
# Remove empty directories and unused users/groups.
#
${TEST} ! -x ./+DIRS ||
./+DIRS REMOVE ${PKG_METADATA_DIR}
${TEST} ! -x ./+USERGROUP ||
./+USERGROUP REMOVE ${PKG_METADATA_DIR}
#
# Check for any existing bits after we're finished de-installing.
#
${TEST} ! -x ./+USERGROUP ||
./+USERGROUP CHECK-REMOVE ${PKG_METADATA_DIR}
${TEST} ! -x ./+FILES ||
./+FILES CHECK-REMOVE ${PKG_METADATA_DIR}
${TEST} ! -x ./+DIRS ||
./+DIRS CHECK-REMOVE ${PKG_METADATA_DIR}
;;
esac