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. Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
This commit is contained in:
parent
4775f07b51
commit
e6cadc6d5a
|
@ -5,7 +5,8 @@ include $(top_srcdir)/rpm.am
|
|||
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
|
||||
appdata.attr desktop.attr elf.attr font.attr libtool.attr perl.attr \
|
||||
perllib.attr pkgconfig.attr python.attr ocaml.attr script.attr \
|
||||
mono.attr
|
||||
|
||||
EXTRA_DIST = $(fattrs_DATA)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
%__appdata_provides %{_rpmconfigdir}/appdata.prov
|
||||
%__appdata_path ^%{_datadir}/appdata/.*\\.appdata\\.xml$
|
|
@ -18,7 +18,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 \
|
||||
macros.perl macros.php macros.python
|
||||
|
||||
|
|
|
@ -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
|
||||
|
Loading…
Reference in New Issue