diff options
author | P. J. McDermott <pjm@nac.net> | 2012-10-03 14:26:09 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-10-03 14:26:09 (EDT) |
commit | 6185108fe7f2189602281a06f385a19d6c9fe903 (patch) | |
tree | badf52c8e8c1392c127889498ba5df12b5bf6e82 /src | |
parent | 828e361e758fbaa61d21c749bf8fc3f5750a1dbf (diff) |
Implement build_source() in opkbuild.
Diffstat (limited to 'src')
-rw-r--r-- | src/opkbuild.sh | 26 |
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 "${@}" |