Package init

This commit is contained in:
lei_ju 2020-08-20 21:00:15 +08:00
parent 5b0e3bea07
commit eadfaecb1c
3 changed files with 60 additions and 0 deletions

BIN
nodejs-flot-0.8.3.tar.gz Normal file

Binary file not shown.

56
nodejs-flot.spec Normal file
View File

@ -0,0 +1,56 @@
%bcond_with check
%global barename flot
Name: nodejs-flot
Version: 0.8.3
Release: 1
Summary: Javascript plotting library for jQuery
License: MIT
URL: http://www.flotcharts.org/
Source0: https://github.com/flot/flot/archive/v%{version}/nodejs-flot-%{version}.tar.gz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging closure-compiler jarjar
%if %{with check}
BuildRequires: npm(jshint)
%endif
Requires: js-jquery js-excanvas
%description
Flot is a Javascript plotting library for jQuery.
Read more at the website: <http://www.flotcharts.org/>
%prep
%setup -qn %{barename}-%{version}
rm jquery.js excanvas.js excanvas.min.js
sed -i 's|yui-compressor $< -o $@|closure-compiler $(CLOSURE_FLAGS) --js=$< >$@|' \
Makefile
%build
CLOSURE_FLAGS="--language_in=ECMASCRIPT5" make %{?_smp_mflags}
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/flot
cp -pr package.json *.js \
%{buildroot}%{nodejs_sitelib}/flot
ln -sf %{_datadir}/javascript/excanvas/0/excanvas.js \
%{buildroot}%{nodejs_sitelib}/flot/excanvas.js
ln -sf %{_datadir}/javascript/excanvas/0/excanvas.min.js \
%{buildroot}%{nodejs_sitelib}/flot/excanvas.min.js
ln -sf %{_datadir}/javascript/jquery/3/jquery.js \
%{buildroot}%{nodejs_sitelib}/flot/jquery.js
%nodejs_symlink_deps
%if %{with check}
%check
%nodejs_symlink_deps --check
make test
%endif
%files
%license LICENSE.txt
%doc NEWS.md README.md
%{nodejs_sitelib}/flot
%changelog
* Tue Aug 18 2020 leiju <leiju4@huawei.com> - 0.8.3-1
- Package init

4
nodejs-flot.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: flot/flot
tag_prefix: "^v"
seperator: "."