2023-03-22 18:53:46 +01:00
|
|
|
#!/bin/sh
|
2023-03-23 14:18:18 +01:00
|
|
|
#
|
|
|
|
# Make the archivefile for Make mockbuild
|
|
|
|
# Called from the arhcivefile rule in common/Makefile.common
|
|
|
|
#
|
|
|
|
NAME=$(basename `pwd`)
|
2023-04-10 20:15:10 +02:00
|
|
|
VER_REL=$(rpm -q --qf "%{VERSION}\n" --specfile ${NAME}.spec | head -n 1)
|
|
|
|
#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 := $(shell cat archivefilename)
|
2023-03-23 14:18:18 +01:00
|
|
|
TREEPATH="$NAME-$VER_REL"
|
|
|
|
echo -e "\n$NAME $ARCHIVEFILE $TREEPATH"
|
|
|
|
echo -e "\nMaking archive file ${ARCHIVEFILE} `pwd`" ; \
|
2023-04-10 20:15:10 +02:00
|
|
|
if [ "${NAME#smeserver}" == "${NAME}" ] || [ "${NAME#e-smith}" == "${NAME}" ] ; then \
|
|
|
|
tar -czf ${ARCHIVEFILE} ${TREEPATH} ;\
|
|
|
|
ls -l ${ARCHIVEFILE} ;
|
2023-03-23 14:18:18 +01:00
|
|
|
else \
|
|
|
|
echo "3rd party package should already be there"; \
|
|
|
|
if [ ! -e "${ARCHIVEFILE}" ] ; then \
|
|
|
|
$(error "Can't find 3rd party archive: ${ARCHIVEFILE} "); \
|
2023-03-22 18:53:46 +01:00
|
|
|
else \
|
2023-03-23 14:18:18 +01:00
|
|
|
echo "Found 3rd party ${ARCHIVEFILE}"; \
|
|
|
|
fi ; \
|
2023-04-05 17:14:07 +02:00
|
|
|
fi
|
|
|
|
exit 0
|