- Preparations on the way to get AppStream metadata produced in a

more conform way.
- Add new subpackages:
  + openSUSE-appstream-extras:
    - Contains additional appstream metadata to assist upstreams
      not yet shipping their own .appdata.xml file.
  + openSUSE-appstream-process:
    - The processor is an attempt to be used by kiwi to produce
      valid appstream metadata.

- Update InstallAppdata.sh: the yast2 metadata structure got a
  slight change with the switch to appstream-builder.

OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libzypp-plugin-appdata?expand=0&rev=4
This commit is contained in:
Dominique Leuenberger 2015-01-23 13:54:24 +00:00 committed by Git OBS Bridge
parent 6a0cceb4b7
commit 4000c790ce
6 changed files with 102 additions and 4 deletions

View File

@ -38,7 +38,7 @@ while ([ "$1" = "-R" ]); do
appstream-util install-origin "$2" $6$RPMMD/*appdata.xml.gz $6$RPMMD/*app-icons.tar.gz 2>&1 > /dev/null
;;
yast2)
appstream-util install-origin "$2" "$6$YAST2/appdata.xml.gz" "$6$YAST2/app-icons.tar.gz" 2>&1 > /dev/null
appstream-util install-origin "$2" "$6$YAST2/appdata.xml.gz" "$6$YAST2/appdata-icons.tar.gz" 2>&1 > /dev/null
;;
*)
echo "unknown repo type - Appstream data not considered"

11
_service Normal file
View File

@ -0,0 +1,11 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="url">https://github.com/DimStar77/openSUSE-appstream.git</param>
<param name="scm">git</param>
<param name="versionformat">1.0</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
</services>

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Fri Jan 23 12:50:11 UTC 2015 - opensuse-packaging@opensuse.org
- Preparations on the way to get AppStream metadata produced in a
more conform way.
- Add new subpackages:
+ openSUSE-appstream-extras:
- Contains additional appstream metadata to assist upstreams
not yet shipping their own .appdata.xml file.
+ openSUSE-appstream-process:
- The processor is an attempt to be used by kiwi to produce
valid appstream metadata.
-------------------------------------------------------------------
Wed Jan 21 17:53:41 UTC 2015 - dimstar@opensuse.org
- Update InstallAppdata.sh: the yast2 metadata structure got a
slight change with the switch to appstream-builder.
-------------------------------------------------------------------
Wed Nov 5 15:49:01 UTC 2014 - dimstar@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package gnome-software
# spec file for package libzypp-plugin-appdata
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -24,7 +24,9 @@ Summary: Extend libzypp to handle AppStream metadata
License: MIT
Group: System/Libraries
Url: https://wiki.gnome.org/Design/Apps/Software
Source0: InstallAppdata.sh
Source0: openSUSE-appstream-1.0.tar.xz
Source1: openSUSE-appstream-process
Source2: InstallAppdata.sh
Source10: openSUSE-13.2.xml.gz
Source11: openSUSE-13.2-icons.tar.gz
BuildArch: noarch
@ -42,11 +44,38 @@ software centers.
At this moment, gnome-software is the only known implementation making use of it.
%package -n openSUSE-appstream-process
Summary: Appstream processor employed by kiwi
Group: System
Requires: appstream-glib >= 0.2.4
%description -n openSUSE-appstream-process
A wrapper around appstream-builder, called by kiwi in order to produce AppStream metadata
for the repositories to be published
%package -n openSUSE-appstream-extra
Summary: Additional Appstream Metadata
Group: System
%description -n openSUSE-appstream-extra
This package contains extra appstream metadata to be used by appstream-builder
%prep
%setup -q -n openSUSE-appstream-1.0
%build
%install
# install the appstream process script to be used by kiwi
install -d -m 0755 %{_buildroot}%{_bindir}
install -m 0755 -D %{S:1} %{buildroot}%{_bindir}/$(basename %{S:1})
# install the additional appstream metadata
install -m 0755 -d %{buildroot}%{_datadir}/appstream-extra
for DATA in appdata-extra appstream-extra screenshots-extra
do
cp -r ${DATA} %{buildroot}%{_datadir}/appstream-extra/
done
# Install AppData zypp plugin - temporarily disabled in favor of static AppStream metadata
#%%install -Dm 0755 %%{S:1} %%{buildroot}%%{_prefix}/lib/zypp/plugins/appdata/$(basename %%{S:1})
DESTDIR=%{buildroot} appstream-util install %{S:10} %{S:11}
@ -71,4 +100,12 @@ fi
#{_prefix}/lib/zypp/plugins/appdata/InstallAppdata.sh
%{_datadir}/app-info/
%files -n openSUSE-appstream-process
%defattr(-,root,root)
%{_bindir}/openSUSE-appstream-process
%files -n openSUSE-appstream-extra
%defattr(-,root,root)
%{_datadir}/appstream-extra/
%changelog

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:263648080b46f4a5f808580235f9ad7157f91a5a3a8c231fd116b2ef0f903147
size 40672352

View File

@ -0,0 +1,28 @@
#!/bin/bash
SRC=$1
DEST=$2
/usr/bin/appstream-builder \
--no-net \
--enable-hidpi \
--temp-dir=/tmp/apb \
--cache-dir=/tmp/apb/cache \
--origin=appdata \
--api-version=0.8 \
--basename=appdata \
--extra-appdata-dir=/usr/share/appstream-extra/ \
--packages-dir=${SRC} \
--output-dir=${DEST} \
--screenshot-uri=http://static.opensuse.org/screenshots/openSUSE-13.2
/usr/bin/appstream-util \
status-html \
${DEST}/appdata.xml.gz \
${DEST}/appdata.html
/usr/bin/appstream-util \
status-html \
${DEST}/appdata-failed.xml.gz \
${DEST}/appdata-failed.html