samba-cvs.cvs
[Top] [All Lists]

svn commit: samba r13392 - in branches/SAMBA_3_0/packaging/RHEL: .

Subject: svn commit: samba r13392 - in branches/SAMBA_3_0/packaging/RHEL: .
From:
Date: Wed, 8 Feb 2006 14:18:05 +0000 GMT
Author: jerry
Date: 2006-02-08 14:18:05 +0000 (Wed, 08 Feb 2006)
New Revision: 13392

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13392

Log:
check gcc version before trying 'make pch'.  remove some historical actions
Modified:
   branches/SAMBA_3_0/packaging/RHEL/samba.spec.tmpl


Changeset:
Modified: branches/SAMBA_3_0/packaging/RHEL/samba.spec.tmpl
===================================================================
--- branches/SAMBA_3_0/packaging/RHEL/samba.spec.tmpl   2006-02-08 11:57:38 UTC 
(rev 13391)
+++ branches/SAMBA_3_0/packaging/RHEL/samba.spec.tmpl   2006-02-08 14:18:05 UTC 
(rev 13392)
@@ -152,8 +152,19 @@
 
 make showlayout
 
-make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"  proto pch
+make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"  proto 
 
+## check for gcc 3.4 or later
+CC_VERSION=`${CC} --version | head -1 | awk '{print $3}'`
+CC_MAJOR=`echo ${CC_VERSION} | cut -d. -f 1`
+CC_MINOR=`echo ${CC_VERSION} | cut -d. -f 2`
+if [ ${CC_MAJOR} -ge 3 ]; then
+        if [ ${CC_MAJOR} -gt 3 -o ${CC_MINOR} -ge 4 ]; then
+                make pch
+        fi
+fi
+
+
 make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" %{?_smp_mflags} \
        all modules pam_smbpass
 
@@ -276,9 +287,7 @@
 rm -rf $RPM_BUILD_ROOT
 
 %post
-/sbin/chkconfig --add smb
-
-## deal with an upgrade from a broken 3.0.21a.1 RPM
+## deal with an upgrade from a broken 3.0.21b RPM
 if [ "$1" -eq "2" ]; then
        if [ -d /var/cache/samba ]; then
                for file in `ls /var/cache/samba/*tdb`; do
@@ -296,6 +305,7 @@
 %preun
 if [ $1 = 0 ] ; then
     /sbin/chkconfig --del smb
+    /sbin/chkconfig --del winbind
     # rm -rf /var/log/samba/* /var/lib/samba/*
     /sbin/service smb stop >/dev/null 2>&1
 fi
@@ -303,7 +313,7 @@
 
 %postun
 if [ "$1" -ge "1" ]; then
-       %{initdir}/smb condrestart >/dev/null 2>&1
+       %{initdir}/smb restart >/dev/null 2>&1
 fi     
 
 
@@ -314,31 +324,11 @@
 fi
 
 %post common
-/sbin/chkconfig --add winbind
 /sbin/ldconfig
 
-%preun common
-if [ $1 = 0 ] ; then
-    /sbin/chkconfig --del winbind
-    /sbin/service winbind stop >/dev/null 2>&1
-fi
-exit 0
+%postun common 
+/sbin/ldconfig
 
-%postun common -p /sbin/ldconfig
-
-%triggerpostun -- samba < 1.9.18p7
-if [ $1 != 0 ]; then
-    /sbin/chkconfig --add smb
-fi
-
-%triggerpostun -- samba < 2.0.5a-3
-if [ $1 != 0 ]; then
-    [ ! -d /var/lock/samba ] && mkdir -m 0755 /var/lock/samba
-    [ ! -d /var/spool/samba ] && mkdir -m 1777 /var/spool/samba
-    chmod 644 /etc/services
-    [ -f /etc/inetd.conf ] && chmod 644 /etc/inetd.conf
-fi
-
 #######################################################################
 ## Files section                                                     ##
 #######################################################################

<Prev in Thread] Current Thread [Next in Thread>
  • svn commit: samba r13392 - in branches/SAMBA_3_0/packaging/RHEL: ., jerry <=