pkgsrc/mk/pkginstall/install
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

87 lines
2 KiB
Text

# $NetBSD: install,v 1.5 2017/06/14 16:23:09 prlw1 Exp $
case ${STAGE} in
PRE-INSTALL)
#
# Unpack the helper scriptlets.
#
${SH} ${SELF} ${PKGNAME} UNPACK
#
# Require that necessary users and groups exist or else fail the
# installation of the package.
#
${TEST} ! -x ./+USERGROUP ||
{ ./+USERGROUP ADD ${PKG_METADATA_DIR}
if ./+USERGROUP CHECK-ADD ${PKG_METADATA_DIR}; then
:
else
exit 1
fi; }
${TEST} ! -x ./+DIRS ||
./+DIRS ADD ${PKG_METADATA_DIR}
${TEST} ! -x ./+DIRS ||
./+DIRS PERMS ${PKG_METADATA_DIR}
;;
POST-INSTALL)
#
# Rebuild the system run-time library search path database.
#
${TEST} ! -x ./+SHLIBS ||
./+SHLIBS ADD ${PKG_METADATA_DIR}
#
# Copy configuration/support files into place.
#
${TEST} ! -x ./+FILES ||
./+FILES ADD ${PKG_METADATA_DIR}
${TEST} ! -x ./+FILES ||
./+FILES PERMS ${PKG_METADATA_DIR}
#
# Set special permissions on any files/directories that need them.
#
${TEST} ! -x ./+PERMS ||
./+PERMS ${PKG_METADATA_DIR}
#
# 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}
# Check for any missing bits after we're finished installing.
#
${TEST} ! -x ./+DIRS ||
./+DIRS CHECK-ADD ${PKG_METADATA_DIR}
${TEST} ! -x ./+DIRS ||
./+DIRS CHECK-PERMS ${PKG_METADATA_DIR}
${TEST} ! -x ./+FILES ||
./+FILES CHECK-ADD ${PKG_METADATA_DIR}
${TEST} ! -x ./+FILES ||
./+FILES CHECK-PERMS ${PKG_METADATA_DIR}
#
# Register shells in /etc/shells.
#
${TEST} ! -x ./+SHELL ||
./+SHELL ADD ${PKG_METADATA_DIR}
${TEST} ! -x ./+SHELL ||
./+SHELL CHECK-ADD ${PKG_METADATA_DIR}
#
# Register info files.
#
${TEST} ! -x ./+INFO_FILES ||
./+INFO_FILES ADD ${PKG_METADATA_DIR}
#
# Register package into ocaml-findlib.
#
${TEST} ! -x ./+OCAML_FINDLIB_REGISTER ||
./+OCAML_FINDLIB_REGISTER ADD ${PKG_METADATA_DIR}
;;
esac