From 9fae5df5c15fad0dbb35d04df7e2065b516f8461 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 1 Apr 2022 17:57:16 -0400 Subject: office/adobe-reader: Fix .desktop, symlinks. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- office/adobe-reader/adobe-reader.SlackBuild | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/office/adobe-reader/adobe-reader.SlackBuild b/office/adobe-reader/adobe-reader.SlackBuild index d5f88ef5b973..6ae4342146d0 100644 --- a/office/adobe-reader/adobe-reader.SlackBuild +++ b/office/adobe-reader/adobe-reader.SlackBuild @@ -26,18 +26,19 @@ # Thanks to Andrew Brouwers for the original SlackBuild script and for # permission to modify it as needed. +# 20220401 bkw: Modified by SlackBuilds.org, BUILD=2: +# - make desktop file validate. +# - use relative symlinks, not absolute. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=adobe-reader VERSION=${VERSION:-9.5.5} ARCH=i486 # Leave this alone for acroread -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -68,12 +69,18 @@ tar xf $TMP/AdobeReader/ILINXR.TAR cd $PKG/opt/Adobe +# 20220401 bkw: desktop-file-validate +sed -i -e '/^Caption/d' \ + -e '/^Categories/s,Application;,,' \ + -e 's, *$,,' \ + Reader9/Resource/Support/AdobeReader.desktop + # Remove stuff we don't need rm -rf Reader9/Reader/HowTo rm -r Reader9/Browser/{HowTo,install_browser_plugin} # Add symlink for binary to /usr/bin -( cd $PKG/usr/bin ; ln -sf /opt/Adobe/Reader9/bin/acroread . ) +( cd $PKG/usr/bin ; ln -sf ../../opt/Adobe/Reader9/bin/acroread . ) # Add symlink for browser plugins mkdir -p $PKG/usr/lib/mozilla/plugins @@ -111,7 +118,7 @@ sed -i 's/_filedir/_acroread_filedir/g' $PKG/opt/Adobe/Reader9/Resource/Shell/ac # Link completion script to /usr/share/bash-completion/completions mkdir -p $PKG/usr/share/bash-completion/completions -ln -sf /opt/Adobe/Reader9/Resource/Shell/acroread_tab \ +ln -sf ../../../../opt/Adobe/Reader9/Resource/Shell/acroread_tab \ $PKG/usr/share/bash-completion/completions/acroread # Move docs to their correct locations @@ -129,9 +136,9 @@ find . -type d -exec chmod 755 {} \; 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 {} \+ # No stripping of binaries and such, as Firefox doesn't like naked acroread :D # Just build the package... ;P -- cgit v1.2.3