| |
@@ -276,6 +276,8 @@
|
| |
help="Do initial patching of Cargo.toml")
|
| |
parser.add_argument("-s", "--store-crate", action="store_true",
|
| |
help="Store crate in current directory")
|
| |
+ parser.add_argument("-a", "--rpmautospec", action="store_true", default=False,
|
| |
+ help="Use autorelease and autochangelog features")
|
| |
parser.add_argument("--all-features", action="store_true",
|
| |
help="Activate all available features")
|
| |
parser.add_argument("--dynamic-buildrequires", action="store_true",
|
| |
@@ -339,6 +341,7 @@
|
| |
kwargs["auto_changelog_entry"] = False
|
| |
else:
|
| |
kwargs["auto_changelog_entry"] = True
|
| |
+ kwargs["rpmautospec"] = args.rpmautospec
|
| |
|
| |
if args.target in {"fedora", "mageia", "opensuse"}:
|
| |
kwargs["include_build_requires"] = True
|
| |
@@ -358,6 +361,8 @@
|
| |
kwargs["spec_copyright_year"] = time.strftime("%Y")
|
| |
kwargs["pkg_release"] = "0"
|
| |
kwargs["rust_group"] = "Development/Libraries/Rust"
|
| |
+ elif args.rpmautospec:
|
| |
+ kwargs["pkg_release"] = "%autorelease"
|
| |
else:
|
| |
kwargs["pkg_release"] = "1%{?dist}"
|
| |
|
| |
This PR adds support for optionally generating spec files that use the autorelease and autochangelog features of rpmautospec.
-a
/--rpmautospec
%autorelease
if enabled%autochangelog
used instead of dummy changelog entry if enabledThe output without the
-a
flag should be identical before and after this PR (though I am not really confident about the jinja2 template whitespace stripping modifiers, and mostly find the "correct" solution by trial-and-error ...)