summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/opkbuild.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index 6efa969..1c5a497 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -234,4 +234,30 @@ ${OB_HOST_ARCH}
EOF
}
+build_source()
+{
+ src="$(ob_get_source_parameter 'Source')"
+ ver="$(ob_get_source_parameter 'Version')"
+ src_pkg_data_base="src:${src}.data/usr/src/${src}_${ver}"
+
+ "${opt_uid0_cmd}" mkdir -p \
+ "${src_pkg_data_base}" || \
+ ob_error "$(ob_get_msg 'cant_make_src_pkg_dir')"
+
+ for file in ../*; do
+ case "${file}" in
+ ../tmp)
+ ;;
+ ../*)
+ "${opt_uid0_cmd}" cp -R "${file}" "${src_pkg_data_base}" || \
+ ob_error "$(ob_get_msg 'cant_install_src_pkg_file')"
+ ;;
+ esac
+ done
+
+ # TODO: gencontrol, buildopk.
+
+ rm -Rf "src:${src}.data" || ob_error "$(ob_get_msg 'cant_rm_src_pkg_data')"
+}
+
main "${@}"