%global modname punycode %global commit 38c8d3131a82567bfef18da09f7f4db68c84f8a3 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %if ! ( 0%{?fedora} || 0%{?rhel} >= 7 ) %global nodejs_arches %{ix86} x86_64 %{arm} %endif # tests are disabled until qunit is packaged %bcond_with tests Name: js-%{modname} Version: 1.3.2 Release: 1%{?dist} Summary: Punycode conversion library for JavaScript License: MIT URL: http://mths.be/punycode Source0: https://github.com/bestiejs/punycode.js/archive/%{commit}/punycode.js-%{commit}.tar.gz BuildArch: noarch BuildRequires: web-assets-devel Requires: web-assets-filesystem %if %{with tests} ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs BuildRequires: nodejs-qunit %endif %description A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms. %prep %setup -q -n punycode.js-%{commit} %build # nothing to do %if %{with tests} %check %nodejs_symlink_deps --check node tests/tests.js %endif %install mkdir -p %{buildroot}%{_jsdir}/%{modname} cp -p punycode.js %{buildroot}%{_jsdir}/%{modname}/ %files %doc README.md LICENSE-MIT.txt %{_jsdir}/%{modname} %changelog * Tue Nov 11 2014 Dan Callaghan - 1.3.2-1 - upstream release 1.3.2 - dropped Nodejs-related packaging stuff as the Nodejs module is not needed * Sun Oct 12 2014 Dan Callaghan - 1.3.1-1 - initial version