summaryrefslogtreecommitdiffstats
path: root/src/opkbuild.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/opkbuild.sh')
-rw-r--r--src/opkbuild.sh25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index 80921c1..ee89e47 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -246,7 +246,30 @@ setup_package()
build_source()
{
- # TODO: Build source package.
+ oh_info "${oh_str_installing_src_pkg_files}"
+
+ src_pkg_data_base="src:${OH_SOURCE}.data/usr/src"
+ src_pkg_data_base="${src_pkg_data_base}/${OH_SOURCE}_${OH_SOURCE_VERSION}"
+
+ "${OPT_UID0_CMD}" mkdir -p \
+ "${src_pkg_data_base}" || \
+ oh_error "${oh_str_cant_make_src_pkg_dir}"
+
+ for file in ../*; do
+ case "${file}" in
+ ../tmp)
+ ;;
+ ../*)
+ "${OPT_UID0_CMD}" cp -R "${file}" "${src_pkg_data_base}" || \
+ oh_error "${oh_str_cant_install_src_pkg_file}"
+ ;;
+ esac
+ done
+
+ # TODO: oh-gencontrol
+ # TODO: oh-buildopk
+
+ rm -Rf "src:${OH_SOURCE}.data" || oh_error "${oh_str_cant_rm_src_pkg_data}"
}
setup_build()