SHA256
3
0
forked from pool/rpm

Accepting request 396779 from Base:System

(forwarded request 396769 from dimstar)

OBS-URL: https://build.opensuse.org/request/show/396779
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=240
This commit is contained in:
Dominique Leuenberger 2016-05-26 21:52:38 +00:00 committed by Git OBS Bridge
commit 127c2dd4f0
3 changed files with 76 additions and 0 deletions

View File

@ -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 <dimstar@suse.de>
+# * Add support to create a metainfo.xml for -lang packages
# 2004-06-20 Arkadiusz Miśkiewicz <arekm@pld-linux.org>
# * merge PLD changes, kde, all-name (mkochano,pascalek@PLD)
# 1999-10-19 Artur Frysiak <wiget@pld-linux.org>
@@ -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 <<EOF
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2016 openSUSE - file is auto-generated -->
+<component type="addon">
+ <id>${METADESKID}-lang</id>
+ <extends>${METADESKID}.desktop</extends>
+ <name>Translations</name>
+ <summary>Translate the user interface</summary>
+ <metadata_license>CC0-1.0</metadata_license>
+ <updatecontact>https://bugzilla.opensuse.org</updatecontact>
+</component>
+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

View File

@ -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

View File

@ -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