mirror of
https://github.com/gnustep/tools-make.git
synced 2025-05-30 17:01:18 +00:00
Fixed code so that it should work both with old and new RPM builders
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@14778 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d6b99dc9a9
commit
7b5b3fbc1e
2 changed files with 34 additions and 3 deletions
|
@ -252,11 +252,25 @@ test-RPM_TOPDIR:
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi)
|
fi)
|
||||||
|
|
||||||
|
# The check for rpmbuild is for old RPM versions which didn't have
|
||||||
|
# rpmbuild and used 'rpm -ba' instead. It can be removed when we are
|
||||||
|
# reasonably sure no more old RPM versions (not having rpmbuild), are
|
||||||
|
# still around.
|
||||||
rpm: test-RPM_TOPDIR tgz
|
rpm: test-RPM_TOPDIR tgz
|
||||||
cp ../gnustep-make-$(GNUSTEP_MAKE_VERSION).tar.gz $(RPM_TOPDIR)/SOURCES/
|
cp ../gnustep-make-$(GNUSTEP_MAKE_VERSION).tar.gz $(RPM_TOPDIR)/SOURCES/
|
||||||
cp gnustep-make.spec $(RPM_TOPDIR)/SPECS/
|
cp gnustep-make.spec $(RPM_TOPDIR)/SPECS/
|
||||||
cd $(RPM_TOPDIR)/SPECS/
|
cd $(RPM_TOPDIR)/SPECS/
|
||||||
rpm -ba gnustep-make.spec
|
if which rpmbuild > /dev/null 2>/dev/null; then \
|
||||||
|
rpmbuild="rpmbuild"; \
|
||||||
|
else \
|
||||||
|
if which rpm > /dev/null 2>/dev/null; then \
|
||||||
|
rpmbuild="rpm"; \
|
||||||
|
else \
|
||||||
|
echo "Error: You don't have rpm installed!"; \
|
||||||
|
rpmbuild="rpmbuild"; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
$${rpmbuild} -ba gnustep-make.spec
|
||||||
|
|
||||||
generated-files: GNUmakefile GNUstep.sh GNUstep.csh config.h config.make debugapp openapp opentool gnustep-make.spec executable.template
|
generated-files: GNUmakefile GNUstep.sh GNUstep.csh config.h config.make debugapp openapp opentool gnustep-make.spec executable.template
|
||||||
|
|
||||||
|
|
|
@ -326,6 +326,13 @@ check-RPM_TOPDIR:
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
# In old RPM versions, building was done using 'rpm -ba'; in newer RPM
|
||||||
|
# versions, it can only be done using 'rpmbuild -ba'. Try to support
|
||||||
|
# the old RPM versions by using 'rpm' instead of 'rpmbuild', if
|
||||||
|
# 'rpmbuild' is not available. This hack can presumably be removed
|
||||||
|
# when all RPM versions on earth will have been updated to the new
|
||||||
|
# setup (it might take a while).
|
||||||
|
|
||||||
rpm: check-RPM_TOPDIR dist specfile
|
rpm: check-RPM_TOPDIR dist specfile
|
||||||
@echo "Generating the rpm...";
|
@echo "Generating the rpm...";
|
||||||
ifneq ($(RELEASE_DIR),)
|
ifneq ($(RELEASE_DIR),)
|
||||||
|
@ -334,9 +341,19 @@ ifneq ($(RELEASE_DIR),)
|
||||||
else
|
else
|
||||||
@cp ../$(PACKAGE_NAME)-$(VERSION).tar.gz $(RPM_TOPDIR)/SOURCES/;
|
@cp ../$(PACKAGE_NAME)-$(VERSION).tar.gz $(RPM_TOPDIR)/SOURCES/;
|
||||||
endif
|
endif
|
||||||
cp $(SPEC_FILE) $(RPM_TOPDIR)/SPECS/; \
|
@cp $(SPEC_FILE) $(RPM_TOPDIR)/SPECS/; \
|
||||||
cd $(RPM_TOPDIR)/SPECS/; \
|
cd $(RPM_TOPDIR)/SPECS/; \
|
||||||
rpm -ba $(SPEC_FILE)
|
if which rpmbuild > /dev/null 2>/dev/null; then \
|
||||||
|
rpmbuild="rpmbuild"; \
|
||||||
|
else \
|
||||||
|
if which rpm > /dev/null 2>/dev/null; then \
|
||||||
|
rpmbuild="rpm"; \
|
||||||
|
else \
|
||||||
|
echo "Error: You don't have rpm installed!"; \
|
||||||
|
rpmbuild="rpmbuild"; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
$${rpmbuild} -ba $(SPEC_FILE)
|
||||||
|
|
||||||
ifneq ($(PACKAGE_NAME),)
|
ifneq ($(PACKAGE_NAME),)
|
||||||
internal-distclean::
|
internal-distclean::
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue