Package inity

This commit is contained in:
jeff200902 2020-08-28 14:14:04 +08:00
parent 0fd72bd035
commit 365f787450
9 changed files with 533 additions and 0 deletions

BIN
lodash-3.10.1.tar.gz Normal file

Binary file not shown.

BIN
lodash-cli-3.10.1.tar.gz Normal file

Binary file not shown.

View File

@ -0,0 +1,21 @@
{
"name": "lodash-compat",
"version": "3.10.1",
"description": "The compatibility build of lodash modular utilities.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
"main": "index.js",
"keywords": "compatibility, modules, stdlib, util",
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
],
"bugs": "https://github.com/lodash/lodash/issues",
"repository": "lodash/lodash-compat",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}

35
lodash-modules-2.txt Normal file
View File

@ -0,0 +1,35 @@
take
takeright
takerightwhile
takewhile
template
templatesettings
throttle
times
toarray
_toiterable
_topath
toplainobject
transform
trim
trimleft
_trimmedleftindex
_trimmedrightindex
trimright
trunc
unescape
union
uniq
uniqueid
unzip
unzipwith
values
valuesin
where
without
words
wrap
xor
zip
zipobject
zipwith

222
lodash-modules.txt Normal file
View File

@ -0,0 +1,222 @@
add
after
_arraycopy
_arrayeach
_arrayevery
_arrayfilter
_arraymap
ary
assign
at
attempt
_baseassign
_baseat
_basecallback
_baseclone
_basecompareascending
_basecopy
_basecreate
_basedelay
_basedifference
_baseeach
_baseeachright
_basefilter
_basefind
_basefindindex
_baseflatten
_basefor
_baseforright
_basefunctions
_baseget
_baseindexof
_baseisequal
_baseismatch
_basematches
_basematchesproperty
_basepullat
_baserandom
_basereduce
_baseslice
_basesortby
_basesortbyorder
_basetostring
_baseuniq
_basevalues
before
_binaryindex
_binaryindexby
bind
bindall
_bindcallback
bindkey
_cacheindexof
callback
camelcase
capitalize
ceil
_charsleftindex
_charsrightindex
chunk
clone
clonedeep
compact
constant
countby
create
_createaggregator
_createassigner
_createcache
_createcompounder
_createpadding
_createwrapper
curry
curryright
debounce
deburr
defaults
defaultsdeep
defer
delay
difference
drop
dropright
droprightwhile
dropwhile
endswith
escape
escaperegexp
every
fill
filter
find
findindex
findkey
findlast
findlastindex
findlastkey
findwhere
first
flatten
flattendeep
floor
flow
flowright
foreach
foreachright
forin
forinright
forown
forownright
functions
get
_getnative
groupby
gt
gte
has
identity
includes
indexby
indexof
initial
inrange
intersection
invert
invoke
_invokepath
isarguments
isarray
isboolean
isdate
iselement
isempty
isequal
iserror
isfinite
isfunction
_isiterateecall
ismatch
isnan
isnative
isnull
isnumber
isobject
isplainobject
isregexp
isstring
istypedarray
isundefined
kebabcase
keys
keysin
last
lastindexof
lt
lte
map
mapkeys
mapvalues
matches
matchesproperty
max
memoize
merge
method
methodof
min
mixin
modargs
negate
noop
now
omit
once
pad
padleft
padright
pairs
parseint
partial
partialright
partition
pick
_pickbyarray
_pickbycallback
pluck
property
propertyof
pull
pullat
random
range
rearg
reduce
reduceright
_reescape
_reevaluate
_reinterpolate
reject
remove
repeat
_replaceholders
rest
restparam
result
round
sample
set
shuffle
size
slice
snakecase
some
sortby
sortbyall
sortbyorder
sortedindex
sortedlastindex
spread
startcase
startswith
sum
support

20
lodash-node-package.json Normal file
View File

@ -0,0 +1,20 @@
{
"name": "lodash-node",
"version": "3.10.1",
"description": "lodash module bundles for Node.js/io.js.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
"main": "modern/index.js",
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
],
"bugs": "https://github.com/lodash/lodash/issues",
"repository": "lodash/lodash-node",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}

20
lodash-package.json Normal file
View File

@ -0,0 +1,20 @@
{
"name": "lodash",
"version": "3.10.1",
"description": "The modern build of lodash modular utilities.",
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
"license": "MIT",
"main": "index.js",
"keywords": "modules, stdlib, util",
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"contributors": [
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
"Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)",
"Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)",
"Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)",
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
],
"repository": "lodash/lodash",
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
}

211
lodash.spec Normal file
View File

@ -0,0 +1,211 @@
%{?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

4
lodash.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: lodash/lodash
tag_pattern: "(.*?)-npm-packages"
seperator: "."