diff --git a/3.10.0.tar.gz b/3.10.0.tar.gz new file mode 100644 index 0000000..0a1cc44 Binary files /dev/null and b/3.10.0.tar.gz differ diff --git a/nodejs-js-yaml.spec b/nodejs-js-yaml.spec new file mode 100644 index 0000000..006683c --- /dev/null +++ b/nodejs-js-yaml.spec @@ -0,0 +1,57 @@ +%{?nodejs_find_provides_and_requires} +%global enable_tests 1 +Name: nodejs-js-yaml +Version: 3.10.0 +Release: 1 +Summary: YAML 1.2 parser and serializer +License: MIT +URL: https://github.com/nodeca/js-yaml +Source0: https://github.com/nodeca/js-yaml/archive/%{version}.tar.gz +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch +BuildRequires: nodejs-packaging +%if 0%{?enable_tests} +BuildRequires: npm(esprima) npm(mocha) +%endif +%description +This is an implementation of YAML (YAML Ain't Markup Language), a human +friendly data serialization language. It started as PyYAML port, and was +completely rewritten from scratch. Now it's very fast, and supports the +1.2 spec. + +%prep +%autosetup -n js-yaml-%{version} +sed -i '1s/env //' bin/js-yaml.js +%nodejs_fixdep esprima + +%build + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/js-yaml +cp -pr package.json index.js lib/ \ + %{buildroot}%{nodejs_sitelib}/js-yaml +mkdir -p %{buildroot}%{nodejs_sitelib}/js-yaml/bin +install -p -D -m0755 bin/js-yaml.js \ + %{buildroot}%{nodejs_sitelib}/js-yaml/bin/js-yaml.js +mkdir -p %{buildroot}%{_bindir} +ln -sf %{nodejs_sitelib}/js-yaml/bin/js-yaml.js \ + %{buildroot}%{_bindir}/js-yaml +%nodejs_symlink_deps + +%check +%nodejs_symlink_deps --check +%{__nodejs} -e 'require("./")' +%if 0%{?enable_tests} +NODE_ENV=test %{_bindir}/mocha -R spec +%endif + +%files +%{!?_licensedir:%global license %doc} +%doc README.md CHANGELOG.md examples/ +%license LICENSE +%{nodejs_sitelib}/js-yaml +%{_bindir}/js-yaml + +%changelog +* Thu Aug 20 2020 wangxiao - 3.10.0-1 +- Package init diff --git a/nodejs-js-yaml.yaml b/nodejs-js-yaml.yaml new file mode 100644 index 0000000..37d3a8e --- /dev/null +++ b/nodejs-js-yaml.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/nodeca/js-yaml +version_control: github +src_repo: nodeca/js-yaml +tag_prefix: "" +seperator: "."