diff --git a/ejs-1.0.0.tgz b/ejs-1.0.0.tgz new file mode 100644 index 0000000..627d3e3 Binary files /dev/null and b/ejs-1.0.0.tgz differ diff --git a/nodejs-ejs.spec b/nodejs-ejs.spec new file mode 100644 index 0000000..1a2e8e1 --- /dev/null +++ b/nodejs-ejs.spec @@ -0,0 +1,48 @@ +%{?nodejs_find_provides_and_requires} +%global enable_tests 1 +Name: nodejs-ejs +Version: 1.0.0 +Release: 1 +Summary: Embedded JavaScript templates for Node.js +License: MIT +URL: https://github.com/visionmedia/ejs +Source0: http://registry.npmjs.org/ejs/-/ejs-%{version}.tgz +Patch0: nodejs-ejs_fix-should-syntax.patch +BuildArch: noarch +%if 0%{?fedora} >= 19 +ExclusiveArch: %{nodejs_arches} noarch +%else +ExclusiveArch: %{ix86} x86_64 %{arm} noarch +%endif +BuildRequires: nodejs-packaging +%if 0%{?enable_tests} +BuildRequires: npm(mocha) npm(should) +%endif +%description +%{summary}. + +%prep +%setup -q -n package +%patch0 -p1 + +%build + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/ejs +cp -pr package.json ejs.js ejs.min.js index.js lib/ \ + %{buildroot}%{nodejs_sitelib}/ejs +%nodejs_symlink_deps +%if 0%{?enable_tests} + +%check +%nodejs_symlink_deps --check +%{nodejs_sitelib}/mocha/bin/mocha --require should --reporter spec +%endif + +%files +%doc History.md Readme.md examples/ +%{nodejs_sitelib}/ejs + +%changelog +* Tue Aug 18 2020 Anan Fu - 1.0.0-1 +- package init diff --git a/nodejs-ejs.spec.old b/nodejs-ejs.spec.old new file mode 100644 index 0000000..564567f --- /dev/null +++ b/nodejs-ejs.spec.old @@ -0,0 +1,106 @@ +%{?nodejs_find_provides_and_requires} + +%global enable_tests 1 + +Name: nodejs-ejs +Version: 1.0.0 +Release: 10%{?dist} +Summary: Embedded JavaScript templates for Node.js +# License text is included in Readme.md +License: MIT +URL: https://github.com/visionmedia/ejs +Source0: http://registry.npmjs.org/ejs/-/ejs-%{version}.tgz + +# Add patch to tests to bring up to a more modern 'should' syntax +Patch0: nodejs-ejs_fix-should-syntax.patch + +BuildArch: noarch +%if 0%{?fedora} >= 19 +ExclusiveArch: %{nodejs_arches} noarch +%else +ExclusiveArch: %{ix86} x86_64 %{arm} noarch +%endif + +BuildRequires: nodejs-packaging + +%if 0%{?enable_tests} +BuildRequires: npm(mocha) +BuildRequires: npm(should) +%endif + +%description +%{summary}. + + +%prep +%setup -q -n package + +%patch0 -p1 + + +%build +#nothing to do + + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/ejs +cp -pr package.json ejs.js ejs.min.js index.js lib/ \ + %{buildroot}%{nodejs_sitelib}/ejs + +%nodejs_symlink_deps + + +%if 0%{?enable_tests} +%check +%nodejs_symlink_deps --check +%{nodejs_sitelib}/mocha/bin/mocha --require should --reporter spec +%endif + + +%files +%doc History.md Readme.md examples/ +%{nodejs_sitelib}/ejs + + +%changelog +* Fri Feb 01 2019 Fedora Release Engineering - 1.0.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1.0.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Feb 08 2018 Fedora Release Engineering - 1.0.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.0.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 1.0.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 1.0.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Jan 25 2016 Jared Smith - 1.0.0-4 +- Fix test for newer should syntax + +* Wed Jun 17 2015 Fedora Release Engineering - 1.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Apr 19 2014 Jamie Nguyen - 1.0.0 +- update to upstream release 1.0.0 + +* Sat Aug 03 2013 Fedora Release Engineering - 0.8.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Sun Jul 21 2013 Jamie Nguyen - 0.8.4-2 +- restrict to compatible arches + +* Wed May 29 2013 Jamie Nguyen - 0.8.4-1 +- update to upstream release 0.8.4 + +* Sun Feb 17 2013 Jamie Nguyen - 0.8.3-1 +- initial package diff --git a/nodejs-ejs.yaml b/nodejs-ejs.yaml new file mode 100644 index 0000000..c68507c --- /dev/null +++ b/nodejs-ejs.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: visionmedia/ejs +tag_prefix: "^" +seperator: "." diff --git a/nodejs-ejs_fix-should-syntax.patch b/nodejs-ejs_fix-should-syntax.patch new file mode 100644 index 0000000..ecc6782 --- /dev/null +++ b/nodejs-ejs_fix-should-syntax.patch @@ -0,0 +1,19 @@ +diff --git a/test/ejs.js b/test/ejs.js +index acc2da1..28fbf32 100644 +--- a/test/ejs.js ++++ b/test/ejs.js +@@ -34,12 +34,12 @@ describe('ejs.compile(str, options)', function(){ + try { + ejs.compile(fixture('fail.ejs')); + } catch (err) { +- err.message.should.include('compiling ejs'); ++ err.message.should.containEql('compiling ejs'); + + try { + ejs.compile(fixture('fail.ejs'), { filename: 'fail.ejs' }); + } catch (err) { +- err.message.should.include('fail.ejs'); ++ err.message.should.containEql('fail.ejs'); + return; + } + }