diff --git a/.gitignore b/.gitignore index e69de29..1543fa2 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/chrono-1.0.4.tgz diff --git a/nodejs-chrono.spec b/nodejs-chrono.spec new file mode 100644 index 0000000..596e78d --- /dev/null +++ b/nodejs-chrono.spec @@ -0,0 +1,55 @@ +%global enable_tests 1 + +Name: nodejs-chrono +Version: 1.0.4 +Release: 1%{?dist} +Summary: Format dates in JavaScript + +License: MIT +URL: https://github.com/kkaefer/chrono.js +Source0: http://registry.npmjs.org/chrono/-/chrono-%{version}.tgz +BuildArch: noarch + +BuildRequires: nodejs-devel + +%if 0%{?enable_tests} +BuildRequires: npm(expresso) +%endif + +%description +Allows formatting of time in a `strftime` style, but with syntax taken +from PHP's date function. It implements pretty much all of the tokens +from PHP's date function, except for B (Swatch internet time) and +e (Content/City timezone identifier). You can escape characters with +a `\` (remember to encode the `\` in a string as well). All other +characters will be printed as they appear in the format string. + + +%prep +%setup -q -n package +rm -rf node_modules + + +%build + + +%if 0%{?enable_tests} +%check +%{nodejs_sitelib}/expresso/bin/expresso +%endif + + +%install +mkdir -p %{buildroot}/%{nodejs_sitelib}/chrono +cp -pr package.json index.js lib %{buildroot}/%{nodejs_sitelib}/chrono +%nodejs_symlink_deps + + +%files +%doc LICENSE README.markdown +%{nodejs_sitelib}/chrono + + +%changelog +* Sun Feb 10 2013 Tom Hughes - 1.0.4-1 +- Initial build of 1.0.4 diff --git a/sources b/sources index e69de29..1da66cb 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +a5b1182c66e4275007dbc5f2e6d2d12e chrono-1.0.4.tgz