Blame SPECS/nodejs-is-plain-obj.spec

d0ed91
%{?scl:%scl_package nodejs-%{module_name}}
d0ed91
%{!?scl:%global pkg_name %{name}}
d0ed91
%{?nodejs_find_provides_and_requires}
d0ed91
d0ed91
# ava is not in fedora yet
d0ed91
%global enable_tests 0
d0ed91
%global module_name is-plain-obj
d0ed91
%global commit0 ca2adca4deadaa0a632d8abc40e1e4654ccd4c1b
d0ed91
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
d0ed91
d0ed91
Name:           %{?scl_prefix}nodejs-%{module_name}
d0ed91
Version:        1.0.0
d0ed91
Release:        4%{?dist}
d0ed91
Summary:        Check if a value is a plain object
d0ed91
d0ed91
License:        MIT
d0ed91
URL:            https://github.com/sindresorhus/is-plain-obj
d0ed91
Source0:        https://github.com/sindresorhus/%{module_name}/archive/%{commit0}.tar.gz#/%{module_name}-%{shortcommit0}.tar.gz
d0ed91
d0ed91
BuildArch:      noarch
d0ed91
ExclusiveArch:  %{nodejs_arches} noarch
d0ed91
d0ed91
BuildRequires:  nodejs010-runtime
d0ed91
d0ed91
%if 0%{?enable_tests}
d0ed91
BuildRequires:  %{?scl_prefix}npm(ava)
d0ed91
%endif
d0ed91
d0ed91
%description
d0ed91
%{summary}.
d0ed91
d0ed91
%prep
d0ed91
%setup -q -n %{module_name}-%{commit0}
d0ed91
rm -rf node_modules
d0ed91
d0ed91
%build
d0ed91
# nothing to build
d0ed91
d0ed91
%install
d0ed91
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
d0ed91
cp -p package.json index.js %{buildroot}%{nodejs_sitelib}/%{module_name}
d0ed91
%nodejs_symlink_deps
d0ed91
d0ed91
%if 0%{?enable_tests}
d0ed91
d0ed91
%check
d0ed91
%nodejs_symlink_deps --check
d0ed91
node test.js
d0ed91
%endif
d0ed91
d0ed91
%files
d0ed91
%{!?_licensedir:%global license %doc}
d0ed91
%doc readme.md
d0ed91
%license license
d0ed91
%{nodejs_sitelib}/%{module_name}
d0ed91
d0ed91
%changelog
d0ed91
* Sun Feb 14 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 1.0.0-4
d0ed91
- rebuilt
d0ed91
d0ed91
* Tue Jan 12 2016 Tomas Hrcka <thrcka@redhat.com> - 1.0.0-3
d0ed91
- Use macro to find provides and requires
d0ed91
d0ed91
* Tue Jan 12 2016 Tomas Hrcka <thrcka@redhat.com> - 1.0.0-2
d0ed91
- Enable scl macros, fix license macro for el6
d0ed91
d0ed91
* Fri Jul 31 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.0.0-1
d0ed91
- Initial packaging