]> git.pld-linux.org Git - packages/nodejs-gyp.git/blob - nodejs-gyp.spec
0b1b2d6ccca5e95534ffd0bfed8a63498d86e564
[packages/nodejs-gyp.git] / nodejs-gyp.spec
1 %define         pkg     node-gyp
2 Summary:        Node.js native addon build tool
3 Name:           nodejs-gyp
4 Version:        0.9.5
5 Release:        2
6 License:        MIT
7 Group:          Development/Libraries
8 URL:            https://github.com/TooTallNate/node-gyp
9 Source0:        http://registry.npmjs.org/node-gyp/-/node-gyp-%{version}.tgz
10 # Source0-md5:  3d8a5cf4b5b92457af68035bb0e0e96f
11 Patch0:         jobs-alias.patch
12 Patch1:         system-gyp.patch
13 Patch2:         link-libnode.patch
14 BuildRequires:  sed >= 4.0
15 Requires:       gyp
16 Requires:       make
17 Requires:       nodejs
18 Requires:       nodejs-devel
19 Requires:       nodejs-fstream
20 Requires:       nodejs-glob < 4.0.0
21 Requires:       nodejs-glob >= 3.0.0
22 Requires:       nodejs-graceful-fs < 2.0.0
23 Requires:       nodejs-graceful-fs >= 1.0.0
24 Requires:       nodejs-minimatch
25 Requires:       nodejs-mkdirp
26 Requires:       nodejs-nopt < 3.0.0
27 Requires:       nodejs-nopt >= 2.0.0
28 Requires:       nodejs-npmlog < 1.0.0
29 Requires:       nodejs-osenv < 1.0.0
30 Requires:       nodejs-request < 3
31 Requires:       nodejs-request >= 2
32 Requires:       nodejs-rimraf < 3.0.0
33 Requires:       nodejs-rimraf >= 2.0.0
34 Requires:       nodejs-semver < 2.0.0
35 Requires:       nodejs-semver >= 1.0.0
36 Requires:       nodejs-tar
37 Requires:       nodejs-which < 2.0.0
38 Requires:       nodejs-which >= 1.0.0
39 Requires:       python
40 Obsoletes:      node-node-gyp
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 node-gyp is a cross-platform command-line tool written in Node.js for
46 compiling native addon modules for Node.js, which takes away the pain
47 of dealing with the various differences in build platforms. It is the
48 replacement to the node-waf program which is removed for node v0.8.
49
50 %prep
51 %setup -qc
52 mv package/* .
53 %patch0 -p1
54 %patch1 -p1
55 %patch2 -p1
56
57 # fix shebangs
58 %{__sed} -i -e '1s,^#!.*node,#!/usr/bin/node,' \
59         bin/node-gyp.js
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63
64 install -d $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
65 cp -pr bin lib legacy package.json $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
66 cp -pr *.gyp* $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
67
68 install -d $RPM_BUILD_ROOT%{_bindir}
69 ln -s %{nodejs_libdir}/%{pkg}/bin/node-gyp.js $RPM_BUILD_ROOT%{_bindir}/node-gyp
70
71 %clean
72 rm -rf $RPM_BUILD_ROOT
73
74 %files
75 %defattr(644,root,root,755)
76 %doc README.md LICENSE
77 %attr(755,root,root) %{_bindir}/node-gyp
78 %dir %{nodejs_libdir}/%{pkg}
79 %{nodejs_libdir}/%{pkg}/package.json
80 %{nodejs_libdir}/%{pkg}/addon.gypi
81 %{nodejs_libdir}/%{pkg}/lib
82 %dir %{nodejs_libdir}/%{pkg}/bin
83 %attr(755,root,root) %{nodejs_libdir}/%{pkg}/bin/node-gyp.js
84
85 # waf based tools
86 %{nodejs_libdir}/%{pkg}/legacy
This page took 0.073149 seconds and 2 git commands to generate.