nodejs-hosted-git-info/nodejs-hosted-git-info.spec
2020-08-20 11:37:39 +08:00

45 lines
1.2 KiB
RPMSpec

%global npm_name hosted-git-info
%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-hosted-git-info
Version: 2.1.4
Release: 1
Summary: Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab
Url: https://github.com/npm/hosted-git-info
Source0: https://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz
License: ISC
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-devel nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(tap)
%endif
%description
Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab
%prep
%setup -q -n package
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
cp -pr package.json index.js git-host.js git-host-info.js \
%{buildroot}%{nodejs_sitelib}/%{npm_name}
%{nodejs_symlink_deps}
%if 0%{?enable_tests}
%check
%{nodejs_symlink_deps} --check
tap test/*.js
%endif
%files
%{nodejs_sitelib}/hosted-git-info
%doc README.md
%license LICENSE
%changelog
* Thu Aug 20 2020 yaokai <yaokai13@huawei.com> - 2.1.4-1
- package init