diff options
-rw-r--r-- | locale/en_US.sh | 4 | ||||
-rw-r--r-- | src/opkbuild.sh | 25 |
2 files changed, 28 insertions, 1 deletions
diff --git a/locale/en_US.sh b/locale/en_US.sh index 479c65f..392aca0 100644 --- a/locale/en_US.sh +++ b/locale/en_US.sh @@ -64,6 +64,10 @@ oh_str_no_config='No "config" file found' oh_str_no_copyright='No "copyright" file found' oh_str_no_changelog='No "changelog" file found' oh_str_bad_source_version='Invalid source package version identifier "%s"' +oh_str_installing_src_pkg_files='Installing files for source package...' +oh_str_cant_make_src_pkg_dir='Can'\''t make data directory for source package' +oh_str_cant_install_src_pkg_file='Can'\''t install source package file' +oh_str_cant_rm_src_pkg_data='Can'\''t clean up data directory for source package' oh_str_build_arch_stat_header='Build system:' oh_str_arch_stat_arch=' Architecture: %s' oh_str_arch_stat_plat=' Platform: %s' 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() |