pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bats-core: Import bats-core-1.2.1 as wip/bats-core



Module Name:	pkgsrc-wip
Committed By:	Iku Iwasa <iku.iwasa%gmail.com@localhost>
Pushed By:	iquiw
Date:		Sat Dec 12 15:11:02 2020 +0900
Changeset:	92c3fe9b4e814dfa0ab87e6ad4d1ffcdbb33c634

Added Files:
	bats-core/DESCR
	bats-core/Makefile
	bats-core/PLIST
	bats-core/distinfo
	bats-core/patches/patch-install.sh

Log Message:
bats-core: Import bats-core-1.2.1 as wip/bats-core

Bats is a TAP-compliant testing framework for Bash. It provides a
simple way to verify that the UNIX programs you write behave as
expected.

A Bats test file is a Bash script with special syntax for defining
test cases. Under the hood, each test case is just a function with
a description.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=92c3fe9b4e814dfa0ab87e6ad4d1ffcdbb33c634

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 bats-core/DESCR                    |  7 +++++++
 bats-core/Makefile                 | 34 ++++++++++++++++++++++++++++++++++
 bats-core/PLIST                    | 16 ++++++++++++++++
 bats-core/distinfo                 |  7 +++++++
 bats-core/patches/patch-install.sh | 21 +++++++++++++++++++++
 5 files changed, 85 insertions(+)

diffs:
diff --git a/bats-core/DESCR b/bats-core/DESCR
new file mode 100644
index 0000000000..e60b497ded
--- /dev/null
+++ b/bats-core/DESCR
@@ -0,0 +1,7 @@
+Bats is a TAP-compliant testing framework for Bash. It provides a
+simple way to verify that the UNIX programs you write behave as
+expected.
+
+A Bats test file is a Bash script with special syntax for defining
+test cases. Under the hood, each test case is just a function with
+a description.
diff --git a/bats-core/Makefile b/bats-core/Makefile
new file mode 100644
index 0000000000..c9b1a7d110
--- /dev/null
+++ b/bats-core/Makefile
@@ -0,0 +1,34 @@
+# $NetBSD$
+
+DISTNAME=		bats-core-1.2.1
+CATEGORIES=		devel
+MASTER_SITES=		${MASTER_SITE_GITHUB:=bats-core/}
+GITHUB_TAG=		v${PKGVERSION_NOREV}
+
+MAINTAINER=		iku.iwasa%gmail.com@localhost
+HOMEPAGE=		https://github.com/bats-core/bats-core
+COMMENT=		Bash Automated Testing System
+LICENSE=		mit
+
+CONFLICTS+=		bats-[0-9]*
+
+USE_LANGUAGES=		# none
+
+NO_BUILD=		yes
+USE_TOOLS+=		bash:run
+
+REPLACE_BASH+=		bin/bats libexec/bats-core/*
+
+SUBST_CLASSES+=		fixsh
+SUBST_STAGE.fixsh=	pre-configure
+SUBST_MESSAGE.fixsh=	Enable function import
+SUBST_FILES.fixsh=	bin/bats libexec/bats-core/*
+SUBST_SED.fixsh+=	-e '1s,^\#!.*,& --import-functions,'
+
+do-install:
+	cd ${WRKSRC} && ${SETENV} PKGMANDIR=${PKGMANDIR} ./install.sh ${DESTDIR}${PREFIX}
+
+do-test:
+	cd ${WRKSRC} && ./bin/bats ./test
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/bats-core/PLIST b/bats-core/PLIST
new file mode 100644
index 0000000000..817c859ac2
--- /dev/null
+++ b/bats-core/PLIST
@@ -0,0 +1,16 @@
+@comment $NetBSD$
+bin/bats
+lib/bats-core/preprocessing.bash
+lib/bats-core/test_functions.bash
+lib/bats-core/tracing.bash
+lib/bats-core/validator.bash
+libexec/bats-core/bats
+libexec/bats-core/bats-exec-file
+libexec/bats-core/bats-exec-suite
+libexec/bats-core/bats-exec-test
+libexec/bats-core/bats-format-junit
+libexec/bats-core/bats-format-pretty
+libexec/bats-core/bats-format-tap
+libexec/bats-core/bats-preprocess
+man/man1/bats.1
+man/man7/bats.7
diff --git a/bats-core/distinfo b/bats-core/distinfo
new file mode 100644
index 0000000000..41a6548bfc
--- /dev/null
+++ b/bats-core/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.2 2016/09/08 14:34:02 jperkin Exp $
+
+SHA1 (bats-core-1.2.1.tar.gz) = 418ca60af55c339ac7911c74a44f7edf41e3a17c
+RMD160 (bats-core-1.2.1.tar.gz) = a73f4aa8fbfdb42fe06410cd436e30793b1c1290
+SHA512 (bats-core-1.2.1.tar.gz) = 632345e6d83ed930dab23abc03e4797769063bb049ae1bb99e3102dc1e93e5111144ddc61615d05962f7b5bbf72d90ce19a324faf670a3d6e4ce7ab508b0db29
+Size (bats-core-1.2.1.tar.gz) = 62685 bytes
+SHA1 (patch-install.sh) = 8d6df7eccf4201b6b12bd94bec91e81a6ed9517c
diff --git a/bats-core/patches/patch-install.sh b/bats-core/patches/patch-install.sh
new file mode 100644
index 0000000000..e71096029e
--- /dev/null
+++ b/bats-core/patches/patch-install.sh
@@ -0,0 +1,21 @@
+$NetBSD$
+
+Change manpages installation directory.
+
+--- install.sh.orig	2020-12-05 05:08:52.331014166 +0000
++++ install.sh
+@@ -12,11 +12,11 @@ if [[ -z "$PREFIX" ]]; then
+   exit 1
+ fi
+ 
+-install -d -m 755 "$PREFIX"/{bin,libexec/bats-core,lib/bats-core,share/man/man{1,7}}
++install -d -m 755 "$PREFIX"/{bin,libexec/bats-core,lib/bats-core,$PKGMANDIR/man{1,7}}
+ install -m 755 "$BATS_ROOT/bin"/* "$PREFIX/bin"
+ install -m 755 "$BATS_ROOT/libexec/bats-core"/* "$PREFIX/libexec/bats-core"
+ install -m 755 "$BATS_ROOT/lib/bats-core"/* "$PREFIX/lib/bats-core"
+-install -m 644 "$BATS_ROOT/man/bats.1" "$PREFIX/share/man/man1"
+-install -m 644 "$BATS_ROOT/man/bats.7" "$PREFIX/share/man/man7"
++install -m 644 "$BATS_ROOT/man/bats.1" "$PREFIX/$PKGMANDIR/man1"
++install -m 644 "$BATS_ROOT/man/bats.7" "$PREFIX/$PKGMANDIR/man7"
+ 
+ echo "Installed Bats to $PREFIX/bin/bats"


Home | Main Index | Thread Index | Old Index