From 7731c7323c8f9602653dbd14c9619bb203060b37 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 16 Oct 2012 13:29:50 -0400 Subject: Don't hardcode the host arch in ob-buildopk. --- (limited to 'src') diff --git a/src/ob-buildopk.sh b/src/ob-buildopk.sh index 74935b0..6f57c50 100644 --- a/src/ob-buildopk.sh +++ b/src/ob-buildopk.sh @@ -34,10 +34,12 @@ main() echo '2.0' >'debian-binary' if [ -n "${OB_DO_SOURCE}" ]; then - build_opk "src-${OPK_SOURCE}" "${OPK_SOURCE_VERSION}" + build_opk "src-${OPK_SOURCE}" "${OPK_SOURCE_VERSION}" 'src' else for pkg in ${OPK_PACKAGES}; do - build_opk "${pkg}" "${OPK_BINARY_VERSION}" + arch="$(ob_get_binary_parameter "${pkg}" 'Architecture')" + [ "${arch}" != 'all' ] && arch="${OPK_HOST_ARCH}" + build_opk "${pkg}" "${OPK_BINARY_VERSION}" "${arch}" done fi rm 'debian-binary' @@ -47,11 +49,12 @@ build_opk() { binary="${1}" version="${2}" + arch="${3}" (cd "${binary}.data" && tar -czf '../data.tar.gz' '.') (cd "${binary}.control" && tar -czf '../control.tar.gz' '.') - tar -czf "../../${binary}_${version}_all.opk" \ + tar -czf "../../${binary}_${version}_${arch}.opk" \ 'debian-binary' 'data.tar.gz' 'control.tar.gz' rm -Rf 'data.tar.gz' 'control.tar.gz' } -- cgit v0.9.1