Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global packagename meow
%global enable_tests 0
# tests disabled due to missing npm(ava) test suite

Name:		nodejs-meow
Version:	3.7.0
Release:	5%{?dist}
Summary:	CLI app helper

License:	MIT
URL:		https://github.com/sindresorhus/meow
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
# The test files are not included in the npm tarball.
Source1:	https://raw.githubusercontent.com/sindresorhus/meow/v%{version}/test.js
Source2:	https://raw.githubusercontent.com/sindresorhus/meow/v%{version}/fixture.js


ExclusiveArch:	%{nodejs_arches} noarch
BuildArch:	noarch

BuildRequires:	nodejs-packaging
BuildRequires:	npm(camelcase-keys)
BuildRequires:	npm(decamelize)
BuildRequires:	npm(loud-rejection)
BuildRequires:	npm(minimist)
BuildRequires:	npm(object-assign)
BuildRequires:	npm(read-pkg-up)
BuildRequires:	npm(redent)
BuildRequires:	npm(trim-newlines)
%if 0%{?enable_tests}
BuildRequires:	npm(ava)
BuildRequires:	npm(normalize-package-data)
%endif

%description
CLI app helper


%prep
%setup -q -n package
# setup the tests
cp -p %{SOURCE1} .
cp -p %{SOURCE2} .

%nodejs_fixdep camelcase-keys
%nodejs_fixdep map-obj
%nodejs_fixdep redent
%nodejs_fixdep read-pkg-up

%build
# nothing to do!

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
cp -pr package.json *.js \
	%{buildroot}%{nodejs_sitelib}/%{packagename}

%nodejs_symlink_deps

%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
%{_bindir}/ava
%else
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
%endif

%files
%{!?_licensedir:%global license %doc}
%doc *.md
%license license
%{nodejs_sitelib}/%{packagename}



%changelog
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Mon Sep 25 2017 Jared Smith <jsmith@fedoraproject.org> - 3.7.0-4
- Relax dependency on npm(map-obj)

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Thu Apr 20 2017 Jared Smith <jsmith@fedoraproject.org> - 3.7.0-2
- Allow newer version of npm(read-pkg-up)

* Fri Jul 15 2016 Jared Smith <jsmith@fedoraproject.org> - 3.7.0-1
- Update to upstream 3.7.0 release

* Thu Oct 29 2015 Jared Smith <jsmith@fedoraproject.org> - 3.4.2-1
- Initial packaging