From 6185108fe7f2189602281a06f385a19d6c9fe903 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 03 Oct 2012 14:26:09 -0400 Subject: Implement build_source() in opkbuild. --- (limited to 'src') 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 "${@}" -- cgit v0.9.1