Blob Blame History Raw
%global         githubparent    sstephenson
%global         commit          03608115df2071fff4eaaff1605768c275e5f81f
%global         shortcommit     %(c=%{commit}; echo ${c:0:7})
%global         commitdate      20160219
%global         gitversion      .%{commitdate}git%{shortcommit}

Name:           bats
Version:        0.4.0
Release:        6%{gitversion}%{?dist}
Summary:        Bash Automated Testing System

License:        MIT
URL:            https://github.com/sstephenson/bats
Source0:        https://github.com/%{githubparent}/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz

BuildArch:      noarch

Requires:       bash

%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
%autosetup -n %{name}-%{commit}
sed -i '1s|#!/usr/bin/env bash|#!/usr/bin/bash|' ./libexec/*

%build
# nothing to build

%install
./install.sh ${RPM_BUILD_ROOT}%{_prefix}

%check
./bin/bats test/bats.bats
./bin/bats test/suite.bats

%files
%doc README.md CONDUCT.md
%license LICENSE
%{_bindir}/%{name}
%{_libexecdir}/%{name}
%{_libexecdir}/bats-exec-suite
%{_libexecdir}/bats-exec-test
%{_libexecdir}/bats-format-tap-stream
%{_libexecdir}/bats-preprocess
%{_mandir}/man1/%{name}.1.gz
%{_mandir}/man7/%{name}.7.gz

%changelog
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-6.20160219git0360811
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-5.20160219git0360811
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Sep 05 2016 Piotr Popieluch <piotr1212@gmail.com> - 0.4.0-4.20160219git0360811
- Update to latest git snapshot
- Enable tests
- Remove obsoleted el5 macros
- Move license to %%license
- Add (empty) %%build section
- Add CONDUCT.md to %%doc
- Set correct interpreter in scripts

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-3.20141016git3b33a5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-2.20141016git3b33a5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Jan 21 2015 Fran├žois Cami <fcami@redhat.com> - 0.4.0-1.20141016git3b33a5a
- First package version.