[Fedora-directory-commits] ldapserver/ldap/cm Makefile,1.40,1.41

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Thu Nov 10 01:35:58 UTC 2005


Author: rmeggins

Update of /cvs/dirsec/ldapserver/ldap/cm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13247/ldapserver/ldap/cm

Modified Files:
	Makefile 
Log Message:
Bug(s) fixed: 172818
Bug Description: Allow ldapserver rpm to be made externally
Reviewed by: Noriko (Thanks!)
Fix Description: Just use a simple sed command to replace the tokens in 
the spec.tmpl file.  Just assume Fedora branding for this.  For some 
reason, on FC4, the setup -b step does not work unless I added a second 
echo yes to the command.  The tar command used by the rpmbuild step must 
have all of the command line arguments before the directory to tar.  I 
moved some things around to make the rpm build process more dsbuild 
friendly.
Platforms tested: FC4
Flag Day: no
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none



Index: Makefile
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/Makefile,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- Makefile	31 Oct 2005 15:55:29 -0000	1.40
+++ Makefile	10 Nov 2005 01:35:50 -0000	1.41
@@ -712,10 +712,12 @@
 	startdir=`pwd` ; cd $(BUILD_ROOT) ; builddir=`pwd` ; \
 	cd $$startdir ; cd $(INSTDIR)/.. ; \
 	if [ ! -f $(RPM_FILE_BASE).tar.gz ] ; then \
-		if [ ! -f $(RPM_FILE_BASE) ] ; then \
+		if [ ! -d $(RPM_FILE_BASE) -a ! -f $(RPM_FILE_BASE) ] ; then \
 			ln -s $$builddir $(RPM_FILE_BASE) ; \
-		fi ; tar cfh - --exclude \*/built --exclude \*/CVS $(RPM_FILE_BASE) --exclude \*/branding --exclude \*/RHEL* | gzip > $(RPM_FILE_BASE).tar.gz ; \
-		rm $(RPM_FILE_BASE) ; \
+		fi ; tar cfh - --exclude \*/built --exclude \*/CVS --exclude \*/branding --exclude \*/RHEL* $(RPM_FILE_BASE) | gzip > $(RPM_FILE_BASE).tar.gz ; \
+		if [ -h $(RPM_FILE_BASE) ] ; then \
+			rm $(RPM_FILE_BASE) ; \
+		fi ; \
 	fi
 # execute the RPM build
 	rpmbuild $(RPM_TOPDIR) $(RPM_SOURCEDIR) $(RPM_BUILDDIR) $(RPM_RPMDIR) $(RPM_SRPMDIR) $(RPM_REQUIRES) --define "flavor $(RPM_FLAVOR)" --clean --nodeps -ba $(OBJDIR)/$(RPM_BASE_NAME)-ds.spec




More information about the Fedora-directory-commits mailing list