Jared K. Smith 25eff0a
%{?nodejs_find_provides_and_requires}
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
%global packagename jsonm
Jared K. Smith 25eff0a
%global enable_tests 1
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
Name:		nodejs-jsonm
Jared K. Smith 25eff0a
Version:	1.0.9
bc6785b
Release:	7%{?dist}
Jared K. Smith 25eff0a
Summary:	JSON compressor for packing messages with memoization
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
License:	MIT
Jared K. Smith 25eff0a
URL:		https://github.com/lennartcl/jsonm
Jared K. Smith 25eff0a
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
ExclusiveArch:	%{nodejs_arches} noarch
Jared K. Smith 25eff0a
BuildArch:	noarch
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
BuildRequires:	nodejs-packaging
Jared K. Smith 25eff0a
%if 0%{?enable_tests}
Jared K. Smith 25eff0a
BuildRequires:	mocha
Jared K. Smith 25eff0a
%endif
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
%description
Jared K. Smith 25eff0a
JSON compressor for packing messages with memoization
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
%prep
Jared K. Smith 25eff0a
%autosetup -n package
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
sed -i '1s/env //' bin/cli.js
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
%build
Jared K. Smith 25eff0a
# nothing to do!
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
%install
Jared K. Smith 25eff0a
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith 25eff0a
cp -pr package.json build/ \
Jared K. Smith 25eff0a
	%{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}/bin
Jared K. Smith 25eff0a
install -p -D -m0755 bin/cli.js %{buildroot}%{nodejs_sitelib}/%{packagename}/bin/
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
mkdir -p %{buildroot}%{_bindir}
Jared K. Smith 25eff0a
ln -sf %{nodejs_sitelib}/%{packagename}/bin/cli.js \
Jared K. Smith 25eff0a
    %{buildroot}%{_bindir}/%{packagename}
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
%nodejs_symlink_deps
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
%check
Jared K. Smith 25eff0a
%nodejs_symlink_deps --check
Jared K. Smith 25eff0a
%{__nodejs} -e 'require("./")'
Jared K. Smith 25eff0a
%if 0%{?enable_tests}
Jared K. Smith 25eff0a
%{_bindir}/mocha -R spec
Jared K. Smith 25eff0a
%else
Jared K. Smith 25eff0a
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
Jared K. Smith 25eff0a
%endif
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
%files
Jared K. Smith 25eff0a
%doc *.md
Jared K. Smith 25eff0a
%license LICENSE
Jared K. Smith 25eff0a
%{nodejs_sitelib}/%{packagename}
Jared K. Smith 25eff0a
%{_bindir}/%{packagename}
Jared K. Smith 25eff0a
Jared K. Smith 25eff0a
%changelog
bc6785b
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.9-7
bc6785b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
bc6785b
cf0f808
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.9-6
cf0f808
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
cf0f808
10a7565
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.9-5
10a7565
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
10a7565
087817c
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.9-4
087817c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
087817c
67eabe5
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.9-3
67eabe5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
67eabe5
76f431b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.9-2
76f431b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
76f431b
Jared K. Smith 25eff0a
* Wed Mar 29 2017 Jared Smith <jsmith@fedoraproject.org> - 1.0.9-1
Jared K. Smith 25eff0a
- Initial packaging