packages: nodejs-which/nodejs-which.spec - up to 1.0.5, fix bin packaging

glen glen at pld-linux.org
Sat Jun 16 15:31:39 CEST 2012


Author: glen                         Date: Sat Jun 16 13:31:39 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to 1.0.5, fix bin packaging

---- Files affected:
packages/nodejs-which:
   nodejs-which.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/nodejs-which/nodejs-which.spec
diff -u packages/nodejs-which/nodejs-which.spec:1.1 packages/nodejs-which/nodejs-which.spec:1.2
--- packages/nodejs-which/nodejs-which.spec:1.1	Wed Jan 25 23:44:49 2012
+++ packages/nodejs-which/nodejs-which.spec	Sat Jun 16 15:31:34 2012
@@ -1,16 +1,14 @@
 # $Revision$, $Date$
-%define		git_hash 5266ec6
 %define		pkg	which
 Summary:	A JavaScript implementation of the 'which' command
 Name:		nodejs-%{pkg}
-Version:	1.0.2
+Version:    1.0.5
 Release:	1
 License:	MIT
 Group:		Development/Libraries
 URL:		https://github.com/isaacs/node-which
-# download from https://github.com/isaacs/node-which/tarball/%%{version}
-Source0:	isaacs-node-%{pkg}-%{version}-0-g%{git_hash}.tar.gz
-# Source0-md5:	d0eae673d48dc782d437b522594cf4bd
+Source0:    http://registry.npmjs.org/which/-/which-%{version}.tgz
+# Source0-md5:	de8504eba9afa3e8a4e7feb9d3b52b38
 BuildRequires:	rpmbuild(macros) >= 1.634
 Requires:	nodejs
 BuildArch:	noarch
@@ -21,18 +19,16 @@
 
 %prep
 %setup -qc
-mv isaacs-node-%{pkg}-*/* .
+mv package/* .
 
-#%nodejs_fixshebang bin/%{pkg}
+%{__sed} -i -e '1s,^#!.*node,#!/usr/bin/node,' bin/*
+chmod a+rx bin/*
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
-install -d $RPM_BUILD_ROOT%{nodejs_libdir}
-cp -p %{pkg}.js $RPM_BUILD_ROOT%{nodejs_libdir}
-
-install -d $RPM_BUILD_ROOT%{_bindir}
-install -p bin/%{pkg} $RPM_BUILD_ROOT%{_bindir}/%{pkg}.js
+install -d $RPM_BUILD_ROOT{%{_bindir},%{nodejs_libdir}/%{pkg}}
+cp -a %{pkg}.js bin package.json $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
+ln -s %{nodejs_libdir}/%{pkg}/bin/%{pkg} $RPM_BUILD_ROOT%{_bindir}/%{pkg}.js
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -40,8 +36,12 @@
 %files
 %defattr(644,root,root,755)
 %doc README.md
-%attr(755,root,root) %{_bindir}/%{pkg}.js
-%{nodejs_libdir}/%{pkg}.js
+%attr(755,root,root) %{_bindir}/which.js
+%dir %{nodejs_libdir}/%{pkg}
+%{nodejs_libdir}/%{pkg}/package.json
+%{nodejs_libdir}/%{pkg}/%{pkg}.js
+%dir %{nodejs_libdir}/%{pkg}/bin
+%attr(755,root,root) %{nodejs_libdir}/%{pkg}/bin/which
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -49,6 +49,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2012/06/16 13:31:34  glen
+- up to 1.0.5, fix bin packaging
+
 Revision 1.1  2012/01/25 22:44:49  glen
 - initial node pkgs for npm deps
   based on specs from http://nodejs.tchol.org/ repo
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/nodejs-which/nodejs-which.spec?r1=1.1&r2=1.2



More information about the pld-cvs-commit mailing list