8e60140f36
creation. * Enhance INSTALL/DEINSTALL scripts so that they may remove the RPM databases on deinstallation if RPM was never used. * Allow new knob RPM_DB_PREFIX that defaults to "/var/pkg" that is the prefix for the path to the RPM databases. The databases are kept in ${RPM_DB_PREFIX}/lib/rpm.
28 lines
470 B
Text
Executable file
28 lines
470 B
Text
Executable file
# INSTALL_TMPL replacement
|
|
#
|
|
# $NetBSD: INSTALL,v 1.2 2002/10/20 23:09:27 jlam Exp $
|
|
|
|
RPM="${PKG_PREFIX}/bin/rpm"
|
|
RPMDIR="@RPMDIR@"
|
|
|
|
case ${STAGE} in
|
|
PRE-INSTALL)
|
|
;;
|
|
|
|
POST-INSTALL)
|
|
${MKDIR} ${RPMDIR}
|
|
${TOUCH} ${RPMDIR}/.pre-timestamp
|
|
sleep 1
|
|
if ! ${RPM} -qa 2>/dev/null; then
|
|
${ECHO} "${PKGNAME}: initializing the RPM database..."
|
|
${RPM} --initdb
|
|
fi
|
|
sleep 1
|
|
${TOUCH} ${RPMDIR}/.post-timestamp
|
|
;;
|
|
|
|
*)
|
|
${ECHO} "Unexpected argument ${STAGE}"
|
|
exit 1
|
|
;;
|
|
esac
|