nodejs-is-property/nodejs-is-property.spec

41 lines
1.1 KiB
RPMSpec
Raw Normal View History

2020-09-11 22:12:37 +08:00
%global srcname is-property
%global commit 186608bb4904de827ac78f7a12eab67b35187561
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: nodejs-%{srcname}
Version: 1.0.1
Release: 1
Summary: Tests if a json property can be safely accessed using the .syntax
License: MIT
URL: https://github.com/mikolalysenko/is-property
Source0: https://github.com/mikolalysenko/is-property/archive/%{commit}/nodejs-%{srcname}-%{version}-%{shortcommit}.tar.gz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging npm(tap) npm(tape)
%description
%{summary}.
%prep
%autosetup -n %{srcname}-%{commit}
rm -rf node_modules
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
cp -pr package.json is-property.js \
%{buildroot}%{nodejs_sitelib}/%{srcname}
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
tap test/*.js
%files
%doc README.md
%license LICENSE
%{nodejs_sitelib}/%{srcname}
%changelog
* Thu Aug 20 2020 wangxiao <wangxiao65@huawei.com> - 1.0.1-1
- Package init