summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Clemons <andrew.clemons@gmail.com>2017-09-05 15:10:45 +0100
committerDavid Spencer <idlemoor@slackbuilds.org>2017-09-05 15:10:45 +0100
commit7ee790fe7718422ef4dfddfac16db521377eb325 (patch)
tree1bdf760ae4d3092966b275a86dc4f4192ef88505
parentd4784bea4be672a74ba67d91899dc9428fa93462 (diff)
downloadslackbuilds-7ee790fe7718422ef4dfddfac16db521377eb325.tar.gz
system/exa: Added (replacement for 'ls' written in Rust).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
-rw-r--r--system/exa/README1
-rw-r--r--system/exa/exa.SlackBuild200
-rw-r--r--system/exa/exa.info94
-rw-r--r--system/exa/slack-desc19
-rw-r--r--system/exa/vendor.diff36
5 files changed, 350 insertions, 0 deletions
diff --git a/system/exa/README b/system/exa/README
new file mode 100644
index 0000000000..11b0e72f1e
--- /dev/null
+++ b/system/exa/README
@@ -0,0 +1 @@
+exa - a replacement for ls written in Rust.
diff --git a/system/exa/exa.SlackBuild b/system/exa/exa.SlackBuild
new file mode 100644
index 0000000000..51154ddc62
--- /dev/null
+++ b/system/exa/exa.SlackBuild
@@ -0,0 +1,200 @@
+#!/bin/sh
+
+# Slackware build script for exa
+
+# Copyright 2017 Andrew Clemons, Wellington New Zealand
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=exa
+VERSION=${VERSION:-0.7.0}
+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}
+
+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
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+
+# cargo can't use vendored git depenencies so force zoneinfo_compiled git
+# snapshot to act like any other crate dependency.
+# tar.gz of the git commit is manipulated below in the dependecy loop to match
+# the patched Cargo.lock
+# https://github.com/rust-lang/cargo/pull/3992
+# https://github.com/alexcrichton/cargo-vendor/pull/42
+patch -p1 < $CWD/vendor.diff
+
+# 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
+
+ for dependency in ansi_term=0.8.0 \
+ bitflags=0.9.1 \
+ byteorder=0.4.2 \
+ cmake=0.1.24 \
+ datetime=0.4.4 \
+ gcc=0.3.51 \
+ getopts=0.2.14 \
+ git2=0.6.6 \
+ glob=0.2.11 \
+ idna=0.1.2 \
+ iso8601=0.1.1 \
+ lazy_static=0.2.8 \
+ libc=0.2.24 \
+ libgit2-sys=0.6.12 \
+ libz-sys=1.0.16 \
+ locale=0.2.2 \
+ matches=0.1.6 \
+ natord=1.0.9 \
+ nom=1.2.4 \
+ num=0.1.39 \
+ num-bigint=0.1.39 \
+ num-complex=0.1.38 \
+ num-integer=0.1.34 \
+ num-iter=0.1.33 \
+ num-rational=0.1.38 \
+ num-traits=0.1.39 \
+ num_cpus=1.6.2 \
+ number_prefix=0.2.7 \
+ pad=0.1.4 \
+ percent-encoding=1.0.0 \
+ pkg-config=0.3.9 \
+ rand=0.3.15 \
+ rustc-serialize=0.3.24 \
+ scoped_threadpool=0.1.7 \
+ term_grid=0.1.5 \
+ unicode-bidi=0.3.3 \
+ unicode-normalization=0.1.5 \
+ unicode-width=0.1.4 \
+ url=1.5.1 \
+ users=0.5.2 \
+ vcpkg=0.2.2 \
+ zoneinfo_compiled=0.2.1 ; do
+ dep="$(echo "$dependency" | cut -d= -f1)"
+ ver="$(echo "$dependency" | cut -d= -f2)"
+
+ if [ "$dep" = "zoneinfo_compiled" ] ; then
+ zoneinfo_srcnam="$(echo "$dep" | tr _ -)"
+ zoneinfo_sha1="f56921ea5e9f7cf065b1480ff270a1757c1f742f"
+ crate="$CWD/$zoneinfo_srcnam-$zoneinfo_sha1.tar.gz"
+ tar xvf "$crate"
+ mv "$zoneinfo_srcnam-$zoneinfo_sha1" "$dep-$ver"
+ else
+ crate="$CWD/$dep-$ver.crate"
+ tar xvf "$crate"
+ fi
+
+ 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 "$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
+)
+
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -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 {} \;
+
+cargo build --release
+
+mkdir -p $PKG/usr/share/bash-completion/completions/
+mkdir -p $PKG/usr/share/zsh/vendor-completions/
+mkdir -p $PKG/usr/bin
+
+make install install-bash-completions install-zsh-completions DESTDIR=$PKG PREFIX=/usr
+
+mv $PKG/usr/share/man $PKG/usr
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+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 LICENCE README.md $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}
diff --git a/system/exa/exa.info b/system/exa/exa.info
new file mode 100644
index 0000000000..7048d19a08
--- /dev/null
+++ b/system/exa/exa.info
@@ -0,0 +1,94 @@
+PRGNAM="exa"
+VERSION="0.7.0"
+HOMEPAGE="https://github.com/ogham/exa"
+DOWNLOAD="https://github.com/ogham/exa/archive/v0.7.0/exa-0.7.0.tar.gz \
+ https://github.com/rust-datetime/zoneinfo-compiled/archive/f56921ea5e9f7cf065b1480ff270a1757c1f742f/zoneinfo-compiled-f56921ea5e9f7cf065b1480ff270a1757c1f742f.tar.gz \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/ansi_term/ansi_term-0.8.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/bitflags/bitflags-0.9.1.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/byteorder/byteorder-0.4.2.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/cmake/cmake-0.1.24.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/datetime/datetime-0.4.4.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/gcc/gcc-0.3.51.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/getopts/getopts-0.2.14.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/git2/git2-0.6.6.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/glob/glob-0.2.11.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/idna/idna-0.1.2.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/iso8601/iso8601-0.1.1.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/lazy_static/lazy_static-0.2.8.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/libc/libc-0.2.24.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/libgit2-sys/libgit2-sys-0.6.12.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/libz-sys/libz-sys-1.0.16.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/locale/locale-0.2.2.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/matches/matches-0.1.6.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/natord/natord-1.0.9.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/nom/nom-1.2.4.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/num/num-0.1.39.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/num-bigint/num-bigint-0.1.39.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/num-complex/num-complex-0.1.38.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/num-integer/num-integer-0.1.34.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/num-iter/num-iter-0.1.33.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/num-rational/num-rational-0.1.38.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/num-traits/num-traits-0.1.39.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/num_cpus/num_cpus-1.6.2.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/number_prefix/number_prefix-0.2.7.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/pad/pad-0.1.4.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/percent-encoding/percent-encoding-1.0.0.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/pkg-config/pkg-config-0.3.9.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/rand/rand-0.3.15.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/rustc-serialize/rustc-serialize-0.3.24.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/scoped_threadpool/scoped_threadpool-0.1.7.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/term_grid/term_grid-0.1.5.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/unicode-bidi/unicode-bidi-0.3.3.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/unicode-normalization/unicode-normalization-0.1.5.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/unicode-width/unicode-width-0.1.4.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/url/url-1.5.1.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/users/users-0.5.2.crate \
+ https://crates-io.s3-us-west-1.amazonaws.com/crates/vcpkg/vcpkg-0.2.2.crate"
+MD5SUM="f79572b1ceeb01ef322245e81eb82f5c \
+ 459ee8da0c783c66da49460755658931 \
+ f715ae93f15bac515273f287af9d130b \
+ 8db34042da9ec719905b996a5b7182e1 \
+ 9601b4fb33dec3dfc2427447b7bfe800 \
+ 5ba94d4ed6d85d651fae0c0fdc655616 \
+ ef68f64adff899ce81876b82e038823c \
+ 29a192ed270c2f5fac905b42b04cfba1 \
+ 6d59f4fa29cab7bcc7ea7e0c8f96e27d \
+ 19777738baf6b245c316768b3017862c \
+ f8ece52bd2dc2019f8ccc8401d259ecf \
+ 6e8b5427bdfabb3ffb4248647211ba88 \
+ 4867b6387128434a377e6ab91ea65af8 \
+ 4f1b30ca715275fdbc0696a8fb60c850 \
+ a9ebdea7d1d6a44f0a86a8e84aa8db0d \
+ 3757a3e13e37466db8b253c9b224e92c \
+ ccd80468b385ca0eed5c70ac9ff0eb27 \
+ 4b6711425b661ef923c9ff3ef9ba8c67 \
+ 91f355db69eb1b80980ef8a7436fbc2b \
+ 5a9b94ba54ea1f52f2a496ba982e3282 \
+ 3796b5abe0f8c5f3a9e9441c5757a52c \
+ 6748c1b51604d62ac71e6afda86f0974 \
+ 6af60a15a792306d4f89de34c7b7995c \
+ df391e0eb99e890371946a275fb6dbc6 \
+ ab65c3547c78d746f6d7a2d23cf31aa2 \
+ f6f8717f2da0028625a1454de2b5ac56 \
+ 6baf866df236c03cda5e16b9f8b6073d \
+ 89df5f2ba26e17ed31e8ea82ae8a9763 \
+ 393ca202bd5c4304c3ea90fb5cc7617f \
+ ee9160e4e5f6bc37082515274324f88e \
+ c1f101feae32400220f6a667c3258365 \
+ f6403cafe6a20349d62ceb224a644092 \
+ 5dc94c21d86b663e4a1a65b47134f6c5 \
+ 7caa61be90bbd2509a18866cc8fe1217 \
+ 5e4ad69737043efed21e99c959727ef5 \
+ 472037f104fd6d766b68f0c8f68f309f \
+ da02803abeb560ab417393f2127283af \
+ f00f9edc506df726e52f16c7c5ef9862 \
+ c658f9f53055b9326b7fb214acc9858a \
+ 4576769468adf019f6500d3a84b7f68c \
+ bb21a839ce735f8d429b9e8ad8b2bc6e \
+ 251f36a3ed238d661a615bb76faae761 \
+ ce928aff50b1256ea43cb94ecc4cb017"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="rust"
+MAINTAINER="Andrew Clemons"
+EMAIL="andrew.clemons@gmail.com"
diff --git a/system/exa/slack-desc b/system/exa/slack-desc
new file mode 100644
index 0000000000..504985b039
--- /dev/null
+++ b/system/exa/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+exa: exa (replacement for 'ls' written in Rust)
+exa:
+exa: exa is a replacement for ls written in Rust.
+exa:
+exa: https://github.com/ogham/exa
+exa:
+exa:
+exa:
+exa:
+exa:
+exa:
diff --git a/system/exa/vendor.diff b/system/exa/vendor.diff
new file mode 100644
index 0000000000..72c8572d1c
--- /dev/null
+++ b/system/exa/vendor.diff
@@ -0,0 +1,36 @@
+diff -Naur exa-0.7.0.orig/Cargo.lock exa-0.7.0/Cargo.lock
+--- exa-0.7.0.orig/Cargo.lock 2017-07-07 22:47:47.000000000 +1200
++++ exa-0.7.0/Cargo.lock 2017-09-05 10:48:11.458581657 +1200
+@@ -17,7 +17,7 @@
+ "term_grid 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "users 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+- "zoneinfo_compiled 0.2.1 (git+https://github.com/rust-datetime/zoneinfo-compiled.git)",
++ "zoneinfo_compiled 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ ]
+
+ [[package]]
+@@ -325,7 +325,7 @@
+ [[package]]
+ name = "zoneinfo_compiled"
+ version = "0.2.1"
+-source = "git+https://github.com/rust-datetime/zoneinfo-compiled.git#f56921ea5e9f7cf065b1480ff270a1757c1f742f"
++source = "registry+https://github.com/rust-lang/crates.io-index"
+ dependencies = [
+ "byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "datetime 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
+@@ -373,4 +373,4 @@
+ "checksum url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb819346883532a271eb626deb43c4a1bb4c4dd47c519bd78137c3e72a4fe27"
+ "checksum users 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7ae8fdf783cb9652109c99886459648feb92ecc749e6b8e7930f6decba74c7c"
+ "checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b"
+-"checksum zoneinfo_compiled 0.2.1 (git+https://github.com/rust-datetime/zoneinfo-compiled.git)" = "<none>"
++"checksum zoneinfo_compiled 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b338ee965ea75f23713b17bda5bfa61989eb4ebc8e97de2267fedf0d3cf6f2d9"
+diff -Naur exa-0.7.0.orig/Cargo.toml exa-0.7.0/Cargo.toml
+--- exa-0.7.0.orig/Cargo.toml 2017-07-07 22:47:47.000000000 +1200
++++ exa-0.7.0/Cargo.toml 2017-09-05 10:47:08.089382461 +1200
+@@ -43,4 +43,4 @@
+ default-features = false
+
+ [dependencies.zoneinfo_compiled]
+-git = "https://github.com/rust-datetime/zoneinfo-compiled.git"
++version = "0.2.1"