handle new git directory structure
This commit is contained in:
parent
8fc8c268d8
commit
5585b0efa1
@ -88,11 +88,15 @@ RPM_BUILD_DIR ?= $(BUILDDIR)/$(NAME)-$(VERSION)
|
|||||||
|
|
||||||
#needed for archivefile rule
|
#needed for archivefile rule
|
||||||
TREEPATH := $(NAME)-$(VERSION)
|
TREEPATH := $(NAME)-$(VERSION)
|
||||||
|
CODEDIR := "root"
|
||||||
EXT := $(shell cat $(NAME).spec | grep -e '^[S|s]ource' | head -n 1 | sed 's/Source: //' | sed -E 's/^([^.]*\.)(.*)$/\2//')
|
EXT := $(shell cat $(NAME).spec | grep -e '^[S|s]ource' | head -n 1 | sed 's/Source: //' | sed -E 's/^([^.]*\.)(.*)$/\2//')
|
||||||
#ARCHIVEFILE=$(cat ${NAME}.spec | grep -e '^[S|s]ource' | sed -r 's/^[S|s]ource[0-9]?:\s?//' | xargs basename)
|
#ARCHIVEFILE=$(cat ${NAME}.spec | grep -e '^[S|s]ource' | sed -r 's/^[S|s]ource[0-9]?:\s?//' | xargs basename)
|
||||||
#ARCHIVEFILE=$(rpm --queryformat "${ARCHIVEFILE}\n" --specfile ${NAME}.spec | head -n 1)
|
#ARCHIVEFILE=$(rpm --queryformat "${ARCHIVEFILE}\n" --specfile ${NAME}.spec | head -n 1)
|
||||||
ARCHIVEFILE := $(shell cat archivefilename)
|
ifeq (,$(wildcard archivefilename))
|
||||||
|
ARCHIVEFILE := "$(NAME)-$(VERSION).tar.gz"
|
||||||
|
else
|
||||||
|
ARCHIVEFILE := $(cat archivefilename)
|
||||||
|
endif
|
||||||
|
|
||||||
# default target: just make sure we've got the sources
|
# default target: just make sure we've got the sources
|
||||||
all: sources
|
all: sources
|
||||||
@ -345,6 +349,11 @@ endif
|
|||||||
$(ARCHIVEFILE):
|
$(ARCHIVEFILE):
|
||||||
$(info "${NAME} $(ARCHIVEFILE) $(TREEPATH)")
|
$(info "${NAME} $(ARCHIVEFILE) $(TREEPATH)")
|
||||||
$(info "Making archive file ${ARCHIVEFILE}")
|
$(info "Making archive file ${ARCHIVEFILE}")
|
||||||
|
if [ -d ${TREEPATH} ] ; then rm -Rf ${TREEPATH} ; fi ; \
|
||||||
|
mkdir -p ${TREEPATH} ; \
|
||||||
|
if [ -d ${CODEDIR} ] ; then cp -R "${CODEDIR}" "${TREEPATH}/root" ; fi ; \
|
||||||
|
if [ -e createlinks ] ; then cp createlinks "${TREEPATH}/." ; fi ; \
|
||||||
|
if [ -d additional ] ; then cp additional/* "${TREEPATH}/." ; fi ; \
|
||||||
tar -czf ${ARCHIVEFILE} ${TREEPATH} ;\
|
tar -czf ${ARCHIVEFILE} ${TREEPATH} ;\
|
||||||
ls -l ${ARCHIVEFILE} ;
|
ls -l ${ARCHIVEFILE} ;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user