summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-06-17 13:45:55 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-06-17 14:01:22 (EDT)
commitcf09c0ea05db8158d2cd781d0315730fc58162cf (patch)
tree6160762f539e2150ef46a54daaeb9ef9f94772a7 /src
parenta1ae81b8656839e97a21577f5cac6cc5089e032c (diff)
ob-gencontrol: Generate a "Section" field
And add it to SPF 2.x.
Diffstat (limited to 'src')
-rw-r--r--src/ob-gencontrol.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ob-gencontrol.sh b/src/ob-gencontrol.sh
index 471e079..b6d649e 100644
--- a/src/ob-gencontrol.sh
+++ b/src/ob-gencontrol.sh
@@ -119,8 +119,8 @@ gen_control_bin()
local plat="${4}"
local desc="${5}"
shift 5
- local name=
local value=
+ local name=
local homepage=
mkdir -p -- "${binary}.control"
@@ -131,6 +131,14 @@ gen_control_bin()
Version: ${version}
Architecture: ${arch}
Platform: ${plat}
+ EOF
+ value="$(ob_get_binary_parameter "${binary}" 'Section')"
+ if [ -n "${value}" ]; then
+ cat >>"${binary}.control/control" <<-EOF
+ Section: ${value}
+ EOF
+ fi
+ cat >>"${binary}.control/control" <<-EOF
Maintainer: $(ob_get_source_parameter 'Maintainer' | \
tr '\n' ' ')
EOF