package init
This commit is contained in:
parent
f2ee12caad
commit
1c12f18526
BIN
bytes-2.4.0.tgz
Normal file
BIN
bytes-2.4.0.tgz
Normal file
Binary file not shown.
23
dl-tests.sh
Normal file
23
dl-tests.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
tag=2.4.0
|
||||||
|
|
||||||
|
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 git://github.com/visionmedia/bytes.js.git
|
||||||
|
cd bytes.js
|
||||||
|
git archive --prefix="test/" --format=tar tags/${tag}:test/ \
|
||||||
|
| bzip2 > "$pwd"/tests-${tag}.tar.bz2
|
||||||
|
popd
|
||||||
49
nodejs-bytes.spec
Normal file
49
nodejs-bytes.spec
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
%{?nodejs_find_provides_and_requires}
|
||||||
|
%global enable_tests 1
|
||||||
|
Name: nodejs-bytes
|
||||||
|
Version: 2.4.0
|
||||||
|
Release: 1
|
||||||
|
Summary: Utility to parse a string bytes to bytes and vice-versa
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/visionmedia/bytes.js
|
||||||
|
Source0: http://registry.npmjs.org/bytes/-/bytes-%{version}.tgz
|
||||||
|
# The test files are not included in the npm tarball.
|
||||||
|
# Source1 is generated by running Source10, which pulls from the upstream
|
||||||
|
# version control repository.
|
||||||
|
Source1: tests-%{version}.tar.bz2
|
||||||
|
Source10: dl-tests.sh
|
||||||
|
BuildArch: noarch
|
||||||
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
|
BuildRequires: nodejs-packaging
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
BuildRequires: npm(mocha)
|
||||||
|
%endif
|
||||||
|
%description
|
||||||
|
%summary
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n package
|
||||||
|
%setup -T -D -a 1 -q -n package
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{nodejs_sitelib}/bytes
|
||||||
|
cp -pr package.json index.js \
|
||||||
|
%{buildroot}%{nodejs_sitelib}/bytes
|
||||||
|
%nodejs_symlink_deps
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%nodejs_symlink_deps --check
|
||||||
|
%{nodejs_sitelib}/mocha/bin/mocha --check-leaks --reporter spec
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc History.md Readme.md
|
||||||
|
%license LICENSE
|
||||||
|
%{nodejs_sitelib}/bytes
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Aug 17 2020 Shaoqiang Kang <kangshaoqiang1@huawei.com> - 2.4.0-1
|
||||||
|
- Package init
|
||||||
4
nodejs-bytes.yaml
Normal file
4
nodejs-bytes.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: visionmedia/bytes.js
|
||||||
|
tag_prefix: "^"
|
||||||
|
seperator: "."
|
||||||
BIN
tests-2.4.0.tar.bz2
Normal file
BIN
tests-2.4.0.tar.bz2
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user