glib2.spec
changeset 3263 3c14210c0b99
parent 3224 8ca3f4526524
child 3279 5d64ee516a02
--- a/glib2.spec	Tue Jul 06 20:35:42 2004 +0000
+++ b/glib2.spec	Wed Jul 07 09:21:36 2004 +0000
@@ -54,10 +54,21 @@
 bzcat %SOURCE1 | tar xvf -
 
 %build
+%ifos linux
+if [ -x /usr/bin/getconf ]; then
+  CPUS=`getconf _NPROCESSORS_ONLN`
+fi
+%else
+  CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l`
+%endif
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+  CPUS=1
+fi
+
 CFLAGS="$RPM_OPT_FLAGS"			\
 ./configure --prefix=%{_prefix}		\
 	    --sysconfdir=%{_sysconfdir}
-make
+make -j $CPUS
 
 %install
 make DESTDIR=$RPM_BUILD_ROOT install
@@ -103,6 +114,9 @@
 %{_mandir}/man3/*
 
 %changelog
+* Wed Jul 07 2004 - [email protected]
+- added "-j $CPUS" to make to speed up builds
+
 * Fri May 14 2004 - [email protected]
 - Bump to 2.4.1