diff options
Diffstat (limited to 'app/admin/syslog-ng/syslog-ng.SlackBuild')
-rwxr-xr-x | app/admin/syslog-ng/syslog-ng.SlackBuild | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/admin/syslog-ng/syslog-ng.SlackBuild b/app/admin/syslog-ng/syslog-ng.SlackBuild index 5c2fa073..43eed53f 100755 --- a/app/admin/syslog-ng/syslog-ng.SlackBuild +++ b/app/admin/syslog-ng/syslog-ng.SlackBuild @@ -193,10 +193,14 @@ syslog-ng: EODESC # Add a post-installation script (doinst.sh) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR cat << EOSCRIPT > "$PKG/install/doinst.sh" config() { NEW="\$1" OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)" + OLD="\$(dirname \$NEW)/\$(basename \$OLD .sample)" + OLD="\$(dirname \$NEW)/\$(basename \$OLD .dist)" + # If there's no config file by that name, mv it over: if [ ! -r \$OLD ]; then mv \$NEW \$OLD @@ -231,11 +235,17 @@ mkuser() { config etc/rc.d/rc.syslog-ng.new ; config etc/syslog-ng.conf.new EOSCRIPT +# Copy slack-required +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +if [ -f "$CWD/slack-required" ]; then + cp $CWD/slack-required $PKG/install +fi + # Build the package cd "$PKG" makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG # Delete source and build directories if requested -if [ "$CLEANUP" == "yes" ]; then +if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then rm -rf "$PKG_WORK" "$PKG" fi |