From a0cb00868d38de0252c20bfb171db92b9f533979 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 6 Oct 2003 14:06:25 +0000 Subject: 4 changes * default to 1 CPU (patch from Nir Soffer) * clear up some messy syntax (extra ;'s) * remove duplicate installation of *msg files * remove unnecessary build of smbspool`& modules (This used to be commit 175d4aa334f510146bc673a0049110f0873775bc) --- packaging/RedHat/samba.spec.tmpl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'packaging/RedHat/samba.spec.tmpl') diff --git a/packaging/RedHat/samba.spec.tmpl b/packaging/RedHat/samba.spec.tmpl index 4a9c6df163..ee0b43c017 100644 --- a/packaging/RedHat/samba.spec.tmpl +++ b/packaging/RedHat/samba.spec.tmpl @@ -68,10 +68,18 @@ autoheader autoconf EXTRA="-D_LARGEFILE64_SOURCE" %endif + +## Get number of cpu's, default for 1 cpu on error NUMCPU=`grep processor /proc/cpuinfo | wc -l` +if [ $NUMCPU -eq 0 ]; then + NUMCPU=1; +fi + +## run autogen if missing the configure script if [ ! -f "configure" ]; then ./autogen.sh fi + CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \ --prefix=%{prefix} \ --localstatedir=/var \ @@ -88,9 +96,8 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \ --with-swatdir=%{prefix}/share/swat \ --with-libsmbclient make -j${NUMCPU} proto -make -j${NUMCPU} all nsswitch/libnss_wins.so modules +make -j${NUMCPU} all nsswitch/libnss_wins.so make -j${NUMCPU} debug2html -make -j${NUMCPU} bin/smbspool # Remove some permission bits to avoid to many dependencies find examples docs -type f | xargs -r chmod -x @@ -154,7 +161,7 @@ cd .. # Install the nsswitch wins library install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib -( cd $RPM_BUILD_ROOT/lib; ln -sf libnss_wins.so libnss_wins.so.2; ) +( cd $RPM_BUILD_ROOT/lib; ln -sf libnss_wins.so libnss_wins.so.2 ) # Install winbind shared libraries install -m755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/lib @@ -427,7 +434,6 @@ fi %{prefix}/share/swat/lang/*/images/* %{prefix}/share/swat/lang/*/include/*.html %{prefix}/share/swat/using_samba/* -%attr(755,root,root) %{prefix}/lib/samba/*.msg %config(noreplace) /etc/samba/lmhosts %config(noreplace) /etc/samba/smb.conf %config(noreplace) /etc/samba/smbusers -- cgit