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