- add application_provides.diff and appdata_provides.diff to
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=297
This commit is contained in:
parent
d3791d0083
commit
99be781ae6
66
appdata_provides.diff
Normal file
66
appdata_provides.diff
Normal file
@ -0,0 +1,66 @@
|
||||
From fd6498712cdda8ecd9f1d89462300164dbe563bc Mon Sep 17 00:00:00 2001
|
||||
From: Michael Schroeder <mls@suse.de>
|
||||
Date: Wed, 2 Oct 2013 15:11:33 +0200
|
||||
Subject: [PATCH 3/3] Add support for automatic appdata() provides
|
||||
|
||||
Appdata files contain application information used by the AppStream
|
||||
project. We generate two provides: appdata() to support enumeration
|
||||
of all application packages and appdata(filenname) to make it easy
|
||||
to link installed packages with appdata files.
|
||||
---
|
||||
fileattrs/Makefile.am | 5 +++--
|
||||
fileattrs/appdata.attr | 2 ++
|
||||
scripts/Makefile.am | 2 +-
|
||||
scripts/appdata.prov | 18 ++++++++++++++++++
|
||||
4 files changed, 24 insertions(+), 3 deletions(-)
|
||||
create mode 100644 fileattrs/appdata.attr
|
||||
create mode 100755 scripts/appdata.prov
|
||||
|
||||
--- ./fileattrs/Makefile.am.orig 2013-10-02 16:21:01.966355169 +0000
|
||||
+++ ./fileattrs/Makefile.am 2013-10-02 16:19:10.317355367 +0000
|
||||
@@ -7,6 +7,7 @@ fattrsdir = $(rpmconfigdir)/fileattrs
|
||||
fattrs_DATA = \
|
||||
desktop.attr elf.attr font.attr libtool.attr perl.attr perllib.attr \
|
||||
pkgconfig.attr python.attr ocaml.attr script.attr mono.attr \
|
||||
- debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr
|
||||
+ debuginfo.attr elflib.attr firmware.attr ksyms.attr sysvinit.attr \
|
||||
+ appdata.attr
|
||||
|
||||
EXTRA_DIST = $(fattrs_DATA)
|
||||
--- ./fileattrs/appdata.attr.orig 2013-10-02 16:18:42.750355416 +0000
|
||||
+++ ./fileattrs/appdata.attr 2013-10-02 16:18:42.750355416 +0000
|
||||
@@ -0,0 +1,2 @@
|
||||
+%__appdata_provides %{_rpmconfigdir}/appdata.prov
|
||||
+%__appdata_path ^%{_datadir}/appdata/.*\\.appdata\\.xml$
|
||||
--- ./scripts/Makefile.am.orig 2013-10-02 16:18:21.679355453 +0000
|
||||
+++ ./scripts/Makefile.am 2013-10-02 16:18:42.750355416 +0000
|
||||
@@ -19,7 +19,7 @@ EXTRA_DIST = \
|
||||
find-php-provides find-php-requires \
|
||||
mono-find-requires mono-find-provides \
|
||||
ocaml-find-requires.sh ocaml-find-provides.sh \
|
||||
- pkgconfigdeps.sh libtooldeps.sh \
|
||||
+ pkgconfigdeps.sh libtooldeps.sh appdata.prov \
|
||||
fontconfig.prov desktop-file.prov script.req \
|
||||
sysvinitdeps.sh \
|
||||
macros.perl macros.php macros.python
|
||||
--- ./scripts/appdata.prov.orig 2013-10-02 16:18:42.750355416 +0000
|
||||
+++ ./scripts/appdata.prov 2013-10-02 16:18:42.750355416 +0000
|
||||
@@ -0,0 +1,18 @@
|
||||
+#!/bin/sh
|
||||
+#
|
||||
+# Transform appdata xml file into RPM appdata(filename) provides
|
||||
+#
|
||||
+# Author: Michael Schroeder <mls@suse.de>
|
||||
+# Based on other provides scripts from RPM
|
||||
+
|
||||
+OLD_IFS="$IFS"
|
||||
+while read instfile ; do
|
||||
+ case "$instfile" in
|
||||
+ *.appdata.xml)
|
||||
+ echo "appdata()"
|
||||
+ echo "appdata(${instfile##*/appdata/})"
|
||||
+ ;;
|
||||
+ esac
|
||||
+done
|
||||
+IFS=$OLD_IFS
|
||||
+
|
32
application_provides.diff
Normal file
32
application_provides.diff
Normal file
@ -0,0 +1,32 @@
|
||||
From 56699101dec027590cca137a5d268fbc88799121 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Schroeder <mls@suse.de>
|
||||
Date: Wed, 2 Oct 2013 15:02:18 +0200
|
||||
Subject: [PATCH 2/3] Add application() and application(filename) provides for
|
||||
desktop files.
|
||||
|
||||
Gnome software center needs to know what package to deinstall if it
|
||||
needs to deinstall a desktop application. Looking up provides it much
|
||||
cheaper than looking up which package owns a file.
|
||||
|
||||
We also add an empty application() provides to make it easy to
|
||||
enumerate all packages containing desktop applications.
|
||||
---
|
||||
scripts/desktop-file.prov | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git scripts/desktop-file.prov scripts/desktop-file.prov
|
||||
index 5b159ae..aa20277 100755
|
||||
--- scripts/desktop-file.prov
|
||||
+++ scripts/desktop-file.prov
|
||||
@@ -9,6 +9,8 @@ OLD_IFS="$IFS"
|
||||
while read instfile ; do
|
||||
case "$instfile" in
|
||||
*.desktop)
|
||||
+ echo "application()"
|
||||
+ echo "application(${instfile##*/applications/})"
|
||||
if ! grep -q '^Type=Application$' "$instfile"; then continue; fi
|
||||
if ! grep -q '^Exec=' "$instfile"; then continue; fi
|
||||
mime=`grep '^MimeType=' "$instfile" | cut -d'=' -f2`
|
||||
--
|
||||
1.8.1.4
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 2 18:24:42 CEST 2013 - mls@suse.de
|
||||
|
||||
- add application_provides.diff and appdata_provides.diff to
|
||||
generate provides for .desktop files
|
||||
(both patches are sent to upstream)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 27 15:13:45 CEST 2013 - mls@suse.de
|
||||
|
||||
|
6
rpm.spec
6
rpm.spec
@ -140,6 +140,8 @@ Patch85: brp-compress-no-img.patch
|
||||
Patch86: strpoolrehash.diff
|
||||
Patch87: ignore_poolstr_dummy_entries.diff
|
||||
Patch88: selfconflicts.diff
|
||||
Patch89: application_provides.diff
|
||||
Patch90: appdata_provides.diff
|
||||
Patch6464: auto-config-update-aarch64.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
#
|
||||
@ -226,7 +228,8 @@ rm -f rpmdb/db.h
|
||||
%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59
|
||||
%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
|
||||
%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79
|
||||
%patch -P 80 -P 81 -P 82 -P 83 -P 84 -P 85 -P 86 -P 87 -P 88
|
||||
%patch -P 80 -P 81 -P 82 -P 83 -P 84 -P 85 -P 86 -P 87 -P 88 -P 89
|
||||
%patch -P 90
|
||||
%ifarch aarch64
|
||||
%patch6464
|
||||
%endif
|
||||
@ -326,6 +329,7 @@ install -m 755 %{SOURCE6} %{buildroot}/usr/lib/rpm
|
||||
install -m 755 scripts/find-supplements{,.ksyms} %{buildroot}/usr/lib/rpm
|
||||
install -m 755 scripts/firmware.prov %{buildroot}/usr/lib/rpm
|
||||
install -m 755 scripts/debuginfo.prov %{buildroot}/usr/lib/rpm
|
||||
install -m 755 scripts/appdata.prov %{buildroot}/usr/lib/rpm
|
||||
rm -f %{buildroot}/usr/lib/locale %{buildroot}/usr/lib/rpmrc
|
||||
mkdir -p %{buildroot}/etc/rpm
|
||||
chmod 755 %{buildroot}/etc/rpm
|
||||
|
Loading…
Reference in New Issue
Block a user