diff --git a/InstallAppdata.sh b/InstallAppdata.sh index 8abe180..701eb3e 100644 --- a/InstallAppdata.sh +++ b/InstallAppdata.sh @@ -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" diff --git a/_service b/_service new file mode 100644 index 0000000..63ea02b --- /dev/null +++ b/_service @@ -0,0 +1,11 @@ + + + https://github.com/DimStar77/openSUSE-appstream.git + git + 1.0 + + + *.tar + xz + + diff --git a/libzypp-plugin-appdata.changes b/libzypp-plugin-appdata.changes index add9de8..887393d 100644 --- a/libzypp-plugin-appdata.changes +++ b/libzypp-plugin-appdata.changes @@ -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 diff --git a/libzypp-plugin-appdata.spec b/libzypp-plugin-appdata.spec index e3c8730..1d969b9 100644 --- a/libzypp-plugin-appdata.spec +++ b/libzypp-plugin-appdata.spec @@ -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 diff --git a/openSUSE-appstream-1.0.tar.xz b/openSUSE-appstream-1.0.tar.xz new file mode 100644 index 0000000..d22cb89 --- /dev/null +++ b/openSUSE-appstream-1.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:263648080b46f4a5f808580235f9ad7157f91a5a3a8c231fd116b2ef0f903147 +size 40672352 diff --git a/openSUSE-appstream-process b/openSUSE-appstream-process new file mode 100644 index 0000000..3431586 --- /dev/null +++ b/openSUSE-appstream-process @@ -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 +