diff options
author | B. Watson <yalhcru@gmail.com> | 2020-11-20 14:36:33 +0000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-11-22 01:14:19 +0700 |
commit | d54c49f734260c37136169b42076c0cb8055af56 (patch) | |
tree | 01a5662c276afa817ef0f83779445c3353241381 /system/xidel/xidel.SlackBuild | |
parent | ea7b65a8fa9cb6a731f214bd328d43fd1f15b4dd (diff) |
system/xidel: Added (extract data from HTML/XML/JSON files or pages)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/xidel/xidel.SlackBuild')
-rw-r--r-- | system/xidel/xidel.SlackBuild | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/system/xidel/xidel.SlackBuild b/system/xidel/xidel.SlackBuild new file mode 100644 index 0000000000000..a13c4c6979ffa --- /dev/null +++ b/system/xidel/xidel.SlackBuild @@ -0,0 +1,62 @@ +#!/bin/sh + +# Slackware build script for xidel + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=xidel +VERSION=${VERSION:-0.9.8} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# No CFLAGS (Pascal, not C), no need for LIBDIRSUFFIX. Upstream +# uses fpc's -O3 option, for whatever that's worth. + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION-src +tar xvf $CWD/$PRGNAM-$VERSION.src.tar.gz +cd $PRGNAM-$VERSION-src +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +# Fairly weird build process, but simple enough. -s means strip. Tests +# require internet access, so disabled by default. +[ "${TESTS:-no}" = "yes" ] && T="-t" + +cd programs/internet/$PRGNAM +./build.sh -s $T +mkdir -p $PKG/usr/bin +cp -a $PRGNAM $PKG/usr/bin + +mkdir -p $PKG/usr/man/man1 +gzip -9c < meta/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README* COPYING changelog examples $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |