diff --git a/set_version b/set_version
index 9fff0c8..e965d47 100755
--- a/set_version
+++ b/set_version
@@ -420,12 +420,18 @@ if __name__ == '__main__':
parser.add_argument('--fromfile',
help='detect version based on the '
'file contents and regex')
+ parser.add_argument('--skip-change-pkgrel',
+ choices=['yes', 'no'], default='no',
+ help='skip the change of the pkgrel variable in PKGBUILD '
+ '(only relevant for Arch builds)')
args = vars(parser.parse_args())
version = args['version']
outdir = args['outdir']
+ skip_change_pkgrel = bool(args['skip_change_pkgrel'] == 'yes')
+
if not outdir:
print("no outdir specified")
sys.exit(-1)
@@ -507,4 +513,5 @@ if __name__ == '__main__':
_replace_tag(filename, "md5sums", "('SKIP')")
_replace_tag(filename, "sha256sums", "('SKIP')")
_replace_tag(filename, "pkgver", version)
- _replace_tag(filename, "pkgrel", "0")
+ if not skip_change_pkgrel:
+ _replace_tag(filename, "pkgrel", "0")
diff --git a/set_version.service b/set_version.service
index 864775a..5cc807e 100644
--- a/set_version.service
+++ b/set_version.service
@@ -19,5 +19,9 @@ Can be used after download_url or tar_scm service.
This regex can be used to autodetect the version from the source dir
inside the source file or the source file directly.
+
+ Skip the change of the pkgrel variable in PKGBUILD (only relevant for Arch builds).
+ yes
+