summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-10-16 13:25:59 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-10-16 13:25:59 (EDT)
commit91361857644a5f518ee5dffea1361157ab0afb21 (patch)
treef4d1c10f08d996bf5045554f61d858314572ef6a
parenta66b1605276b5cce7ee5e1fc2e11d56cfa772a9f (diff)
Make ob-gencontrol write a "Platform" field.
-rw-r--r--src/ob-gencontrol.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ob-gencontrol.sh b/src/ob-gencontrol.sh
index f15347b..0545c21 100644
--- a/src/ob-gencontrol.sh
+++ b/src/ob-gencontrol.sh
@@ -33,14 +33,16 @@ main()
ob_parse_package_metadata -c '.opkbuild.cache'
if [ -n "${OB_DO_SOURCE}" ]; then
- gen_control "src-${OPK_SOURCE}" "${OPK_SOURCE_VERSION}" 'src' \
+ gen_control "src-${OPK_SOURCE}" "${OPK_SOURCE_VERSION}" 'src' 'all' \
"${OPK_SOURCE} source package" 'false'
gen_md5sums "src-${OPK_SOURCE}"
else
for pkg in ${OPK_PACKAGES}; do
arch="$(ob_get_binary_parameter "${pkg}" 'Architecture')"
[ "${arch}" != 'all' ] && arch="${OPK_HOST_ARCH}"
- gen_control "${pkg}" "${OPK_BINARY_VERSION}" "${arch}" \
+ plat="$(ob_get_binary_parameter "${pkg}" 'Platform')"
+ [ "${plat}" != 'all' ] && plat="${OPK_HOST_PLAT}"
+ gen_control "${pkg}" "${OPK_BINARY_VERSION}" "${arch}" "${plat}" \
"$(ob_get_binary_parameter "${pkg}" 'Description')" 'true'
install_maintainer_scripts "${pkg}"
gen_conffiles "${pkg}"
@@ -54,8 +56,9 @@ gen_control()
binary="${1}"
version="${2}"
arch="${3}"
- desc="${4}"
- gen_rel="${5}"
+ plat="${4}"
+ desc="${5}"
+ gen_rel="${6}"
# Calculate installed size.
# Don't use du, since that considers the allocated size of files, symbolic
@@ -92,6 +95,7 @@ Package: ${binary}
Source: ${OPK_SOURCE}
Version: ${version}
Architecture: ${arch}
+Platform: ${plat}
Maintainer: $(ob_get_source_parameter 'Maintainer')
EOF