summaryrefslogtreecommitdiffstats
path: root/src/opkbuild.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/opkbuild.sh')
-rw-r--r--src/opkbuild.sh53
1 files changed, 1 insertions, 52 deletions
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index 54a22f3..94bc6c7 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -343,58 +343,7 @@ step_unpack()
{
oh_cv_set step unpack
- # TODO: Put this in oh-unpacksource.
- if [ -d ../src ]; then
- oh_info "${oh_str_unpacking_native}"
- cp -Rp ../src src || oh_error "${oh_str_cant_unpack_native}"
- else
- archive_base_name="${OH_SOURCE}-${OH_SOURCE_VERSION_UPSTREAM}.orig.tar."
- archive_matches=$(find .. -name "${archive_base_name}*")
- case "$(echo "${archive_matches}" | wc -l)" in
- 0)
- oh_error "${oh_str_no_sources}"
- ;;
- 1)
- ;;
- *)
- oh_error "${oh_str_multiple_upstream_sources}"
- ;;
- esac
- z_ext="${archive_matches#../${archive_base_name}}"
- case ${z_ext} in
- gz)
- z=z
- ;;
- bz2)
- z=j
- ;;
- lz)
- z=a
- ;;
- Z)
- z=Z
- ;;
- *)
- oh_error "${oh_str_unsupported_archive_compression}" "${z_ext}"
- ;;
- esac
- sed 's@^./@@' | grep '^[^/]*/$'
- top_dirs=$(tar "-t${z}f" "${archive_matches}${z_ext}" | \
- sed -n 's@^\./\([^/]*\)$@\1@p')
- case "$(echo "${top_dirs}" | wc -l)" in
- 0)
- oh_error "${oh_str_no_upstream_dirs}"
- ;;
- 1)
- ;;
- *)
- oh_error "${oh_str_multiple_top_upstream_dirs}"
- esac
- oh_info "${oh_str_unpacking_upstream}"
- tar "-x${z}f" "${archive_matches}${z_ext}" || \
- oh_error "${oh_str_cant_unpack_upstream}"
- mv "${top_dirs}" src || oh_error "${oh_str_cant_move_native}"
- fi
+ oh-unpacksource
step_patch
}