%global modname typeahead.js %if ! ( 0%{?fedora} || 0%{?rhel} >= 7 ) %{?nodejs_find_provides_and_requires} %global nodejs_arches %{ix86} x86_64 %{arm} %endif # tests are disabled since they require a browser or PhantomJS %bcond_with tests Name: nodejs-%{modname} Version: 0.10.5 Release: 9%{?dist} Summary: Autocomplete library for JavaScript License: MIT URL: http://twitter.github.com/typeahead.js Source0: http://registry.npmjs.org/%{modname}/-/%{modname}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging BuildRequires: npm(semver) BuildRequires: npm(grunt-cli) BuildRequires: npm(grunt-contrib-uglify) BuildRequires: npm(grunt-sed) BuildRequires: web-assets-devel Requires: js-%{modname} = %{version}-%{release} %if %{with tests} BuildRequires: npm(karma) BuildRequires: npm(mocha) %endif %description Inspired by twitter.com's autocomplete search functionality, typeahead.js is a flexible JavaScript library that provides a strong foundation for building robust typeaheads. The typeahead.js library consists of 2 components: the suggestion engine, Bloodhound, and the UI view, Typeahead. The suggestion engine is responsible for computing suggestions for a given query. The UI view is responsible for rendering suggestions and handling DOM interactions. Both components can be used separately, but when used together, they can provided a rich typeahead experience. %package -n js-%{modname} Summary: %{summary} Requires: web-assets-filesystem %description -n js-%{modname} Inspired by twitter.com's autocomplete search functionality, typeahead.js is a flexible JavaScript library that provides a strong foundation for building robust typeaheads. The typeahead.js library consists of 2 components: the suggestion engine, Bloodhound, and the UI view, Typeahead. The suggestion engine is responsible for computing suggestions for a given query. The UI view is responsible for rendering suggestions and handling DOM interactions. Both components can be used separately, but when used together, they can provided a rich typeahead experience. %prep %setup -q -n package # remove prebuilt files rm -r dist/ %build %nodejs_symlink_deps --check grunt build %if %{with tests} %check TEST_SUITE=unit test/ci %endif %install mkdir -p %{buildroot}%{_jsdir}/%{modname} cp -pr src/ dist/ %{buildroot}%{_jsdir}/%{modname}/ mkdir -p %{buildroot}%{nodejs_sitelib}/%{modname} cp -p package.json %{buildroot}%{nodejs_sitelib}/%{modname}/ ln -s %{_jsdir}/%{modname}/src %{_jsdir}/%{modname}/dist %{buildroot}%{nodejs_sitelib}/%{modname}/ %nodejs_symlink_deps %files %{nodejs_sitelib}/%{modname} %files -n js-%{modname} %license LICENSE %doc README.md CHANGELOG.md doc/* %{_jsdir}/%{modname} %changelog * Fri Jul 13 2018 Fedora Release Engineering - 0.10.5-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Thu Feb 08 2018 Fedora Release Engineering - 0.10.5-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 0.10.5-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.10.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Tue Sep 06 2016 Dan Callaghan - 0.10.5-5 - fixed broken symlinks in nodejs module (RHBZ#1346150) - use %%license macro * Thu Feb 04 2016 Fedora Release Engineering - 0.10.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Jun 17 2015 Fedora Release Engineering - 0.10.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Fri Dec 12 2014 Dan Callaghan - 0.10.5-2 - added missing BR on grunt-sed * Sun Oct 12 2014 Dan Callaghan - 0.10.5-1 - initial version