%{?nodejs_default_filter} Name: nodejs-i2c Version: 0.1.3 Release: 2%{?dist} Summary: Node.js native bindings for i2c-dev %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} %else ExclusiveArch: %{ix86} x86_64 %{arm} %endif # package.json indicates BSD, but no license file included # upstream notified in https://github.com/korevec/node-i2c/pull/9 # we're including a copy of the BSD license in order to comply with the terms of # the BSD license, as required by: # https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Text # # src/i2c-dev.(cc|h) are GPLv2+, everything else is BSD License: BSD and GPLv2+ URL: https://github.com/korevec/node-i2c Source0: http://registry.npmjs.org/i2c/-/i2c-%{version}.tgz Source1: https://raw.github.com/tchollingsworth/node-i2c/0985179d03823cab1bf3c5072bf315b22a7171c8/LICENSE BuildRequires: nodejs-devel node-gyp %description %{summary}. Plays well with Raspberry Pi and Beaglebone. %prep %setup -q -n package %nodejs_fixdep coffee-script '~1.4.0' %nodejs_fixdep underscore '~1.4.4' #copy LICENSE file to %%{_builddir} so it works with %%doc cp %{SOURCE1} . %build node-gyp rebuild %install mkdir -p %{buildroot}%{nodejs_sitelib}/i2c cp -pr lib main.js package.json %{buildroot}%{nodejs_sitelib}/i2c #this module is picky about the directory the shared object is in mkdir -p %{buildroot}%{nodejs_sitelib}/i2c/build/Release cp -pr build/Release/i2c.node %{buildroot}%{nodejs_sitelib}/i2c/build/Release chmod 0755 %{buildroot}%{nodejs_sitelib}/i2c/build/Release/i2c.node %nodejs_symlink_deps %files %{nodejs_sitelib}/i2c %doc README.md LICENSE examples %changelog * Wed Jun 26 2013 T.C. Hollingsworth - 0.1.3-2 - fix permissions on shared object * Fri Jun 21 2013 T.C. Hollingsworth - 0.1.3-1 - initial package