From 506d856a942847904f087484dbc3990a60b815c5 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 01 Aug 2012 07:36:51 -0400 Subject: Parse source and binary control files in opkbuild. --- (limited to 'src') diff --git a/src/opkbuild.sh b/src/opkbuild.sh index 6ad194b..3347b7f 100644 --- a/src/opkbuild.sh +++ b/src/opkbuild.sh @@ -22,6 +22,7 @@ . @@LIBDIR@@/messages . @@LIBDIR@@/locale . @@LIBDIR@@/changelog +. @@LIBDIR@@/control # Environment variables: export OH_SOURCE= @@ -85,6 +86,7 @@ main() fi if [ "${OPT_BUILD}" != 'source' ]; then + setup_source_control "${OPT_CHECK_BUILD_DEPS}" && oh-checkbuilddeps setup_build print_arch_stats @@ -258,6 +260,17 @@ build_source() rm -Rf "src:${OH_SOURCE}.data" || oh_error "${oh_str_cant_rm_src_pkg_data}" } +setup_source_control() +{ + oh_control_parse_source + for field in ${OH_CONTROL_SOURCE_FIELDS_REQUIRED} \ + ${OH_CONTROL_SOURCE_FIELDS_OPTIONAL}; do + param="OH_CONTROL_SOURCE_FIELD_$(LC_CTYPE=C \ + tr '[:lower:]-' '[:upper:]_')" + oh_pv_set 'src:.control' "${field}" "$(eval echo \$\{"${param}"\})" + done +} + setup_build() { setup_build_arch @@ -379,6 +392,26 @@ step_config() ./config + step_bincontrol +} + +step_bincontrol() +{ + oh_cv_set step bincontrol + + for pkg in ../*.pkg/; do + pkg="${pkg#../}" + pkg="${pkg%/}" + oh_control_parse_binary "${pkg}" + for field in ${OH_CONTROL_BINARY_FIELDS_REQUIRED} \ + ${OH_CONTROL_BINARY_FIELDS_OPTIONAL}; do + param="OH_CONTROL_BINARY_FIELD_$(LC_CTYPE=C \ + tr '[:lower:]-' '[:upper:]_')" + oh_pv_set "${pkg}.control" \ + "${field}" "$(eval echo \$\{"${param}"\})" + done + done + step_platconf } -- cgit v0.9.1