From 29760e018d88db97e829ce058286450ecfb3a4f651583155a456582ea90e8725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Thu, 19 May 2016 12:15:30 +0000 Subject: [PATCH] Accepting request 396769 from home:dimstar:lang OBS-URL: https://build.opensuse.org/request/show/396769 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=372 --- rpm-findlang-inject-metainfo.patch | 66 ++++++++++++++++++++++++++++++ rpm.changes | 8 ++++ rpm.spec | 2 + 3 files changed, 76 insertions(+) create mode 100644 rpm-findlang-inject-metainfo.patch diff --git a/rpm-findlang-inject-metainfo.patch b/rpm-findlang-inject-metainfo.patch new file mode 100644 index 0000000..f5a2a7a --- /dev/null +++ b/rpm-findlang-inject-metainfo.patch @@ -0,0 +1,66 @@ +Index: scripts/find-lang.sh +=================================================================== +--- scripts/find-lang.sh.orig ++++ scripts/find-lang.sh +@@ -11,6 +11,8 @@ + #in tact and are included with any redistribution of this file or any + #work based on this file. + ++# 2016-05-19 Dominique Leuenberger ++# * Add support to create a metainfo.xml for -lang packages + # 2004-06-20 Arkadiusz Miƛkiewicz + # * merge PLD changes, kde, all-name (mkochano,pascalek@PLD) + # 1999-10-19 Artur Frysiak +@@ -37,6 +39,7 @@ Additional options: + --with-man find localized man pages + --all-name match all package/domain names + --without-mo do not find locale files ++ --metainfo create a metainfo.xml file for AppStream + EOF + exit 1 + } +@@ -66,6 +69,7 @@ ALL_NAME=# + NO_ALL_NAME= + ONLY_C=# + NO_C=# ++METAINFO=0 + + while test $# -gt 0 ; do + case "${1}" in +@@ -114,6 +118,11 @@ while test $# -gt 0 ; do + NO_C= + shift + ;; ++ --metainfo ) ++ METAINFO=1 ++ METADESKID=${2} ++ shift 2 ++ ;; + * ) + MO_NAME=${1} + shift +@@ -278,6 +287,24 @@ if ! grep -q / $MO_NAME_NEW; then + exit 1 + fi + ++if [ "${METAINFO}" -gt 0 ]; then ++ # create a metainfo.xml file for METADESKID ++ mkdir -p ${TOP_DIR}/usr/share/appdata ++ cat > ${TOP_DIR}/usr/share/appdata/${METADESKID}-lang.metainfo.xml < ++ ++ ++ ${METADESKID}-lang ++ ${METADESKID}.desktop ++ Translations ++ Translate the user interface ++ CC0-1.0 ++ https://bugzilla.opensuse.org ++ ++EOF ++ echo /usr/share/appdata/${METADESKID}-lang.metainfo.xml >> $MO_NAME_NEW ++fi ++ + sort -u $MO_NAME_NEW >> $MO_NAME + rm -f $MO_NAME_NEW + diff --git a/rpm.changes b/rpm.changes index ceb794d..2a16657 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu May 19 10:44:52 UTC 2016 - dimstar@opensuse.org + +- Add rpm-findlang-inject-metainfo.patch: allow packagers to inject + a metainfo.xml file for the -lang package, which can then serve + AppStream based Software Centers to show -lang packages as + extensions to applications (boo#980583). + ------------------------------------------------------------------- Mon May 2 13:50:24 CEST 2016 - mls@suse.de diff --git a/rpm.spec b/rpm.spec index 71f6c55..05948f3 100644 --- a/rpm.spec +++ b/rpm.spec @@ -135,6 +135,7 @@ Patch96: modalias-no-kgraft.diff Patch97: rpm-4.12.0.1-lua-5.3.patch Patch98: normalize_blocksize.diff Patch99: enable-postin-scripts-error.diff +Patch100: rpm-findlang-inject-metainfo.patch Patch6464: auto-config-update-aarch64-ppc64le.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # @@ -229,6 +230,7 @@ rm -f rpmdb/db.h %patch -P 70 -P 71 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 %patch -P 85 %patch -P 92 -P 93 -P 94 -P 95 -P 96 -P 97 -P 98 -P 99 +%patch -P 100 %ifarch aarch64 ppc64le %patch6464