From 6b4229fa0deccde600ccd07e78e0e410cec590d4 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 30 Jun 2023 18:47:10 -0400 Subject: office/khal: Fix completions. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- office/khal/khal.SlackBuild | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/office/khal/khal.SlackBuild b/office/khal/khal.SlackBuild index acd9933a5e5b..981b93a77167 100644 --- a/office/khal/khal.SlackBuild +++ b/office/khal/khal.SlackBuild @@ -22,11 +22,17 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20230630 bkw: Modified by SlackBuilds.org, BUILD=3: +# - install the completions in the correct dirs (not /usr/doc). +# also install them with correct ownership ($CWD could be owned +# by anybody so you can't "cp -a $CWD/..."). +# - remove SLKCFLAGS and strip stuff (no compiled code here). + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=khal VERSION=${VERSION:-0.11.1} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -47,20 +53,6 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - set -e rm -rf $PKG @@ -72,26 +64,31 @@ cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} + -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} + python3 setup.py install --root=$PKG -# Strip binaries and libraries. -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ *.rst doc/* \ - $CWD/khal-complete.* \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild # Remove directory containing only .gitignore rm -rf $PKG/usr/doc/$PRGNAM-$VERSION/source/ystatic +# 20230630 bkw: install the completion stuff in the right places. +mkdir -p $PKG/usr/share/bash-completion/completions \ + $PKG/usr/share/zsh/site-functions \ + $PKG/usr/share/fish/completions + +# 20230630 bkw: N.B. do not use "cp -a" to copy files from $CWD. +cat $CWD/khal-complete.bash > $PKG/usr/share/bash-completion/completions/khal +cat $CWD/khal-complete.zsh > $PKG/usr/share/zsh/site-functions/_khal +cat $CWD/khal-complete.fish > $PKG/usr/share/fish/completions/khal.fish + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -- cgit v1.2.3