Blob Blame History Raw
# tests fails for Japan encoding needs iconv module not yet in Fedora
%global enable_tests 0
%global module_name encoding

Name:           nodejs-%{module_name}
Version:        0.1.12
Release:        2%{?dist}
Summary:        Convert encodings, uses iconv by default and falls back to iconv-lite if needed

License:        MIT
URL:            https://github.com/andris9/encoding
Source0:        https://github.com/andris9/%{module_name}/archive/v%{version}.tar.gz

BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires: nodeunit
%endif

%description
encoding is a simple wrapper around node-iconv and iconv-lite to convert
strings from one encoding to another. If node-iconv is not available for
some reason, iconv-lite will be used instead of it as a fallback.

%prep
%setup -q -n %{module_name}-%{version}
rm -rf node_modules
%nodejs_fixdep iconv-lite

%build
# nothing to build

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
cp -pr package.json lib %{buildroot}%{nodejs_sitelib}/%{module_name}
%nodejs_symlink_deps

%if 0%{?enable_tests}
%check
%{__nodejs} -e require("./")
%nodejs_symlink_deps --check
nodeunit test
%endif

%files
%doc README.md
%license LICENSE
%{nodejs_sitelib}/%{module_name}

%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Dec 24 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.1.12-1
- Update to 0.1.12
- Drop gittag0 as github released tarballs are allowed to use

* Tue Sep 29 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.1.11-2
- fixdep for npm(iconv-lite)
- fixed summary as suggested in review rh#1265322

* Mon Sep 21 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.1.11-1
- Initial packaging