From 992748b794b1c6639b92fe0d18e36c0633a126f9 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 03 Aug 2012 03:58:01 -0400 Subject: Update oh-checkbuilddeps (a no-op for now). --- diff --git a/locale/en_US.sh b/locale/en_US.sh index 833a286..ca37f8b 100644 --- a/locale/en_US.sh +++ b/locale/en_US.sh @@ -103,6 +103,9 @@ oh_str_bad_binary_package_name='Invalid binary package name "%s"' oh_str_cant_make_work_area='Can'\''t make work area' oh_str_cant_enter_work_area='Can'\''t enter work area' +# oh-checkbuilddeps +oh_str_checking_build_deps='Checking build dependencies...' + # oh-unpacksource oh_str_usage_oh_unpacksource='Usage: oh-unpacksource' oh_str_unpacking_native='Copying native source directory...' diff --git a/src/Makefile.in b/src/Makefile.in index 833c796..4eb9618 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -36,6 +36,7 @@ sed_script = s&@@PACKAGE_NAME@@&$(package_name)&;\ .SUFFIXES: .sh SRCS = opkbuild.sh \ + oh-checkbuilddeps.sh \ oh-unpacksource.sh \ oh-applypatches.sh \ oh-copyconfig.sh \ diff --git a/src/oh-checkbuilddeps.sh b/src/oh-checkbuilddeps.sh index aaffda7..80ab9f4 100644 --- a/src/oh-checkbuilddeps.sh +++ b/src/oh-checkbuilddeps.sh @@ -1,4 +1,4 @@ -#!@@SHELL@@ +#!@@SH@@ # # opkhelper # src/oh-checkbuilddeps @@ -19,69 +19,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -. @@LIBDIR@@/opkhelper/controlfields -. @@LIBDIR@@/opkhelper/messages +. @@LIBDIR@@/messages +. @@LIBDIR@@/locale -print_usage() +main() { - printf 'Usage: %s [-s status-override]\n' "${1}" -} - -opts=$(getopt -n "${0}" -o 's:' -- "${@}") -if [ ${?} -ne 0 ]; then - print_usage "${0}" >&2 - exit 1; -fi -eval set -- "${opts}" -while true; do - case "${1}" in - -s) - status_file="${2}" - shift 2 - break - ;; - --) - shift - break - ;; - *) - print_usage "${0}" >&2 - exit 1 - ;; - esac -done -if [ "${1}" = '--' ]; then - shift -fi - -if [ ${#} -ne 0 ]; then - print_usage ${0} >&2 - exit 1 -fi - -oh_info 'Checking build dependencies...' + oh_locale_set -IFS=',' -for dep in $(oh_get_field Build-Depends); do - # XXX: Do all shells split fields in a 'for' construct all at once, or do - # some split only as much as they need each iteration? - unset IFS - - # Strip leading and trailing whitespace. - dep=$(echo ${dep} | sed 's/^ *\(.*\) *$/\1/') - - # Check for the dependency in the package status override file, if provided. - if [ -n "${status_file}" ]; then - grep "${dep}" "${status_file}" > /dev/null - if [ ${?} -eq 0 ]; then - continue; - fi - fi - - # TODO: Test this. - if [ -z "$(opkg status "${dep}" | grep "^Package: ${dep}")" ]; then - oh_error 'Dependency %s not installed' "${dep}" - fi -done + oh_info "${oh_str_checking_build_deps}" +} -unset IFS +main "${@}" -- cgit v0.9.1