Signed-off-by: David Scott <dave.scott@eu.citrix.com>
$(MY_SOURCES)/MANIFEST: $(MY_SOURCES_DIRSTAMP)
rm -f $@
- @for srpm in "$(/bin/ls -1 ${MY_OUTPUT_DIR}/SRPMS)"; do \
- path=$(MY_OUTPUT_DIR)/SRPMS/${srpm}; \
- echo "$(${RPM} --qf "%{name}" -qp ${path}) $(${RPM} --qf "%{License}" -qp ${path}) ${path}" >>$@; \
- done
+ /bin/sh ./srpms-to-manifest api-libs $(MY_OUTPUT_DIR)/SRPMS > $@
.PHONY: clean
rm -f *.rpm
--- /dev/null
+#!/bin/bash
+
+# take a component and a directory as arguments, write to stdout a
+# MANIFEST file fragment
+if [ -z "${RPM}" ]; then
+ RPM=/bin/rpm
+fi
+
+component=$1
+dir=$2
+for path in $(/bin/ls -1 $2/*.src.rpm); do
+ name=$(${RPM} --qf "%{name}" -qp ${path})
+ license=$(${RPM} --qf "%{License}" -qp ${path})
+ license=$(echo ${license} | /bin/sed -e 's/\s/_/g')
+ echo "${component} ${license} file ${path}"
+done