Blame SPECS/nodejs-is-fullwidth-code-point.spec

32ba81
%{?scl:%scl_package nodejs-is-fullwidth-code-point}
32ba81
%{!?scl:%global pkg_name %{name}}
32ba81
32ba81
%{?nodejs_find_provides_and_requires}
32ba81
32ba81
%global packagename is-fullwidth-code-point
32ba81
%global enable_tests 0
32ba81
# tests disabed until 'ava' is packaged for Fedora
32ba81
32ba81
Name:		%{?scl_prefix}nodejs-is-fullwidth-code-point
32ba81
Version:	1.0.0
32ba81
Release:	2%{?dist}
32ba81
Summary:	Check if given Unicode code point is fullwidth
32ba81
32ba81
License:	MIT
32ba81
URL:		https://github.com/sindresorhus/is-fullwidth-code-point
32ba81
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
32ba81
# The test files are not included in the npm tarball.
32ba81
Source1:	https://raw.githubusercontent.com/sindresorhus/is-fullwidth-code-point/v%{version}/test.js
32ba81
32ba81
32ba81
ExclusiveArch:	%{nodejs_arches} noarch
32ba81
BuildArch:	noarch
32ba81
32ba81
BuildRequires:	%{?scl_prefix}nodejs-devel
32ba81
BuildRequires:	%{?scl_prefix}npm(number-is-nan)
32ba81
%if 0%{?enable_tests}
32ba81
BuildRequires:	%{?scl_prefix}npm(ava)
32ba81
BuildRequires:	%{?scl_prefix}npm(code-point-at)
32ba81
%endif
32ba81
32ba81
%description
32ba81
Check if the character represented by a given Unicode code point is fullwidth
32ba81
32ba81
%prep
32ba81
%setup -q -n package
32ba81
# setup the tests
32ba81
cp -r %{SOURCE1} .
32ba81
32ba81
%build
32ba81
# nothing to do!
32ba81
32ba81
%install
32ba81
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
32ba81
cp -pr package.json index.js \
32ba81
	%{buildroot}%{nodejs_sitelib}/%{packagename}
32ba81
32ba81
%nodejs_symlink_deps
32ba81
32ba81
#%check
32ba81
#%nodejs_symlink_deps --check
32ba81
#%{__nodejs} -e 'require("./")'
32ba81
#%if 0%{?enable_tests}
32ba81
#%{__nodejs} test.js
32ba81
#%else
32ba81
#%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
32ba81
#%endif
32ba81
32ba81
%files
32ba81
%{!?_licensedir:%global license %doc}
32ba81
%doc *.md
32ba81
%license license
32ba81
%{nodejs_sitelib}/%{packagename}
32ba81
32ba81
%changelog
32ba81
* Wed Sep 14 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 1.0.0-2
32ba81
- Built for RHSCL
32ba81
32ba81
* Tue Feb 23 2016 Jared Smith <jsmith@fedoraproject.org> - 1.0.0-1
32ba81
- Initial packaging