diff --git a/nodejs-flot-0.8.3.tar.gz b/nodejs-flot-0.8.3.tar.gz new file mode 100644 index 0000000..82ac2c9 Binary files /dev/null and b/nodejs-flot-0.8.3.tar.gz differ diff --git a/nodejs-flot.spec b/nodejs-flot.spec new file mode 100644 index 0000000..6815454 --- /dev/null +++ b/nodejs-flot.spec @@ -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: + +%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 - 0.8.3-1 +- Package init diff --git a/nodejs-flot.yaml b/nodejs-flot.yaml new file mode 100644 index 0000000..d91350e --- /dev/null +++ b/nodejs-flot.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: flot/flot +tag_prefix: "^v" +seperator: "."