diff options
Diffstat (limited to 'meta/recipes-support/gnupg/drop-unknown-suffix.inc')
| -rw-r--r-- | meta/recipes-support/gnupg/drop-unknown-suffix.inc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-support/gnupg/drop-unknown-suffix.inc b/meta/recipes-support/gnupg/drop-unknown-suffix.inc new file mode 100644 index 0000000000..dc8f31869c --- /dev/null +++ b/meta/recipes-support/gnupg/drop-unknown-suffix.inc | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | # | ||
| 2 | # Copyright OpenEmbedded Contributors | ||
| 3 | # | ||
| 4 | # SPDX-License-Identifier: MIT | ||
| 5 | # | ||
| 6 | |||
| 7 | # | ||
| 8 | # This .inc file is used to remove unknown suffix in runtime version | ||
| 9 | # for gnupg and its related packages. | ||
| 10 | # | ||
| 11 | # In these packages, if autogen.sh is run outside of a git repo, | ||
| 12 | # the find-version function always assumes that the package is a | ||
| 13 | # beta version and adds the suffix '-unknown' to the version number. | ||
| 14 | # | ||
| 15 | # This .inc file modifies autogen.sh to: | ||
| 16 | # 1. Replace beta=yes with beta=no | ||
| 17 | # 2. Replace tmp="-unknown" with tmp="" | ||
| 18 | # | ||
| 19 | |||
| 20 | do_configure:prepend() { | ||
| 21 | if [ -f ${S}/autogen.sh ]; then | ||
| 22 | sed -i \ | ||
| 23 | -e 's/^\([[:space:]]*\)beta=yes$/\1beta=no/' \ | ||
| 24 | -e 's/^\([[:space:]]*\)tmp="-unknown"$/\1tmp=""/' \ | ||
| 25 | ${S}/autogen.sh | ||
| 26 | else | ||
| 27 | bbwarn "autogen.sh not found in ${S}." | ||
| 28 | fi | ||
| 29 | } | ||
