Move make-archive.sh commands back into the Makefile.common

This commit is contained in:
Brian Read 2023-04-05 16:14:07 +01:00
parent b4769bfcdd
commit 843cbfd07b
2 changed files with 19 additions and 2 deletions

View File

@ -344,7 +344,23 @@ endif
# Create the .tar.gz or whatever file # Create the .tar.gz or whatever file
$(ARCHIVEFILE): $(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 test-srpm: srpm

View File

@ -35,3 +35,4 @@ else \
echo "Found 3rd party ${ARCHIVEFILE}"; \ echo "Found 3rd party ${ARCHIVEFILE}"; \
fi ; \ fi ; \
fi fi
exit 0