Blame nodejs-to-absolute-glob.spec

Jared K. Smith befe846
%{?nodejs_find_provides_and_requires}
Jared K. Smith befe846
Jared K. Smith befe846
%global packagename to-absolute-glob
Jared K. Smith befe846
%global enable_tests 1
Jared K. Smith befe846
Jared K. Smith befe846
Name:		nodejs-to-absolute-glob
Jared K. Smith befe846
Version:	0.1.1
8bc1957
Release:	3%{?dist}
Jared K. Smith befe846
Summary:	Make a glob pattern absolute
Jared K. Smith befe846
Jared K. Smith befe846
License:	MIT
Jared K. Smith befe846
URL:		https://github.com/jonschlinkert/to-absolute-glob.git
Jared K. Smith befe846
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
Jared K. Smith befe846
# The test files are not included in the npm tarball.
Jared K. Smith befe846
Source1:	https://raw.githubusercontent.com/jonschlinkert/to-absolute-glob/master/test.js
Jared K. Smith befe846
Jared K. Smith befe846
Jared K. Smith befe846
BuildArch:	noarch
Jared K. Smith befe846
%if 0%{?fedora} >= 19
Jared K. Smith befe846
ExclusiveArch: %{nodejs_arches} noarch
Jared K. Smith befe846
%else
Jared K. Smith befe846
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
Jared K. Smith befe846
%endif
Jared K. Smith befe846
Jared K. Smith befe846
BuildRequires:	nodejs-packaging
Jared K. Smith befe846
BuildRequires:	npm(extend-shallow)
Jared K. Smith befe846
%if 0%{?enable_tests}
Jared K. Smith befe846
BuildRequires:	mocha
Jared K. Smith befe846
BuildRequires:	npm(minimist)
Jared K. Smith befe846
%endif
Jared K. Smith befe846
Jared K. Smith befe846
%description
Jared K. Smith befe846
Make a glob pattern absolute, ensuring that negative globs and patterns with
Jared K. Smith befe846
trailing slashes are correctly handled.
Jared K. Smith befe846
Jared K. Smith befe846
Jared K. Smith befe846
%prep
Jared K. Smith befe846
%setup -q -n package
Jared K. Smith befe846
# setup the tests
Jared K. Smith befe846
cp -p %{SOURCE1} .
Jared K. Smith befe846
Jared K. Smith befe846
Jared K. Smith befe846
%build
Jared K. Smith befe846
# nothing to do!
Jared K. Smith befe846
Jared K. Smith befe846
%install
Jared K. Smith befe846
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith befe846
cp -pr package.json index.js \
Jared K. Smith befe846
	%{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith befe846
Jared K. Smith befe846
%nodejs_symlink_deps
Jared K. Smith befe846
Jared K. Smith befe846
%check
Jared K. Smith befe846
%nodejs_symlink_deps --check
Jared K. Smith befe846
%{__nodejs} -e 'require("./")'
Jared K. Smith befe846
%if 0%{?enable_tests}
Jared K. Smith befe846
%{_bindir}/mocha -R spec
Jared K. Smith befe846
%else
Jared K. Smith befe846
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
Jared K. Smith befe846
%endif
Jared K. Smith befe846
Jared K. Smith befe846
Jared K. Smith befe846
%files
Jared K. Smith befe846
%{!?_licensedir:%global license %doc}
Jared K. Smith befe846
%doc *.md
Jared K. Smith befe846
%license LICENSE
Jared K. Smith befe846
%{nodejs_sitelib}/%{packagename}
Jared K. Smith befe846
Jared K. Smith befe846
Jared K. Smith befe846
%changelog
8bc1957
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1-3
8bc1957
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
8bc1957
9097c1e
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1-2
9097c1e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
9097c1e
Jared K. Smith befe846
* Sat Feb 20 2016 Jared Smith <jsmith@fedoraproject.org> - 0.1.1-1
Jared K. Smith befe846
- Initial packaging