Blame SPECS/nodejs-url-parse-lax.spec

23ff67
%{?scl:%scl_package nodejs-%{module_name}}
23ff67
%{!?scl:%global pkg_name %{name}}
23ff67
%{?nodejs_find_provides_and_requires}
23ff67
23ff67
# xo and ava not in fedora yet
23ff67
%global enable_tests 0
23ff67
%global module_name url-parse-lax
23ff67
23ff67
Name:           %{?scl_prefix}nodejs-%{module_name}
23ff67
Version:        1.0.0
23ff67
Release:        3%{?dist}
23ff67
Summary:        The url.parse() with support for protocol-less URLs & IPs
23ff67
23ff67
License:        MIT
23ff67
URL:            https://github.com/sindresorhus/url-parse-lax
23ff67
Source0:        https://github.com/sindresorhus/%{module_name}/archive/%{version}.tar.gz
23ff67
BuildArch:      noarch
23ff67
ExclusiveArch:  %{nodejs_arches} noarch
23ff67
23ff67
BuildRequires:  nodejs010-runtime
23ff67
23ff67
%if 0%{?enable_tests}
23ff67
BuildRequires: %{?scl_prefix}npm(ava)
23ff67
BuildRequires: %{?scl_prefix}npm(xo)
23ff67
%endif
23ff67
23ff67
%description
23ff67
The url.parse() with support for protocol-less URLs & IPs.
23ff67
23ff67
%prep
23ff67
%setup -q -n %{module_name}-%{version}
23ff67
rm -rf node_modules
23ff67
23ff67
%build
23ff67
# nothing to build
23ff67
23ff67
%install
23ff67
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
23ff67
cp -pr package.json *.js %{buildroot}%{nodejs_sitelib}/%{module_name}
23ff67
%nodejs_symlink_deps
23ff67
23ff67
%if 0%{?enable_tests}
23ff67
23ff67
%check
23ff67
%nodejs_symlink_deps --check
23ff67
xo && ava
23ff67
%endif
23ff67
23ff67
%files
23ff67
%{!?_licensedir:%global license %doc}
23ff67
%doc readme.md
23ff67
%license license
23ff67
%{nodejs_sitelib}/%{module_name}
23ff67
23ff67
%changelog
23ff67
* Tue Jan 12 2016 Tomas Hrcka <thrcka@redhat.com> - 1.0.0-3
23ff67
- Use macro to find provides and requires
23ff67
23ff67
* Tue Jan 12 2016 Tomas Hrcka <thrcka@redhat.com> - 1.0.0-2
23ff67
- Enable scl macros, fix license macro for el6
23ff67
23ff67
* Sun Nov 29 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.0.0-1
23ff67
- Initial packaging