packages: nodejs-rimraf/nodejs-rimraf.spec - tests use node binary; add tes...

glen glen at pld-linux.org
Thu Jan 26 00:29:17 CET 2012


Author: glen                         Date: Wed Jan 25 23:29:17 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- tests use node binary; add tests bcond

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

---- Diffs:

================================================================
Index: packages/nodejs-rimraf/nodejs-rimraf.spec
diff -u packages/nodejs-rimraf/nodejs-rimraf.spec:1.1 packages/nodejs-rimraf/nodejs-rimraf.spec:1.2
--- packages/nodejs-rimraf/nodejs-rimraf.spec:1.1	Wed Jan 25 23:44:48 2012
+++ packages/nodejs-rimraf/nodejs-rimraf.spec	Thu Jan 26 00:29:12 2012
@@ -1,16 +1,21 @@
 # $Revision$, $Date$
+#
+# Conditional build:
+%bcond_without	tests		# build without tests
+
 %define		git_hash 5022381
 %define		pkg	rimraf
 Summary:	A deep deletion module for node.js
 Name:		nodejs-%{pkg}
 Version:	1.0.9
-Release:	1
+Release:	2
 License:	MIT
 Group:		Development/Libraries
 URL:		https://github.com/isaacs/%{pkg}
 Source0:	http://registry.npmjs.org/%{pkg}/-/%{pkg}-%{version}.tgz
 # Source0-md5:	230542bf0c1b317b460e66f5e55a6409
 BuildRequires:	bash
+BuildRequires:	nodejs
 BuildRequires:	rpmbuild(macros) >= 1.634
 Requires:	nodejs
 BuildArch:	noarch
@@ -23,18 +28,17 @@
 %setup -qc
 mv package/* .
 
-# point to the right node.js binary so we can run tests
-#sed -i s/node/nodejs/ test/run.sh
+%build
+%if %{with tests}
+cd test
+bash run.sh
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
-cp -pr %{pkg}.js fiber.js package.json $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
-
-%check
-cd test
-bash run.sh
+cp -p %{pkg}.js fiber.js package.json $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -50,6 +54,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2012/01/25 23:29:12  glen
+- tests use node binary; add tests bcond
+
 Revision 1.1  2012/01/25 22:44:48  glen
 - initial node pkgs for npm deps
   based on specs from http://nodejs.tchol.org/ repo
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/nodejs-rimraf/nodejs-rimraf.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list