summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorAndrew Clemons <andrew.clemons@gmail.com>2019-01-03 15:21:15 +1300
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-01-05 07:49:21 +0700
commit1a83048ee9b331d0fcafd02fcbefb1683d6acda8 (patch)
treeed809bea102a6305cf3c128b554eb1ca39f44772 /network
parent7d8c00f6d91a0c31d33ece472b3b3c59705dc2c6 (diff)
downloadslackbuilds-1a83048ee9b331d0fcafd02fcbefb1683d6acda8.tar.gz
network/newsboat: Updated for version 2.14.
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/newsboat/newsboat.SlackBuild73
-rw-r--r--network/newsboat/newsboat.info154
2 files changed, 219 insertions, 8 deletions
diff --git a/network/newsboat/newsboat.SlackBuild b/network/newsboat/newsboat.SlackBuild
index f93d035df6..9edcbd341b 100644
--- a/network/newsboat/newsboat.SlackBuild
+++ b/network/newsboat/newsboat.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for newsboat
# Copyright 2017-2018 Benjamin Trigona-Harany <slackbuilds@jaxartes.net>
+# Copyright 2019 Andrew Clemons, Wellington New Zealand
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +24,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=newsboat
-VERSION=${VERSION:-2.13}
+VERSION=${VERSION:-2.14}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -33,6 +34,12 @@ if [ -z "$ARCH" ]; then
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
+
+ if [ "$ARCH" = "i586" ]; then
+ if rustc -Vv | grep host | grep i686 > /dev/null ; then
+ ARCH=i686
+ fi
+ fi
fi
CWD=$(pwd)
@@ -43,15 +50,19 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
+ CARGOTARGET="--target i586-unknown-linux-gnu"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
+ CARGOTARGET="--target i686-unknown-linux-gnu"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+ CARGOTARGET="--target x86_64-unknown-linux-gnu"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
+ CARGOTARGET=""
fi
set -e
@@ -62,6 +73,57 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
+
+# build offline
+# configuration tells cargo to use the configured directory
+# for dependencies intead of downloading from crates.io
+mkdir .cargo
+cat << EOF >> .cargo/config
+[source.crates-io]
+registry = 'https://github.com/rust-lang/crates.io-index'
+replace-with = 'vendored-sources'
+
+[source.vendored-sources]
+directory = '$(pwd)/vendor'
+EOF
+
+# deps and versions come from Cargo.lock
+mkdir vendor
+(
+ cd vendor
+
+ grep -h -A 3 "\[\[package\]\]" $(find ../ -maxdepth 1 -mindepth 1 -name Cargo.lock | tr '\n' ' ') | \
+ sed 's/[[:space:]]*=[[:space:]]*/=/g;s/^--//;s/^\[\[/--\n[[/' | \
+ awk 'BEGIN { RS = "--\n" ; FS="\n" } { print $2, $3, $4 }' | sed 's/"//g;s/name=//;s/ version=/=/' | \
+ grep crates\.io-index | sed 's/ source=.*$//' | sort -u | while read -r dep ; do
+
+ ver="$(printf "%s\n" "$dep" | cut -d= -f2)"
+ dep="$(printf "%s\n" "$dep" | cut -d= -f1)"
+
+ tar xvf $CWD/$dep-$ver.crate
+
+ touch $dep-$ver/.cargo-ok
+
+ # generate checksum
+ {
+ printf "{\n"
+ printf ' "files": {\n'
+
+ (
+ cd $dep-$ver
+ find . -type f -print0 | xargs -0 sha256sum | sed -n '/\.cargo-checksum\.json/!p' | sed 's/\.\///;s/^\([^ ]*\)[[:space:]][[:space:]]*\(.*\)$/"\2":"\1",/'
+ ) | sed '$ s/,$//'
+
+ printf " },\n"
+ printf ' "package": "'
+
+ sha256sum "$CWD/$dep-$ver.crate" | cut -f1 -d' ' | sed 's/$/"/'
+
+ printf "}\n"
+ } | python -c "import sys, json; data = sys.stdin.read(); print json.dumps(json.loads(data), sort_keys=True, indent=4, separators=(',', ' : '))" > $dep-$ver/.cargo-checksum.json
+ done
+)
+
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -69,9 +131,14 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+if [ "$CARGOTARGET" != "" ] ; then
+ RELEASEDIR="$(echo "$CARGOTARGET" | cut -d' ' -f2)"
+ sed -i "s|target/release|target/$RELEASEDIR/release|" Makefile
+fi
+
CXXFLAGS="$SLKCFLAGS" \
-make \
- prefix=/usr
+CARGO_FLAGS="$CARGOTARGET" \
+make -j1 prefix=/usr
make doc
make install \
prefix=/usr \
diff --git a/network/newsboat/newsboat.info b/network/newsboat/newsboat.info
index 96976d15d8..335ce178b9 100644
--- a/network/newsboat/newsboat.info
+++ b/network/newsboat/newsboat.info
@@ -1,10 +1,154 @@
PRGNAM="newsboat"
-VERSION="2.13"
+VERSION="2.14"
HOMEPAGE="https://www.newsboat.org/"
-DOWNLOAD="https://newsboat.org/releases/2.13/newsboat-2.13.tar.xz"
-MD5SUM="f46a566ccc404718c0e0a269a981cd14"
+DOWNLOAD="https://newsboat.org/releases/2.14/newsboat-2.14.tar.xz \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/aho-corasick/aho-corasick-0.6.9.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/argon2rs/argon2rs-0.2.5.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/arrayvec/arrayvec-0.4.9.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/autocfg/autocfg-0.1.1.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/backtrace-sys/backtrace-sys-0.1.26.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/backtrace/backtrace-0.3.13.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/bitflags/bitflags-1.0.4.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/blake2-rfc/blake2-rfc-0.2.18.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/cc/cc-1.0.26.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/cfg-if/cfg-if-0.1.6.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/chrono/chrono-0.4.6.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/cloudabi/cloudabi-0.0.3.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/constant_time_eq/constant_time_eq-0.1.3.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/dirs/dirs-1.0.4.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/failure/failure-0.1.3.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/failure_derive/failure_derive-0.1.3.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/fuchsia-zircon-sys/fuchsia-zircon-sys-0.3.3.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/fuchsia-zircon/fuchsia-zircon-0.3.3.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/idna/idna-0.1.5.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/lazy_static/lazy_static-1.2.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/libc/libc-0.2.45.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/lock_api/lock_api-0.1.5.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/matches/matches-0.1.8.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/memchr/memchr-2.1.2.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/nodrop/nodrop-0.1.13.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/num-integer/num-integer-0.1.39.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/num-traits/num-traits-0.2.6.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/once_cell/once_cell-0.1.6.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/parking_lot/parking_lot-0.6.4.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/parking_lot_core/parking_lot_core-0.3.1.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/percent-encoding/percent-encoding-1.0.1.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/proc-macro2/proc-macro2-0.4.24.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/quote/quote-0.6.10.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/rand/rand-0.4.3.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/rand/rand-0.5.5.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/rand/rand-0.6.1.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/rand_chacha/rand_chacha-0.1.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/rand_core/rand_core-0.2.2.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/rand_core/rand_core-0.3.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/rand_hc/rand_hc-0.1.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/rand_isaac/rand_isaac-0.1.1.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/rand_pcg/rand_pcg-0.1.1.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/rand_xorshift/rand_xorshift-0.1.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/redox_syscall/redox_syscall-0.1.44.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/redox_users/redox_users-0.2.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/regex-syntax/regex-syntax-0.6.4.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/regex/regex-1.1.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/remove_dir_all/remove_dir_all-0.5.1.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/rustc-demangle/rustc-demangle-0.1.11.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/rustc_version/rustc_version-0.2.3.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/scoped_threadpool/scoped_threadpool-0.1.9.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/scopeguard/scopeguard-0.3.3.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/semver-parser/semver-parser-0.7.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/semver/semver-0.9.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/smallvec/smallvec-0.6.7.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/syn/syn-0.15.23.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/synstructure/synstructure-0.10.1.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/tempfile/tempfile-3.0.5.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/thread_local/thread_local-0.3.6.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/time/time-0.1.41.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/ucd-util/ucd-util-0.1.3.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/unicode-bidi/unicode-bidi-0.3.4.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/unicode-normalization/unicode-normalization-0.1.7.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/unicode-xid/unicode-xid-0.1.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/unreachable/unreachable-1.0.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/url/url-1.7.2.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/utf8-ranges/utf8-ranges-1.0.2.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/version_check/version_check-0.1.5.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/void/void-1.0.2.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/winapi-i686-pc-windows-gnu/winapi-i686-pc-windows-gnu-0.4.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/winapi-x86_64-pc-windows-gnu/winapi-x86_64-pc-windows-gnu-0.4.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/winapi/winapi-0.3.6.crate"
+MD5SUM="2c686365e97cb04195cf5ce979c90369 \
+ d26d000426208c255a95368923467618 \
+ e1efb9a37395a38bd80ccfc911d4a6e8 \
+ e59ff1a6bce94fb1013cbd54b8675de8 \
+ fd61c62ff949208f15ae02a4b475a1ef \
+ 548d43f797aa1fea23a728662bb58a2e \
+ d38ff4b8e1d15e7488420ea9c428e8a2 \
+ e5767560aad375059c975285c07022c0 \
+ 027635e453eccbfd0a2b02a440e334a6 \
+ 0e2df986078bc2376ea0c027c10d6aae \
+ daa64e5a0e1b6d710877be51f27ccd3c \
+ ed2b1c5fd000f926c2aedb0c3bd1d199 \
+ 1c8b50f8528dd37df7d984e0e4b61bd5 \
+ 701334c674b3fc3ace74045e3a2fae50 \
+ 701d24caea00efef86966950d11900da \
+ aea67af76e8072168f5346f166f9f573 \
+ 3af6cdff911dc3d76b9a5b3c2443d91f \
+ 54cfab480b7a5f7302eadf44129d3f4b \
+ dd7c80c2d04d2e9ceba82826cf69764d \
+ 89cabfcb37602a7b200b1a9cd660ee2e \
+ 330c760718d1130f318457fe4725b0dd \
+ 63a8bbe691a876ff0ece9893f242093a \
+ ac6a4d0d3c5cd5718800d285c2da55c5 \
+ 7916dcd738a8fa6a2798754c20d6e146 \
+ 1dd071d2d9c3aeb5cfc40951111476d4 \
+ 8a39d8bd95f15af0840d2049f0e78a37 \
+ 4092ed5c67c6ff1c6a7bcf463bc40a53 \
+ cbdebc326641fcab42bc92a113548740 \
+ eb990419bab44aa031d841e5e53dc5cc \
+ cfc2fa00b6829d7e27c3c81c669e5fed \
+ 27363360c544fc6f398567e759821bca \
+ 8a5fc6ba84f3ac8a7e43ecb99322866c \
+ 956a07fa5991333acd1a222c68950194 \
+ cff6d0d12e74ebe26535ee9c6668d1cc \
+ b8e402de21805717cdaa0c2f122a2a26 \
+ 47bbc871bdfc0b6c2213c1b60890fe92 \
+ bf6d57361c2f4106b3ac5e53c59406ae \
+ c7248b52f92354afd8f2e3960cdcb558 \
+ 58ce576e12cf7111693210bca7edbe76 \
+ 1ffaad533e741d447655a83a40fe0b66 \
+ 28b1e6d15e1ba8cf3a2e953ce7fcd3de \
+ 74b15f1928431937f14ed91fdc12b542 \
+ 3f5b37c228efbd014e7bb617f2abedf1 \
+ 8cf8f1914a173dfc73c2964b8e9b5358 \
+ f441e95e551ddb330e317d9c7fb85639 \
+ f91e69d935946bdc258a0ed22dceeaad \
+ e41c7199212700ca4124d26224208ccd \
+ 9f099c64e6db617887ba150c117baf13 \
+ 09422dcb1cd6e3c30598296d2d3d4798 \
+ 47b948a5bbabb203f9dcab1bb96956c8 \
+ 4d101ab24d14c54937c5f45ece8fad5f \
+ b492e0a70603c3903a44ec5cabd3ba21 \
+ 500e5bb7d9b5a8882e2e961012391a58 \
+ 8b4d8c7b6e3a060d365bc1ad650929fa \
+ 64111c20b69aa1532fb66b70c4660b55 \
+ c310f2e9b9edf41625ea905bfd5a67b4 \
+ 093ca6cb955bc1504c532add04e9ad90 \
+ d155c08de6c18bd55639ffed629894b9 \
+ b30d6b23bce6480f07df5b2056b8f937 \
+ baaa166f66e90e94b76b7418afd5df90 \
+ 879a10bf78b566c3baf4cdd22c2ec8d5 \
+ d34a9f507f3ecf7d93c07deb74f1cd7c \
+ f403bbb812ce1a2d9270d9159cf9e8d3 \
+ f9c3f9df08be27f5d7cc8c0a06a71d81 \
+ 5aaf04f9a94a6450e3e4963ddd62b92d \
+ b390278bbea483da591b1bc026be5fa2 \
+ 32f0ced8a8881d2c0572b879bf15b91e \
+ 9c27232c12abb96c68e10e21f2012639 \
+ f48add3d6234e8b9829fa5364509f425 \
+ 689203efc084fc0f1d1f74f5d354ae75 \
+ db96b50050277bf05a3c68534bbb9586 \
+ 09de9d01e7331ff3da11f58be8bef0df \
+ 40909511b3d0e2dba891f438715808d0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="stfl"
-MAINTAINER="Benjamin Trigona-Harany"
-EMAIL="slackbuilds@jaxartes.net"
+MAINTAINER="Andrew Clemons"
+EMAIL="andrew.clemons@gmail.com"