package init
This commit is contained in:
parent
8ac976181a
commit
c6ebdeb3d2
14
LICENSE
Normal file
14
LICENSE
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
Version 2, December 2004
|
||||||
|
|
||||||
|
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim or modified
|
||||||
|
copies of this license document, and changing it is allowed as long
|
||||||
|
as the name is changed.
|
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||||
|
|
||||||
BIN
inherits-2.0.3.tgz
Normal file
BIN
inherits-2.0.3.tgz
Normal file
Binary file not shown.
67
nodejs-inherits.spec
Normal file
67
nodejs-inherits.spec
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
%{?nodejs_find_provides_and_requires}
|
||||||
|
Name: nodejs-inherits
|
||||||
|
Version: 2.0.3
|
||||||
|
Release: 1
|
||||||
|
Summary: A tiny simple way to do classic inheritance in js
|
||||||
|
License: WTFPL
|
||||||
|
URL: https://github.com/isaacs/inherits
|
||||||
|
Source0: https://registry.npmjs.org/inherits/-/inherits-%{version}.tgz
|
||||||
|
Source1: https://raw.github.com/isaacs/inherits/112807f2670160b6e3bafdf39e395c10ae7d0fac/LICENSE
|
||||||
|
BuildArch: noarch
|
||||||
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
|
BuildRequires: nodejs-packaging
|
||||||
|
%description
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n package
|
||||||
|
cp -p %{SOURCE1} LICENSE
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{nodejs_sitelib}/inherits@2
|
||||||
|
cp -pr inherits.js package.json %{buildroot}%{nodejs_sitelib}/inherits@2
|
||||||
|
ln -sf inherits@2 %{buildroot}%{nodejs_sitelib}/inherits
|
||||||
|
%nodejs_symlink_deps
|
||||||
|
|
||||||
|
%check
|
||||||
|
%nodejs_symlink_deps --check
|
||||||
|
%triggerun -- nodejs-inherits < 2.0.0-4
|
||||||
|
ln -sf inherits@2 %{nodejs_sitelib}/inherits
|
||||||
|
%{__python} <<EOF
|
||||||
|
import json, os, sys
|
||||||
|
for moddir in os.listdir('%{nodejs_sitelib}'):
|
||||||
|
if os.path.isdir(moddir):
|
||||||
|
md = json.load(open(os.path.join(moddir, 'package.json')))
|
||||||
|
if 'dependencies' in md and 'inherits' in md['dependencies']:
|
||||||
|
if isinstance(md['dependencies'], dict) and '1' in md['dependencies']['inherits']:
|
||||||
|
src = os.path.join('%{nodejs_sitelib}', 'inherits@1')
|
||||||
|
else:
|
||||||
|
src = os.path.join('%{nodejs_sitelib}', 'inherits@2')
|
||||||
|
dest = os.path.join('%{nodejs_sitelib}', moddir, 'node_modules/inherits')
|
||||||
|
if not os.path.realpath(dest) == src:
|
||||||
|
try:
|
||||||
|
os.unlink(dest)
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
os.symlink(src, dest)
|
||||||
|
except OSError, e:
|
||||||
|
sys.stderr.write(e + '\n')
|
||||||
|
EOF
|
||||||
|
|
||||||
|
%pretrans -p <lua>
|
||||||
|
if posix.stat("%{nodejs_sitelib}/inherits", "type") == "directory" then
|
||||||
|
os.rename('%{nodejs_sitelib}/inherits', '%{nodejs_sitelib}/inherits@2')
|
||||||
|
end
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc README.md
|
||||||
|
%license LICENSE
|
||||||
|
%{nodejs_sitelib}/inherits@2
|
||||||
|
%{nodejs_sitelib}/inherits
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Aug 20 2020 wangxiao <wangxiao65@huawei.com> - 2.0.3-1
|
||||||
|
- Package init
|
||||||
5
nodejs-inherits.yaml
Normal file
5
nodejs-inherits.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
git_url: https://github.com/isaacs/inherits
|
||||||
|
version_control: github
|
||||||
|
src_repo: isaacs/inherits
|
||||||
|
tag_prefix: "^v"
|
||||||
|
seperator: "."
|
||||||
Loading…
x
Reference in New Issue
Block a user