summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/package.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/package.sh b/lib/package.sh
index 27ea8cb..8ed6645 100644
--- a/lib/package.sh
+++ b/lib/package.sh
@@ -18,6 +18,7 @@
# along with opkbuild. If not, see <http://www.gnu.org/licenses/>.
_ob_package_dir=
+_ob_package_format_full=
_ob_package_format=
_ob_binary_packages=
_ob_got_binary_packages=false
@@ -50,8 +51,9 @@ ob_init_package()
_ob_package_dir="$(cd -- "${dir}" && pwd)"
+ _ob_package_format_full="$(cat -- "${_ob_package_dir}/format")"
if [ -r "${_ob_package_dir}/format" ]; then
- case "$(cat -- "${_ob_package_dir}/format")" in
+ case "${_ob_package_format_full}" in
2.0)
_ob_package_format='2'
;;
@@ -184,6 +186,10 @@ ob_get_source_parameter()
EOF
)"
+ case "${name}" in 'FORMAT')
+ printf '%s' "${_ob_package_format_full}"
+ esac
+
# TODO: Return error on no such field?
eval "printf '%s' \"\${_OB_SRCFIELD_${name}-}\""