rpm build: Make the RPM build directory configurable

Signed-off-by: Daniel Ahlin <dah@pdc.kth.se>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8658 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-11-16 04:22:03 +00:00
parent 9d8b4ee467
commit d5c638ca1d
2 changed files with 8 additions and 6 deletions
+4 -4
View File
@@ -60,6 +60,8 @@ REVISION ?= $(shell if [ -e .svn ]; then \
fi)
VERSION := $(shell echo -n "$$(sed -n 's/^\#define[[:blank:]]SCST_VERSION_NAME[[:blank:]]*\"\([^-]*\).*\"/\1/p' scst/include/scst_const.h)$(REVISION)")
DEBIAN_REVISION=1
RPMTOPDIR ?= $(shell if [ $$(id -u) = 0 ]; then echo /usr/src/packages;\
else echo $$PWD/rpmbuilddir; fi)
help:
@echo " all : make all"
@@ -397,8 +399,7 @@ scst-dist-gzip:
scst-rpm:
name=scst && \
rpmtopdir="$$(if [ $$(id -u) = 0 ]; then echo /usr/src/packages;\
else echo $$PWD/rpmbuilddir; fi)" && \
rpmtopdir=$(RPMTOPDIR) && \
$(MAKE) scst-dist-gzip && \
for d in BUILD RPMS SOURCES SPECS SRPMS; do \
mkdir -p $${rpmtopdir}/$$d; \
@@ -415,8 +416,7 @@ scst-rpm:
scst-dkms-rpm:
name=scst-dkms && \
rpmtopdir="$$(if [ $$(id -u) = 0 ]; then echo /usr/src/packages;\
else echo $$PWD/rpmbuilddir; fi)" && \
rpmtopdir=$(RPMTOPDIR) && \
$(MAKE) scst-dist-gzip && \
for d in BUILD RPMS SOURCES SPECS SRPMS; do \
mkdir -p $${rpmtopdir}/$$d; \
+4 -2
View File
@@ -67,6 +67,9 @@ DEFAULTDIR := $(shell if [ -f /etc/gentoo-release ]; then \
echo /etc/default; \
fi)
RPMTOPDIR ?= $(shell if [ $$(id -u) = 0 ]; then echo /usr/src/packages;\
else echo $$PWD/rpmbuilddir; fi)
all:
cd $(SCSTADMIN_DIR) && $(MAKE) $@
@@ -139,8 +142,7 @@ dist-gzip:
rpm:
name=$(shell basename $$PWD) && \
rpmtopdir="$$(if [ $$(id -u) = 0 ]; then echo /usr/src/packages;\
else echo $$PWD/rpmbuilddir; fi)" && \
rpmtopdir=$(RPMTOPDIR) && \
$(MAKE) dist-gzip && \
for d in BUILD RPMS SOURCES SPECS SRPMS; do \
mkdir -p $${rpmtopdir}/$$d; \