diff options
author | Eric Hameleers <alien@slackware.com> | 2017-10-30 12:33:05 +0100 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2017-10-30 12:33:05 +0100 |
commit | 6eecd6bce706f02edba3ec689bc34cd54ac05092 (patch) | |
tree | 9855a7a12e7f67a5bd9dbd3a8da7a88179aae6af /kde | |
parent | 18297956d1b06ceff00265a2b24137f1100de223 (diff) | |
download | ktown-6eecd6bce706f02edba3ec689bc34cd54ac05092.tar.gz ktown-6eecd6bce706f02edba3ec689bc34cd54ac05092.tar.xz |
Allow for package build without installing; add 'nostrip' for debugging
Diffstat (limited to 'kde')
-rwxr-xr-x | kde/KDE.SlackBuild | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/kde/KDE.SlackBuild b/kde/KDE.SlackBuild index a5ff70b..36b054c 100755 --- a/kde/KDE.SlackBuild +++ b/kde/KDE.SlackBuild @@ -35,6 +35,7 @@ # ---------------------------------------------------------------------------- CLEANUP=${CLEANUP:-"yes"} # clean up build directory after successful build. +UPGRADE=${UPGRADE:-"yes"} # upgrade package after successful build. PRECHECK=${PRECHECK:-"no"} # don't let the script check the available sources. CHECKOUT=${CHECKOUT:-"no"} # don't let the script checkout missing sources. @@ -359,8 +360,10 @@ build_mod_pkg () { find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \; rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null - # Strip binaries: - strip_binaries $PKG + # Strip binaries if needed: + if [ ! -r $CWD/nostrip/${PKGNAME} ]; then + strip_binaries $PKG + fi # If there's any special post-install things to do, do them: if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then @@ -398,9 +401,11 @@ build_mod_pkg () { /sbin/makepkg -l y -c n ${SLACK_KDE_BUILD_DIR}/${kde_module}/${PKGNAME}-$(echo $MODULAR_PACKAGE_VERSION |tr - _)-${PKGARCH}-${MODBUILD}.txz fi # We will continue with the fresh packages installed: - upgradepkg --install-new --reinstall ${SLACK_KDE_BUILD_DIR}/${kde_module}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz - # Keep MIME database current: - /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null & + if [ "$UPGRADE" = "yes" -o "$UPGRADE" = "YES" ]; then + upgradepkg --install-new --reinstall ${SLACK_KDE_BUILD_DIR}/${kde_module}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz + # Keep MIME database current: + /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null & + fi fi # Reset $PKG to assume we're building the whole source dir: @@ -491,9 +496,11 @@ build_mod_pkg () { /sbin/makepkg -l y -c n ${SLACK_KDE_BUILD_DIR}/${kde_module}/${kde_module}-$(echo $VERSION |tr - _)-${PKGARCH}-${SRCDIRBUILD}.txz fi # We will continue with the fresh packages installed: - upgradepkg --install-new --reinstall ${SLACK_KDE_BUILD_DIR}/${kde_module}/${kde_module}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz - # Keep MIME database current: - /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null & + if [ "$UPGRADE" = "yes" -o "$UPGRADE" = "YES" ]; then + upgradepkg --install-new --reinstall ${SLACK_KDE_BUILD_DIR}/${kde_module}/${kde_module}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz + # Keep MIME database current: + /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null & + fi ) } |