package init
This commit is contained in:
parent
c7dc609ddc
commit
8b4d48316b
23
dl-tests.sh
Normal file
23
dl-tests.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
tag=3.5.2
|
||||
|
||||
set -e
|
||||
|
||||
tmp=$(mktemp -d)
|
||||
|
||||
trap cleanup EXIT
|
||||
cleanup() {
|
||||
set +e
|
||||
[ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
|
||||
}
|
||||
|
||||
unset CDPATH
|
||||
pwd=$(pwd)
|
||||
|
||||
pushd "$tmp"
|
||||
git clone https://github.com/nodeca/js-yaml.git
|
||||
cd js-yaml
|
||||
git archive --prefix="test/" --format=tar tags/${tag}:test/ \
|
||||
| bzip2 > "$pwd"/tests-${tag}.tar.bz2
|
||||
popd
|
||||
BIN
examples-3.10.0.tar.bz2
Normal file
BIN
examples-3.10.0.tar.bz2
Normal file
Binary file not shown.
BIN
js-yaml-3.10.0.tgz
Normal file
BIN
js-yaml-3.10.0.tgz
Normal file
Binary file not shown.
61
nodejs-js-yaml.spec
Normal file
61
nodejs-js-yaml.spec
Normal file
@ -0,0 +1,61 @@
|
||||
%{?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://registry.npmjs.org/js-yaml/-/js-yaml-%{version}.tgz
|
||||
Source1: tests-%{version}.tar.bz2
|
||||
Source2: examples-%{version}.tar.bz2
|
||||
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
|
||||
%setup -q -n package
|
||||
%setup -q -T -D -a 1 -n package
|
||||
%setup -q -T -D -a 2 -n package
|
||||
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 <wangxiao65@huawei.com> - 3.10.0-1
|
||||
- Package init
|
||||
5
nodejs-js-yaml.yaml
Normal file
5
nodejs-js-yaml.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
git_url: https://github.com/nodeca/js-yaml
|
||||
version_control: github
|
||||
src_repo: nodeca/js-yaml
|
||||
tag_prefix: ""
|
||||
seperator: "."
|
||||
BIN
tests-3.10.0.tar.bz2
Normal file
BIN
tests-3.10.0.tar.bz2
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user