代码拉取完成,页面将自动刷新
%{?nodejs_find_provides_and_requires}
Name: lodash
Version: 3.10.1
Release: 1
Summary: A JavaScript utility library
License: MIT
URL: https://lodash.com/
Source0: https://github.com/lodash/lodash/archive/%{version}/%{name}-%{version}.tar.gz
Source1: https://github.com/lodash/lodash-cli/archive/%{version}/%{name}-cli-%{version}.tar.gz
Source2: https://raw.githubusercontent.com/lodash/lodash/%{version}-npm/package.json#/%{name}-package.json
Source3: https://raw.githubusercontent.com/lodash/lodash-compat/%{version}-npm/package.json#/%{name}-compat-package.json
Source4: https://raw.githubusercontent.com/lodash/lodash-node/%{version}/package.json#/%{name}-node-package.json
Source5: %{name}-modules.txt
Source6: %{name}-modules-2.txt
BuildArch: noarch
BuildRequires: nodejs-packaging >= 7-5 web-assets-devel
BuildRequires: npm(closure-compiler) npm(glob) npm(uglify-js) >= 2.4.13 npm(semver)
Obsoletes: nodejs-lodash-arraypool < 2.4.1-5
Obsoletes: nodejs-lodash-basebind < 2.4.1-5
Obsoletes: nodejs-lodash-basecreatecallback < 2.4.1-5
Obsoletes: nodejs-lodash-basecreatewrapper < 2.4.1-5
Obsoletes: nodejs-lodash-basemerge < 2.4.1-5
Obsoletes: nodejs-lodash-cachepush < 2.4.1-5
Obsoletes: nodejs-lodash-charatcallback < 2.4.1-5
Obsoletes: nodejs-lodash-compareascending < 2.4.1-5
Obsoletes: nodejs-lodash-compose < 2.4.1-5
Obsoletes: nodejs-lodash-contains < 2.4.1-5
Obsoletes: nodejs-lodash-createcallback < 2.4.1-5
Obsoletes: nodejs-lodash-escapehtmlchar < 2.4.1-5
Obsoletes: nodejs-lodash-escapestringchar < 2.4.1-5
Obsoletes: nodejs-lodash-getarray < 2.4.1-5
Obsoletes: nodejs-lodash-getobject < 2.4.1-5
Obsoletes: nodejs-lodash-htmlescapes < 2.4.1-5
Obsoletes: nodejs-lodash-htmlunescapes < 2.4.1-5
Obsoletes: nodejs-lodash-keyprefix < 2.4.1-5
Obsoletes: nodejs-lodash-largearraysize < 2.4.1-5
Obsoletes: nodejs-lodash-lodashwrapper < 2.4.1-5
Obsoletes: nodejs-lodash-maxpoolsize < 2.4.1-5
Obsoletes: nodejs-lodash-objectpool < 2.4.1-5
Obsoletes: nodejs-lodash-objecttypes < 2.4.1-5
Obsoletes: nodejs-lodash-reescapedhtml < 2.4.1-5
Obsoletes: nodejs-lodash-releasearray < 2.4.1-5
Obsoletes: nodejs-lodash-releaseobject < 2.4.1-5
Obsoletes: nodejs-lodash-reunescapedhtml < 2.4.1-5
Obsoletes: nodejs-lodash-setbinddata < 2.4.1-5
Obsoletes: nodejs-lodash-shimisplainobject < 2.4.1-5
Obsoletes: nodejs-lodash-shimkeys < 2.4.1-5
Obsoletes: nodejs-lodash-unescapehtmlchar < 2.4.1-5
%description
A JavaScript utility library delivering consistency,
modularity, performance, & extras.
%package -n js-lodash
Summary: The modern build of lodash modular utilities
Requires: %{name} = %{version}-%{release} web-assets-filesystem
%description -n js-lodash
The modern build of lodash exported as a single file.
%package -n nodejs-lodash
Summary: The modern build of lodash modular utilities
Requires: %{name} = %{version}-%{release}
%description -n nodejs-lodash
The modern build of lodash exported as Node.js/io.js modules.
%package -n nodejs-lodash-compat
Summary: The compatibility build of lodash modular utilities
Requires: %{name} = %{version}-%{release}
%description -n nodejs-lodash-compat
The compatibility build of lodash exported as Node.js/io.js modules.
%package -n nodejs-lodash-node
Summary: lodash module bundles for Node.js/io.js
Requires: %{name} = %{version}-%{release}
%description -n nodejs-lodash-node
The compatibility & modern builds of lodash exported as Node.js/io.js modules.
%package -n nodejs-lodash-cli
Summary: The lodash command-line interface
Requires: %{name} = %{version}-%{release}
%description -n nodejs-lodash-cli
The lodash command-line interface for creating custom
builds & precompiling templates
%{lua:
template = [[
%%package -n nodejs-lodash-@@PKG@@
Summary: The modern build of lodash's _.@@FUNC@@ as a module
%%description -n nodejs-lodash-@@PKG@@
The modern build of lodash's _.@@FUNC@@ as a module.
%%files -n nodejs-lodash-@@PKG@@
%%doc npm/lodash.@@FUNC@@/README.md
%%license npm/lodash.@@FUNC@@/LICENSE
%{nodejs_sitelib}/lodash.@@FUNC@@
]]
for func in io.open(rpm.expand("%SOURCE5")):lines() do
pkg = string.gsub(func, "_", "")
print(rpm.expand(string.gsub(string.gsub(template, "@@FUNC@@", func), "@@PKG@@", pkg)).."\n")
end}
%{lua:
template = [[
%%package -n nodejs-lodash-@@PKG@@
Summary: The modern build of lodash's _.@@FUNC@@ as a module
%%description -n nodejs-lodash-@@PKG@@
The modern build of lodash's _.@@FUNC@@ as a module.
%%files -n nodejs-lodash-@@PKG@@
%%doc npm/lodash.@@FUNC@@/README.md
%%license npm/lodash.@@FUNC@@/LICENSE
%{nodejs_sitelib}/lodash.@@FUNC@@
]]
for func in io.open(rpm.expand("%SOURCE6")):lines() do
pkg = string.gsub(func, "_", "")
print(rpm.expand(string.gsub(string.gsub(template, "@@FUNC@@", func), "@@PKG@@", pkg)).."\n")
end}
%prep
%setup -q -T -b 0 -a 1
rm -rf lodash.js lodash.min.js node_modules vendor
pushd %{name}-cli-%{version}
%nodejs_fixdep closure-compiler "^0.2.6"
%nodejs_fixdep glob "^6.0.3"
%nodejs_fixdep -r lodash-compat
%nodejs_fixdep semver "^5.1.0"
%nodejs_fixdep uglify-js "^2.4.13"
rm -rf node_modules
popd
mkdir node_modules
mv %{name}-cli-%{version} node_modules/lodash-cli
%build
pushd node_modules/lodash-cli
%nodejs_symlink_deps --build
ln -sf ../../.. node_modules/lodash-compat
popd
%{__nodejs} ./node_modules/lodash-cli/bin/lodash modern -o ./lodash.js
mkdir nodejs-lodash
pushd nodejs-lodash
%{__nodejs} ../node_modules/lodash-cli/bin/lodash modularize modern exports=node -o ./
%{__nodejs} ../node_modules/lodash-cli/bin/lodash modern -d -o ./index.js
popd
mkdir nodejs-lodash-compat
pushd nodejs-lodash-compat
%{__nodejs} ../node_modules/lodash-cli/bin/lodash modularize compat exports=node -o ./
%{__nodejs} ../node_modules/lodash-cli/bin/lodash compat -d -o ./index.js
popd
mkdir nodejs-lodash-node
pushd nodejs-lodash-node
%{__nodejs} ../node_modules/lodash-cli/bin/lodash modularize compat exports=node -o ./compat
%{__nodejs} ../node_modules/lodash-cli/bin/lodash compat exports=node -d -o ./compat/index.js
%{__nodejs} ../node_modules/lodash-cli/bin/lodash modularize modern exports=node -o ./modern
%{__nodejs} ../node_modules/lodash-cli/bin/lodash modern exports=node -d -o ./modern/index.js
popd
%{__nodejs} ./node_modules/lodash-cli/bin/lodash modularize modern exports=npm -d -o ./npm
%install
mkdir -p %{buildroot}%{nodejs_sitelib}
mkdir -p %{buildroot}%{_jsdir}/lodash
cp -p lodash.js lodash.min.js %{buildroot}%{_jsdir}/lodash
cp -pr nodejs-lodash %{buildroot}%{nodejs_sitelib}/lodash
cp -pr %{SOURCE2} %{buildroot}%{nodejs_sitelib}/lodash/package.json
cp -pr nodejs-lodash-compat %{buildroot}%{nodejs_sitelib}/lodash-compat
cp -pr %{SOURCE3} %{buildroot}%{nodejs_sitelib}/lodash-compat/package.json
cp -pr nodejs-lodash-node %{buildroot}%{nodejs_sitelib}/lodash-node
cp -pr %{SOURCE4} %{buildroot}%{nodejs_sitelib}/lodash-node/package.json
mkdir -p %{buildroot}%{_datadir}/nodejs-lodash-cli
cp -pr node_modules/lodash-cli/template %{buildroot}%{_datadir}/nodejs-lodash-cli
mkdir -p %{buildroot}%{nodejs_sitelib}/lodash-cli
cp -pr node_modules/lodash-cli/package.json %{buildroot}%{nodejs_sitelib}/lodash-cli
mkdir -p %{buildroot}%{nodejs_sitelib}/lodash-cli/lib
install -p -m644 node_modules/lodash-cli/lib/* %{buildroot}%{nodejs_sitelib}/lodash-cli/lib
ln -s %{_datadir}/nodejs-lodash-cli/template %{buildroot}%{nodejs_sitelib}/lodash-cli
mkdir -p %{buildroot}%{nodejs_sitelib}/lodash-cli/bin
install -p -m755 node_modules/lodash-cli/bin/* %{buildroot}%{nodejs_sitelib}/lodash-cli/bin
mkdir -p %{buildroot}%{_bindir}
ln -s %{nodejs_sitelib}/lodash-cli/bin/lodash %{buildroot}%{_bindir}
pushd npm
for module in lodash.*
do
mkdir %{buildroot}%{nodejs_sitelib}/$module
cp -pr $module/package.json %{buildroot}%{nodejs_sitelib}/$module
cp -pr $module/index.js %{buildroot}%{nodejs_sitelib}/$module
done
popd
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%files
%{!?_licensedir:%global license %doc}
%doc README.md CONTRIBUTING.md
%license LICENSE
%files -n js-lodash
%{_jsdir}/lodash
%files -n nodejs-lodash
%{nodejs_sitelib}/lodash
%files -n nodejs-lodash-compat
%{nodejs_sitelib}/lodash-compat
%files -n nodejs-lodash-node
%{nodejs_sitelib}/lodash-node
%files -n nodejs-lodash-cli
%{nodejs_sitelib}/lodash-cli
%{_datadir}/nodejs-lodash-cli
%{_bindir}/lodash
%changelog
* Fri Aug 21 2020 Jeffery.Gao <gaojianxing@huawei.com> - 3.10.1-1
- Package init
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。