diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-10-07 09:05:01 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-10-07 09:05:01 (EDT) |
commit | 90f7528ca50875d053864b640d9dca56475e0d51 (patch) | |
tree | 276f611a166e2ab60cb24df62db39379dca71f3c | |
parent | 76862260820759798118e871a42b9e581b0ed89f (diff) |
cmd/build: Update builddeps.opk generation
-rw-r--r-- | lib/cmd/build.sh | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/lib/cmd/build.sh b/lib/cmd/build.sh index 1d96a68..317ce5a 100644 --- a/lib/cmd/build.sh +++ b/lib/cmd/build.sh @@ -85,10 +85,7 @@ cmd_build_main() build_deps="$(package_get_build_deps "${arch}" "${plat}")" if [ "x${build_deps}" != 'x' ]; then - mkdir -p "${root}${session_dir}/builddeps/control" \ - "${root}${session_dir}/builddeps/data" - cmd_build_make_deps_pkg "${root}${session_dir}" "$(session_id)" \ - "${build_deps}" + cmd_build_make_deps_pkg "${root}" "${build_deps}" fi session_exec sh <<-EOF @@ -113,13 +110,15 @@ cmd_build_main() cmd_build_make_deps_pkg() { - local build_dir="${1}" - local build_id="${2}" - local build_deps="${3}" + local root="${1}" + local build_deps="${2}" + local pkg_dir= - printf '2.0\n' >"${build_dir}/builddeps/debian-binary" - cat >"${build_dir}/builddeps/control/control" <<-EOF - Package: prokit-builddeps-${build_id} + pkg_dir="${root}$(session_dir)/builddeps" + mkdir -p "${pkg_dir}/control" "${pkg_dir}/data" + printf '2.0\n' >"${pkg_dir}/debian-binary" + cat >"${pkg_dir}/control/control" <<-EOF + Package: prokit-builddeps-$(session_id) Source: prokit Version: 1.0 Architecture: all @@ -127,9 +126,9 @@ cmd_build_make_deps_pkg() Depends: ${build_deps} Description: Build dependencies metapackage generated by prokit EOF - (cd "${build_dir}/builddeps/data"; tar -czf ../data.tar.gz .) - (cd "${build_dir}/builddeps/control"; tar -czf ../control.tar.gz .) - (cd "${build_dir}/builddeps"; tar -czf ../builddeps.opk \ + (cd "${pkg_dir}/data"; tar -czf ../data.tar.gz .) + (cd "${pkg_dir}/control"; tar -czf ../control.tar.gz .) + (cd "${pkg_dir}"; tar -czf ../builddeps.opk \ 'debian-binary' 'data.tar.gz' 'control.tar.gz') - rm -Rf "${build_dir}/builddeps" + rm -Rf "${pkg_dir}" } |