Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support post-install messages and actions #1

Open
2 tasks
mroach opened this issue Oct 16, 2019 · 0 comments
Open
2 tasks

Support post-install messages and actions #1

mroach opened this issue Oct 16, 2019 · 0 comments
Labels
builder enhancement New feature or request ipm package manager

Comments

@mroach
Copy link
Owner

mroach commented Oct 16, 2019

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
)
@mroach mroach added enhancement New feature or request ipm package manager builder labels Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builder enhancement New feature or request ipm package manager
Projects
None yet
Development

No branches or pull requests

1 participant