summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author B. Watson <yalhcru@gmail.com>2022-04-18 10:27:52 -0400
committer B. Watson <yalhcru@gmail.com>2022-04-18 10:27:52 -0400
commit6bea8c4f0bb8b5c89aaee53c96e356559da9d71b (patch)
treefd9c2d3a58c693ee031c3de2f18f58c47c341845
parentec75666b0cca84f1a84be527fe62f8d76c463180 (diff)
downloadslackbuilds-6bea8c4f0bb8b5c89aaee53c96e356559da9d71b.tar.gz
slackbuilds-6bea8c4f0bb8b5c89aaee53c96e356559da9d71b.tar.xz
libraries/tDOM: Fix tarball handling.
Signed-off-by: B. Watson <yalhcru@gmail.com>
-rw-r--r--libraries/tDOM/tDOM.SlackBuild18
1 files changed, 12 insertions, 6 deletions
diff --git a/libraries/tDOM/tDOM.SlackBuild b/libraries/tDOM/tDOM.SlackBuild
index 44f059c670..f5f4ebdf6c 100644
--- a/libraries/tDOM/tDOM.SlackBuild
+++ b/libraries/tDOM/tDOM.SlackBuild
@@ -22,6 +22,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220301 bkw: Modified by SlackBuilds.org: fix tarball handling.
+# No changes to package, so BUILD stays at 4.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=tDOM
@@ -42,9 +45,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# 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
@@ -70,18 +70,24 @@ fi
set -e
+# 20220418 bkw: need this in case the source file has been downloaded
+# multiple times: it gets different gibberish (CGI params) appended
+# every time, if you use wget with its defaults.
+TARBALL="$CWD/$PRGNAM-$VERSION.tgz"
+[ -e "$TARBALL" ] || TARBALL="$( ls $TARBALL* | head -1 )"
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tgz*
+tar xvf $TARBALL
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 {} \+
# Upstream patch
# https://github.com/tDOM/tdom/commit/3dd529139d2f44bb9ecfdcddd27b3d6a8df5ff41#diff-0