Blob Blame History Raw
# This macro is needed at the start for building on EL6
%{?nodejs_find_provides_and_requires}

%global enable_tests 0

%global npm_name linify

Name:		nodejs-%{npm_name}
Version:	1.0.1
Release:	6%{?dist}
Summary:	Transform a file's line endings from `\\r\\n` to `\\n`
Group:		Development/Libraries

License:	MIT
URL:		https://github.com/ForbesLindesay/%{npm_name}
Source0:	http://registry.npmjs.org/linify/-/%{npm_name}-%{version}.tgz
# LICENSE file from Github
# https://raw.githubusercontent.com/ForbesLindesay/linify/master/LICENSE
# Upsteram has b een asked to include license text in tarball
Source1:	LICENSE

BuildRequires:	nodejs-packaging
 
BuildArch:	noarch
ExclusiveArch:	%{nodejs_arches} noarch

%description
Transform a file's line endings from `\\r\\n` to `\\n`.

%prep
%setup -q -n package
cp -p %{SOURCE1} .
rm -rf node_modules

%nodejs_fixdep commander ">= 1.2.0"
%nodejs_fixdep minimatch "^3.0.0"


%build
%nodejs_symlink_deps --build


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/linify
cp -pr lib index.js .js package.json %{buildroot}%{nodejs_sitelib}/linify > /dev/null 2>&1 || :
mkdir -p %{buildroot}%{nodejs_sitelib}/linify/bin
install -p -D -m0755 bin/cli.js %{buildroot}%{nodejs_sitelib}/linify/bin/cli.js

mkdir -p %{buildroot}%{_bindir}
ln -sf %{nodejs_sitelib}/linify/bin/cli.js \
    %{buildroot}%{_bindir}/linify-nodejs

%nodejs_symlink_deps

%check
%if 0%{enable_tests}
%nodejs_symlink_deps --check
%endif


%files
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc readme.md
%{nodejs_sitelib}/linify/
%{_bindir}/linify-nodejs

%changelog
* Fri Jan  1 2016 Tom Hughes <tom@compton.nu> - 1.0.1-6
- Update npm(minimatch) dependency

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Wed Nov 12 2014 Eduardo Mayorga Téllez <mayorga@fedoraproject.org> - 1.0.1-4
- Adding license file from Github
- Removing prepublish.js

* Mon Aug 25 2014 Eduardo Mayorga Téllez <mayorga@fedoraproject.org> - 1.0.1-3
- Fixing dependency issues

* Sun Aug 17 2014 Eduardo Mayorga Téllez <mayorga@fedoraproject.org> - 1.0.1-2
- Adding symlink to bin/cli.js in %%files

* Thu Jul 24 2014 Eduardo Mayorga Téllez <mayorga@fedoraproject.org> - 1.0.1-1
- Initial packaging