diff options
-rw-r--r-- | locale/en_US/opkbuild.sh | 3 | ||||
-rw-r--r-- | src/opkbuild.sh | 26 |
2 files changed, 29 insertions, 0 deletions
diff --git a/locale/en_US/opkbuild.sh b/locale/en_US/opkbuild.sh index 4ea2c68..afe17a0 100644 --- a/locale/en_US/opkbuild.sh +++ b/locale/en_US/opkbuild.sh @@ -54,3 +54,6 @@ msg_opkbuild_setup_arch_plat='Detecting architecture and platform...' msg_opkbuild_make_work_area='Making work area...' msg_opkbuild_parse_package_metadata='Parsing package metadata...' msg_opkbuild_build_source='Building source package...' +msg_opkbuild_cant_make_src_pkg_dir='Can'\''t make data directory for source package' +msg_opkbuild_cant_install_src_pkg_file='Can'\''t install source package file' +msg_opkbuild_cant_rm_src_pkg_data='Can'\''t clean up data directory for source package' 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 "${@}" |