aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bpkg/pkg-bindist.cli9
-rw-r--r--bpkg/system-package-manager-debian.cxx17
2 files changed, 25 insertions, 1 deletions
diff --git a/bpkg/pkg-bindist.cli b/bpkg/pkg-bindist.cli
index c269355..dbbf9c3 100644
--- a/bpkg/pkg-bindist.cli
+++ b/bpkg/pkg-bindist.cli
@@ -104,6 +104,15 @@ namespace bpkg
options, if any, are used as configured."
}
+ strings --debian-maint-option
+ {
+ "<o>",
+ "Alternative options to specify in the \cb{DEB_BUILD_MAINT_OPTIONS}
+ variable of the \cb{rules} file. To specify multiple maintainer options
+ repeat this option and/or specify them as a single value separated
+ with spaces."
+ }
+
strings --debian-build-option
{
"<o>",
diff --git a/bpkg/system-package-manager-debian.cxx b/bpkg/system-package-manager-debian.cxx
index 9350a13..3037730 100644
--- a/bpkg/system-package-manager-debian.cxx
+++ b/bpkg/system-package-manager-debian.cxx
@@ -2708,9 +2708,24 @@ namespace bpkg
// example, they also cover Assembler, Fortran, and potentially others
// in the future).
//
+ string mo; // Include leading space if not empty.
+ if (ops_->debian_maint_option_specified ())
+ {
+ for (const string& o: ops_->debian_maint_option ())
+ {
+ if (!o.empty ())
+ {
+ mo += ' ';
+ mo += o;
+ }
+ }
+ }
+ else
+ mo = " hardening=+all";
+
os << "# *FLAGS (CFLAGS, CXXFLAGS, etc)" << '\n'
<< "#" << '\n'
- << "export DEB_BUILD_MAINT_OPTIONS := hardening=+all" << '\n'
+ << "export DEB_BUILD_MAINT_OPTIONS :=" << mo << '\n'
<< "include /usr/share/dpkg/buildflags.mk" << '\n'
<< '\n';