aboutsummaryrefslogtreecommitdiffstats
path: root/testing/pixz
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2018-02-19 19:09:17 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2018-02-19 19:11:00 +0000
commitbb078ac5e4aae00005fb1db57f5f4e73d6096d4e (patch)
treedbf2c8499d566959e2a4b32378a742f18e018889 /testing/pixz
parentf934fae50830dfaa9191262bfc3dce8907dccf39 (diff)
downloadaports-bb078ac5e4aae00005fb1db57f5f4e73d6096d4e.tar.bz2
aports-bb078ac5e4aae00005fb1db57f5f4e73d6096d4e.tar.xz
testing/pixz: new aport
Diffstat (limited to 'testing/pixz')
-rw-r--r--testing/pixz/0001-use-posix-shell-for-tests.patch82
-rw-r--r--testing/pixz/APKBUILD45
2 files changed, 127 insertions, 0 deletions
diff --git a/testing/pixz/0001-use-posix-shell-for-tests.patch b/testing/pixz/0001-use-posix-shell-for-tests.patch
new file mode 100644
index 0000000000..bdeefab273
--- /dev/null
+++ b/testing/pixz/0001-use-posix-shell-for-tests.patch
@@ -0,0 +1,82 @@
+From e33f9a54541915639b1a777ae0aa742b0105ed52 Mon Sep 17 00:00:00 2001
+From: Carlo Landmeter <clandmeter@alpinelinux.org>
+Date: Mon, 19 Feb 2018 18:47:49 +0000
+Subject: [PATCH] use posix shell for tests
+
+---
+ test/Makefile.am | 2 +-
+ test/compress-file-permissions.sh | 4 ++--
+ test/cppcheck-src.sh | 2 +-
+ test/single-file-round-trip.sh | 4 ++--
+ test/xz-compatibility-c-option.sh | 6 +++---
+ 5 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/test/Makefile.am b/test/Makefile.am
+index 6aebb6f..3ed2f87 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -7,4 +7,4 @@ TESTS = \
+ EXTRA_DIST = $(TESTS)
+
+ TEST_EXTENSIONS = .sh
+-SH_LOG_COMPILER = bash
++SH_LOG_COMPILER = sh
+diff --git a/test/compress-file-permissions.sh b/test/compress-file-permissions.sh
+index 28572c2..6218d90 100755
+--- a/test/compress-file-permissions.sh
++++ b/test/compress-file-permissions.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ PIXZ=../src/pixz
+
+@@ -10,4 +10,4 @@ echo foo > $INPUT
+
+ $PIXZ $INPUT
+
+-[[ $(stat -c "%a" $INPUT.xz) = 600 ]]
++[ "$(stat -c "%a" $INPUT.xz)" = 600 ]
+diff --git a/test/cppcheck-src.sh b/test/cppcheck-src.sh
+index 5c77b15..1b5954c 100755
+--- a/test/cppcheck-src.sh
++++ b/test/cppcheck-src.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ if which cppcheck &> /dev/null ; then
+ cppcheck --error-exitcode=1 $srcdir/../src
+diff --git a/test/single-file-round-trip.sh b/test/single-file-round-trip.sh
+index 5784138..c9bfa9a 100755
+--- a/test/single-file-round-trip.sh
++++ b/test/single-file-round-trip.sh
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ PIXZ=../src/pixz
+
+@@ -11,4 +11,4 @@ trap "rm -f $COMPRESSED $UNCOMPRESSED" EXIT
+ $PIXZ $INPUT $COMPRESSED
+ $PIXZ -d $COMPRESSED $UNCOMPRESSED
+
+-[[ $(cat $INPUT | md5sum) = $(cat $UNCOMPRESSED | md5sum) ]] || exit 1
++[ "$(cat $INPUT | md5sum)" = "$(cat $UNCOMPRESSED | md5sum)" ] || exit 1
+diff --git a/test/xz-compatibility-c-option.sh b/test/xz-compatibility-c-option.sh
+index 327d7f6..64556d2 100755
+--- a/test/xz-compatibility-c-option.sh
++++ b/test/xz-compatibility-c-option.sh
+@@ -1,6 +1,6 @@
+-#!/bin/bash
++#!/bin/sh
+
+ PIXZ=../src/pixz
+
+-[[ "foo" = $(echo foo | xz | xz -dc) ]] || exit 1
+-[[ "bar" = $(echo bar | $PIXZ | $PIXZ -dc) ]] || exit 1
++[ "foo" = "$(echo foo | xz | xz -dc)" ] || exit 1
++[ "bar" = "$(echo bar | $PIXZ | $PIXZ -dc)" ] || exit 1
+--
+2.16.1
+
diff --git a/testing/pixz/APKBUILD b/testing/pixz/APKBUILD
new file mode 100644
index 0000000000..7469cab963
--- /dev/null
+++ b/testing/pixz/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
+# Maintainer:
+pkgname=pixz
+pkgver=1.0.6
+pkgrel=0
+pkgdesc="Parallel, indexed xz compressor"
+url="https://github.com/vasi/pixz"
+arch="all"
+license="BSD-2-Clause"
+depends=""
+makedepends="libarchive-dev xz-dev
+ automake autoconf libtool
+ "
+install=""
+subpackages="$pkgname-doc"
+source="https://github.com/vasi/pixz/releases/download/v$pkgver/pixz-$pkgver.tar.xz
+ 0001-use-posix-shell-for-tests.patch
+ "
+builddir="$srcdir/pixz-$pkgver"
+
+build() {
+ cd "$builddir"
+ autoreconf -vif
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="361a8d8b736c350e4e3fd19b5d36777129a087eb81439d05edc08f9378938583bef8fc70e440ffd22efb6dad1f6494c6c3e532d7dd1ab12c9350b6078aa993d7 pixz-1.0.6.tar.xz
+f9333adaefb8f6bae4bc1841185f6289b362895c46702e213392aae4954ec2fe81d169a21fcd5eec2d0f96d243ec4add1f8ae89dc6480f603231c954da47d4ed 0001-use-posix-shell-for-tests.patch"