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

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