]> git.pld-linux.org Git - packages/bats.git/commitdiff
nwe, version 0.4.0 master auto/th/bats-0.4.0-1
authorElan Ruusamäe <glen@delfi.ee>
Wed, 20 May 2015 07:39:53 +0000 (10:39 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 20 May 2015 07:39:53 +0000 (10:39 +0300)
bats.spec [new file with mode: 0644]
install.patch [new file with mode: 0644]

diff --git a/bats.spec b/bats.spec
new file mode 100644 (file)
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 (file)
index 0000000..7220b1f
--- /dev/null
@@ -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"
This page took 0.027385 seconds and 4 git commands to generate.