Blob Blame History Raw
#Disable tests as it needs network
%global enable_tests 0
%global module_name package-info

Name:           nodejs-%{module_name}
Version:        2.2.0
Release:        3%{?dist}
Summary:        Get the information of a npm package

License:        MIT
URL:            https://github.com/AlessandroMinoccheri/package-info
Source0:        https://github.com/AlessandroMinoccheri/package-info/archive/v%{version}.tar.gz
BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  nodejs-packaging

Requires:       npm(got)
Requires:       npm(registry-url)

%if 0%{?enable_tests}
BuildRequires:  npm(mocha)
BuildRequires:  npm(got)
BuildRequires:  npm(registry-url)
%endif

%description
%{summary}.

%prep
%setup -q -n %{module_name}-%{version}
rm -rf node_modules

%nodejs_fixdep got ~3.x

%build
# nothing to build

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
cp -pr package.json index.js cli.js %{buildroot}%{nodejs_sitelib}/%{module_name}
mkdir -p %{buildroot}%{_bindir}
ln -s %{nodejs_sitelib}/%{module_name}/cli.js %{buildroot}%{_bindir}/package-info

%nodejs_symlink_deps

%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
mocha
%endif

%files
%doc README.md 
%license LICENSE
%{_bindir}/package-info
%{nodejs_sitelib}/%{module_name}

%changelog
* Fri Jul 03 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.2.0-3
- Fix got dependency

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Tue Jan 27 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.2.0-1
- Update to 2.2.0

* Mon Dec 29 2014 Parag Nemade <pnemade AT redhat DOT com> - 2.0.0-1
- Update to 2.0.0

* Sat Dec 06 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.0.3-1
- Update to 1.0.3

* Sat Dec 06 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.0.1-1
- Update to 1.0.1
- Upstream patch used in previous release is now released

* Wed Dec 03 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.0.0-1
- Initial packaging