6 Star 0 Fork 2

src-openEuler / nodejs-jsonselect
关闭

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
nodejs-jsonselect.spec 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
yaokai13 提交于 2020-08-29 10:57 +08:00 . package init
%{?nodejs_find_provides_and_requires}
%global packagename JSONSelect
%global enable_tests 1
Name: nodejs-jsonselect
Version: 0.4.0
Release: 1
Summary: CSS-like selectors for JSON
License: ISC
URL: https://github.com/lloyd/JSONSelect.git
Source0: https://registry.npmjs.org/JSONSelect/-/JSONSelect-%{version}.tgz
Source1: https://raw.githubusercontent.com/lloyd/JSONSelect/master/LICENSE
Patch0000: nodejs-jsonselect_fix-print.patch
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: uglify-js
%endif
%description
CSS-like selectors for JSON
%prep
%setup -q -n package
cp -p %{SOURCE1} .
mv src/build src/build.disabled
mkdir src/build
cp src/build.disabled/post-compile.js src/build
rm -rf src/build.disabled src/dist
mkdir src/dist
rm -rf site
%patch0000 -p1
%build
pushd src
make project
%{_bindir}/uglifyjs dist/jsonselect.js > dist/jsonselect.min.js.tmp
%__nodejs build/post-compile.js dist/jsonselect.min.js.tmp > dist/jsonselect.min.js
popd
mv src src.complete
mkdir src
cp src.complete/dist/*.js src/
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/JSONSelect
cp -pr package.json src/ \
%{buildroot}%{nodejs_sitelib}/JSONSelect
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%__nodejs src.complete/test/run.js
%endif
%files
%{!?_licensedir:%global license %doc}
%doc *.md
%license LICENSE
%{nodejs_sitelib}/JSONSelect
%changelog
* Thu Aug 20 2020 yaokai <yaokai13@huawei.com> - 0.4.0-1
- Package init
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/nodejs-jsonselect.git
git@gitee.com:src-openeuler/nodejs-jsonselect.git
src-openeuler
nodejs-jsonselect
nodejs-jsonselect
openEuler-22.03-LTS-SP3

搜索帮助