Skip to content

Commit

Permalink
new, version 0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Apr 8, 2013
0 parents commit 5e04fda
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
8 changes: 8 additions & 0 deletions load-path.patch
@@ -0,0 +1,8 @@
--- nodejs-gcontext-0.0.2/lib/gcontext.js~ 2012-12-14 12:42:59.000000000 +0200
+++ nodejs-gcontext-0.0.2/lib/gcontext.js 2013-04-08 21:14:51.070431135 +0300
@@ -1,4 +1,4 @@
-var _gcontext = require('../build/Release/gcontext.node');
+var _gcontext = require('../gcontext.node');

var GContext = module.exports = {};

51 changes: 51 additions & 0 deletions nodejs-gcontext.spec
@@ -0,0 +1,51 @@
%define pkg gcontext
Summary: Provide API to use GMainContext in Node.js
Name: nodejs-%{pkg}
Version: 0.0.2
Release: 1
License: MIT
Group: Development/Libraries
Source0: http://registry.npmjs.org/gcontext/-/%{pkg}-%{version}.tgz
# Source0-md5: 1f0aae37d577a56f46e82ab9f3b1fa67
Patch0: load-path.patch
URL: https://github.com/cfsghost/node-gcontext
BuildRequires: nodejs-gyp
BuildRequires: rpmbuild(macros) >= 1.657
BuildRequires: sed >= 4.0
Requires: nodejs >= 0.8
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
node-gcontext is an event loop integration between libuv and GLib, to
make that GLib event loop works with Node.js event engine.

It makes many libraries(GTK+, DBus, Clutter...etc) which are using
GLib event loop to be able to work on Node.js.

%prep
%setup -qc
mv package/* .
%patch0 -p1

%{__rm} -r build

%build
node-gyp configure --nodedir=/usr/src/nodejs --gyp=/usr/bin/gyp
node-gyp build --jobs=%{?__jobs} --verbose

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
cp -pr package.json lib $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
install -p build/Release/%{pkg}.node $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc README.md
%dir %{nodejs_libdir}/%{pkg}
%{nodejs_libdir}/%{pkg}/package.json
%{nodejs_libdir}/%{pkg}/lib
%attr(755,root,root) %{nodejs_libdir}/%{pkg}/%{pkg}.node

0 comments on commit 5e04fda

Please sign in to comment.