fuanan add package
This commit is contained in:
parent
95f1a070a8
commit
51d7dacc19
BIN
commander-2.9.0.tgz
Normal file
BIN
commander-2.9.0.tgz
Normal file
Binary file not shown.
25
dl-tests.sh
Normal file
25
dl-tests.sh
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
tag=v2.9.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/commander.js.git
|
||||||
|
cd commander.js
|
||||||
|
git archive --prefix="test/" --format=tar tags/${tag}:test/ \
|
||||||
|
| bzip2 > "$pwd"/tests-${tag}.tar.bz2
|
||||||
|
git archive --prefix="examples/" --format=tar tags/${tag}:examples/ \
|
||||||
|
| bzip2 > "$pwd"/examples-${tag}.tar.bz2
|
||||||
|
popd
|
||||||
BIN
examples-v2.9.0.tar.bz2
Normal file
BIN
examples-v2.9.0.tar.bz2
Normal file
Binary file not shown.
25
nodejs-commander-2.9.0-Fix-engine-dep.patch
Normal file
25
nodejs-commander-2.9.0-Fix-engine-dep.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 33938fd48d8b2282ac517921fdb735546a674beb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Piotr Popieluch <piotr1212@gmail.com>
|
||||||
|
Date: Sat, 18 Jul 2015 14:54:40 +0200
|
||||||
|
Subject: [PATCH] Fix Node engine dependency
|
||||||
|
|
||||||
|
---
|
||||||
|
package.json | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/package.json b/package.json
|
||||||
|
index ee1dee2..204a651 100644
|
||||||
|
--- a/package.json
|
||||||
|
+++ b/package.json
|
||||||
|
@@ -22,7 +22,7 @@
|
||||||
|
},
|
||||||
|
"main": "index",
|
||||||
|
"engines": {
|
||||||
|
- "node": ">= 0.6.x"
|
||||||
|
+ "node": ">= 0.6.0"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"index.js"
|
||||||
|
--
|
||||||
|
2.4.3
|
||||||
|
|
||||||
53
nodejs-commander.spec
Normal file
53
nodejs-commander.spec
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
%{?nodejs_find_provides_and_requires}
|
||||||
|
%global enable_tests 1
|
||||||
|
Name: nodejs-commander
|
||||||
|
Version: 2.9.0
|
||||||
|
Release: 1
|
||||||
|
Summary: Node.js command-line interfaces made easy
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/tj/commander
|
||||||
|
Source0: https://registry.npmjs.org/commander/-/commander-%{version}.tgz
|
||||||
|
Source1: tests-v%{version}.tar.bz2
|
||||||
|
Source2: examples-v%{version}.tar.bz2
|
||||||
|
Source10: dl-tests.sh
|
||||||
|
Patch0: nodejs-commander-2.9.0-Fix-engine-dep.patch
|
||||||
|
BuildArch: noarch
|
||||||
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
|
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
||||||
|
BuildRequires: nodejs-packaging
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
BuildRequires: npm(should) npm(sinon) npm(graceful-readlink)
|
||||||
|
%endif
|
||||||
|
%description
|
||||||
|
The complete solution for Node.js command-line interfaces,
|
||||||
|
inspired by Ruby's commander.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n package
|
||||||
|
%setup -q -T -D -a 1 -n package
|
||||||
|
%setup -q -T -D -a 2 -n package
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{nodejs_sitelib}/commander
|
||||||
|
cp -pr package.json index.js \
|
||||||
|
%{buildroot}%{nodejs_sitelib}/commander
|
||||||
|
%nodejs_symlink_deps
|
||||||
|
|
||||||
|
%check
|
||||||
|
%nodejs_symlink_deps --check
|
||||||
|
%{__nodejs} -e 'require("./")'
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
./test/run test/test.*.js
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc Readme.md examples/
|
||||||
|
%license LICENSE
|
||||||
|
%{nodejs_sitelib}/commander
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Aug 17 2020 Anan Fu <fuanan3@huawei.com> - 2.9.0-1
|
||||||
|
- package init
|
||||||
4
nodejs-commander.yaml
Normal file
4
nodejs-commander.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: tj/commander
|
||||||
|
tag_prefix: "^v"
|
||||||
|
seperator: "."
|
||||||
BIN
tests-v2.9.0.tar.bz2
Normal file
BIN
tests-v2.9.0.tar.bz2
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user