diff options
| author | Rich Megginson <rmeggins@redhat.com> | 2005-11-10 01:35:50 +0000 |
|---|---|---|
| committer | Rich Megginson <rmeggins@redhat.com> | 2005-11-10 01:35:50 +0000 |
| commit | 7aded9df4ef96ef4feaab88aaa4e64471cf9478c (patch) | |
| tree | 907d41e2d6bafe50319c764a0d035ce6005ab26b | |
| parent | e0e4963c4c225ed7bd9698ba495ece9f3591176f (diff) | |
| download | ds-7aded9df4ef96ef4feaab88aaa4e64471cf9478c.tar.gz ds-7aded9df4ef96ef4feaab88aaa4e64471cf9478c.tar.xz ds-7aded9df4ef96ef4feaab88aaa4e64471cf9478c.zip | |
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
| -rw-r--r-- | Makefile | 11 | ||||
| -rw-r--r-- | ldap/cm/Makefile | 8 | ||||
| -rw-r--r-- | ldapserver.spec.tmpl | 3 |
3 files changed, 18 insertions, 4 deletions
@@ -346,7 +346,18 @@ redhat-ds.spec: ldapserver.spec.tmpl branding/rhds/brandver.dat $(RELTOOLSPATH)/ $(RELTOOLSPATH)/brandver.pl -i branding/rhds/brandver.dat $@ mv $@ $(OBJDIR) +ifdef INTERNAL_BUILD fedora-ds.spec: ldapserver.spec.tmpl branding/fedora/brandver.dat $(RELTOOLSPATH)/brandver.pl sed -e s/@PLATFORM@/$(BUILD_ARCH)/g ldapserver.spec.tmpl > $@ $(RELTOOLSPATH)/brandver.pl -i branding/fedora/brandver.dat $@ mv $@ $(OBJDIR) +else +fedora-ds.spec: ldapserver.spec.tmpl + sed -e s/@PLATFORM@/$(BUILD_ARCH)/g \ + -e 's/@COMPANY-PRODUCT-NAME@/Fedora Directory Server/g' \ + -e 's/@LCASE-COMPANY-NAME-NOSP@/fedora/g' \ + -e 's/@GEN-VERSION@/1.0/g' \ + -e 's+@COMPANY-URL@+http://directory.fedora.redhat.com/+g' \ + ldapserver.spec.tmpl > $@ + mv $@ $(OBJDIR) +endif # INTERNAL_BUILD diff --git a/ldap/cm/Makefile b/ldap/cm/Makefile index 3f3f26f5..d752f6a4 100644 --- a/ldap/cm/Makefile +++ b/ldap/cm/Makefile @@ -712,10 +712,12 @@ ifdef BUILD_RPM 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 diff --git a/ldapserver.spec.tmpl b/ldapserver.spec.tmpl index d2af6b7c..9934cd3f 100644 --- a/ldapserver.spec.tmpl +++ b/ldapserver.spec.tmpl @@ -76,7 +76,8 @@ Prefix: /opt/%{name} # all we do here is run setup -b to unpack the binaries # into the BuildRoot # the echo yes is for dsktune to continue -echo yes | ./setup -b $RPM_BUILD_ROOT/%{prefix} +# the second echo yes is for some platforms that need it +(echo yes ; echo yes) | ./setup -b $RPM_BUILD_ROOT/%{prefix} %clean if [ -z "$RPM_INSTALL_PREFIX" ]; then |
