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