Blame nodejs-terst.spec

Jared K. Smith bdb41e5
%{?nodejs_find_provides_and_requires}
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
%global packagename terst
042c7a9
042c7a9
# Tests failing on NodeJS 10.x
042c7a9
%global enable_tests 0
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
Name:		nodejs-terst
Jared K. Smith bdb41e5
Version:	0.3.0
c1ebfdb
Release:	7%{?dist}
Jared K. Smith bdb41e5
Summary:	A JavaScript testing component with a terse syntax
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
License:	MIT
Jared K. Smith bdb41e5
URL:		http://github.com/jprichardson/terst
Jared K. Smith bdb41e5
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
Jared K. Smith bdb41e5
# The test files are not included in the npm tarball.
Jared K. Smith bdb41e5
# Source1 is generated by running Source10, which pulls from the upstream
Jared K. Smith bdb41e5
# version control repository.
Jared K. Smith bdb41e5
Source1:	tests-%{version}.tar.bz2
Jared K. Smith bdb41e5
Source10:	dl-tests.sh
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
BuildArch:	noarch
Jared K. Smith bdb41e5
%if 0%{?fedora} >= 19
Jared K. Smith bdb41e5
ExclusiveArch: %{nodejs_arches} noarch
Jared K. Smith bdb41e5
%else
Jared K. Smith bdb41e5
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
Jared K. Smith bdb41e5
%endif
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
BuildRequires:	nodejs-packaging
Jared K. Smith bdb41e5
%if 0%{?enable_tests}
Jared K. Smith bdb41e5
BuildRequires:	mocha
Jared K. Smith bdb41e5
%endif
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
%description
Jared K. Smith bdb41e5
A JavaScript testing component with a terse syntax.
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
%prep
Jared K. Smith bdb41e5
%setup -q -n package
Jared K. Smith bdb41e5
# setup the tests
Jared K. Smith bdb41e5
%setup -q -T -D -a 1 -n package
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
%build
Jared K. Smith bdb41e5
# nothing to do!
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
%install
Jared K. Smith bdb41e5
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith bdb41e5
cp -pr package.json lib/ \
Jared K. Smith bdb41e5
	%{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
%nodejs_symlink_deps
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
%check
Jared K. Smith bdb41e5
%nodejs_symlink_deps --check
Jared K. Smith bdb41e5
%{__nodejs} -e 'require("./")'
Jared K. Smith bdb41e5
%if 0%{?enable_tests}
Jared K. Smith bdb41e5
%{_bindir}/mocha -R spec --ui bdd
Jared K. Smith bdb41e5
%else
Jared K. Smith bdb41e5
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
%endif
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
%files
Jared K. Smith bdb41e5
%{!?_licensedir:%global license %doc}
Jared K. Smith bdb41e5
%doc *.md
Jared K. Smith bdb41e5
%license LICENSE
Jared K. Smith bdb41e5
%{nodejs_sitelib}/%{packagename}
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
Jared K. Smith bdb41e5
%changelog
c1ebfdb
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-7
c1ebfdb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
c1ebfdb
4c7c437
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-6
4c7c437
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
4c7c437
4fe01a0
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-5
4fe01a0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
4fe01a0
217cbd5
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-4
217cbd5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
217cbd5
5140670
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-3
5140670
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
5140670
9909a37
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-2
9909a37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
9909a37
Jared K. Smith bdb41e5
* Sat Feb 20 2016 Jared Smith <jsmith@fedoraproject.org> - 0.3.0-1
Jared K. Smith bdb41e5
- Initial packaging