From 843cbfd07b00b76fbe4429902ec5707d4ac74f01 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Wed, 5 Apr 2023 16:14:07 +0100 Subject: [PATCH] Move make-archive.sh commands back into the Makefile.common --- Makefile.common | 18 +++++++++++++++++- make-archive.sh | 3 ++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Makefile.common b/Makefile.common index ffe0311..c1702a8 100644 --- a/Makefile.common +++ b/Makefile.common @@ -344,7 +344,23 @@ endif # Create the .tar.gz or whatever file $(ARCHIVEFILE): - $(shell $(COMMON_DIR)/make-archive.sh) + $(info "${NAME} $(ARCHIVEFILE) $(TREEPATH)") + $(info "Making archive file ${ARCHIVEFILE}") + echo -e "\nBuilding for SME package" ;\ + echo -e "\nMaking archive ${ARCHIVEFILE}" ;\ + TEMPDIR=`mktemp -d` ;\ + mkdir -p ${TEMPDIR}/${TREEPATH} ;\ + cp -r root ${TEMPDIR}/${TREEPATH} ;\ + if [[ -f createlinks ]] ; then cp createlinks ${TEMPDIR}/${TREEPATH} ; fi ;\ + if [[ -f COPYING ]] ; then cp COPYING ${TEMPDIR}/${TREEPATH} ; fi ;\ + if test -f LICENSE ; then cp LICENSE ${TEMPDIR}/${TREEPATH} ; fi ;\ + if test -f Copying ; then cp Copying ${TEMPDIR}/${TREEPATH} ; fi ;\ + if test -f Artistic ; then cp Artistic ${TEMPDIR}/${TREEPATH} ; fi ;\ + if test -f *.c ; then cp *.c ${TEMPDIR}/${TREEPATH}; fi ;\ + rm -f ${ARCHIVEFILE} ;\ + tar -czf ${ARCHIVEFILE} -C ${TEMPDIR} ${TREEPATH} ;\ + ls -l ${ARCHIVEFILE} ;\ + find ${TEMPDIR} -delete; test-srpm: srpm diff --git a/make-archive.sh b/make-archive.sh index 65ce9a0..b2da4a7 100755 --- a/make-archive.sh +++ b/make-archive.sh @@ -34,4 +34,5 @@ else \ else \ echo "Found 3rd party ${ARCHIVEFILE}"; \ fi ; \ -fi \ No newline at end of file +fi +exit 0 \ No newline at end of file