-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Some packages require or greatly benefit from some post-install configuration, scripts, and messages.
Add support for
- Plain text messages e.g. "You should add this to your PATH"
- Scripts
The post-install scripts may need to be dynamic so it has access to the package version.
An example might be:
post_install_message() {
cat <<TXT
You should add ${pkgdir}/libexec to the end of your PATH
TXT
}
post_install_script() {
cat <<SH
if [ ! -f $SYSCONF_DIR/etc/bashrc ]; then
echo "Installing default bashrc"
cp ${pkgprefix}/share/defaults/bashrc $SYSCONF_DIR/etc/bashrc
fi
SH
}Installing files into the /opt/local scope may be consideration for standard functionality. Something like:
maybe_install_defaults(
$pkgprefix/defaults/config $SYSCONF_DIR/$pkgname.config
)