[packages/bats] nwe, version 0.4.0

glen glen at pld-linux.org
Wed May 20 09:40:22 CEST 2015


commit 0070e7df7ab02ea5ce9f9072969b983bb41d0957
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed May 20 10:39:53 2015 +0300

    nwe, version 0.4.0

 bats.spec     | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 install.patch | 16 ++++++++++++++++
 2 files changed, 67 insertions(+)
---
diff --git a/bats.spec b/bats.spec
new file mode 100644
index 0000000..9a323fd
--- /dev/null
+++ b/bats.spec
@@ -0,0 +1,51 @@
+Summary:	Bash Automated Testing System
+Name:		bats
+Version:	0.4.0
+Release:	1
+License:	MIT
+Group:		Development/Libraries
+Source0:	https://github.com/sstephenson/bats/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	aeeddc0b36b8321930bf96fce6ec41ee
+Patch0:		install.patch
+URL:		https://github.com/sstephenson/bats
+BuildRequires:	bash
+BuildRequires:	sed >= 4.0
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		_libexecdir	%{_prefix}/lib
+
+%description
+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.
+
+Bats is most useful when testing software written in Bash, but you can
+use it to test any UNIX program.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%{__sed} -i -e '1 s,#!.*bash,#!/bin/bash,' libexec/*
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_prefix},%{_libexecdir},%{_mandir}}
+./install.sh $RPM_BUILD_ROOT%{_prefix}
+ln -sf ../lib/bats $RPM_BUILD_ROOT%{_bindir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.md LICENSE
+%attr(755,root,root) %{_bindir}/bats
+%attr(755,root,root) %{_libexecdir}/bats
+%attr(755,root,root) %{_libexecdir}/bats-exec-suite
+%attr(755,root,root) %{_libexecdir}/bats-exec-test
+%attr(755,root,root) %{_libexecdir}/bats-format-tap-stream
+%attr(755,root,root) %{_libexecdir}/bats-preprocess
+%{_mandir}/man1/bats.1*
+%{_mandir}/man7/bats.7*
diff --git a/install.patch b/install.patch
new file mode 100644
index 0000000..7220b1f
--- /dev/null
+++ b/install.patch
@@ -0,0 +1,16 @@
+--- bats-0.4.0/install.sh~	2015-05-20 10:35:36.000000000 +0300
++++ bats-0.4.0/install.sh	2015-05-20 10:35:37.614227321 +0300
+@@ -29,9 +29,9 @@
+ 
+ BATS_ROOT="$(abs_dirname "$0")"
+ mkdir -p "$PREFIX"/{bin,libexec,share/man/man{1,7}}
+-cp -R "$BATS_ROOT"/bin/* "$PREFIX"/bin
+-cp -R "$BATS_ROOT"/libexec/* "$PREFIX"/libexec
+-cp "$BATS_ROOT"/man/bats.1 "$PREFIX"/share/man/man1
+-cp "$BATS_ROOT"/man/bats.7 "$PREFIX"/share/man/man7
++cp -Rp "$BATS_ROOT"/bin/* "$PREFIX"/bin
++cp -Rp "$BATS_ROOT"/libexec/* "$PREFIX"/lib
++cp -p "$BATS_ROOT"/man/bats.1 "$PREFIX"/share/man/man1
++cp -p "$BATS_ROOT"/man/bats.7 "$PREFIX"/share/man/man7
+ 
+ echo "Installed Bats to $PREFIX/bin/bats"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/bats.git/commitdiff/0070e7df7ab02ea5ce9f9072969b983bb41d0957



More information about the pld-cvs-commit mailing list