appstream-glib 0.8.3
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/appstream-glib?expand=0&rev=161
This commit is contained in:
commit
12ea238d15
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
170
0001-Move-from-app-info-to-swcatalog-locations.patch
Normal file
170
0001-Move-from-app-info-to-swcatalog-locations.patch
Normal file
@ -0,0 +1,170 @@
|
||||
From 6a537402a2e29b00f1cc5a24032b3ed13873921d Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.de>
|
||||
Date: Thu, 1 Feb 2024 15:05:14 +0100
|
||||
Subject: [PATCH] Move from app-info to swcatalog locations
|
||||
|
||||
The AppStream specification changed the location. ximion/appstream since 1.0
|
||||
only accepts the new location. To avoid having to manage two locations, switch
|
||||
to the new one entirely.
|
||||
---
|
||||
client/as-compose.c | 4 ++--
|
||||
client/as-util.c | 4 ++--
|
||||
data/appstream-compose.xml | 2 +-
|
||||
libappstream-glib/as-store.c | 18 +++++++++---------
|
||||
libappstream-glib/as-utils.c | 6 +++---
|
||||
5 files changed, 17 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/client/as-compose.c b/client/as-compose.c
|
||||
index 6ad2564..dec8984 100644
|
||||
--- a/client/as-compose.c
|
||||
+++ b/client/as-compose.c
|
||||
@@ -366,9 +366,9 @@ main (int argc, char **argv)
|
||||
if (prefix == NULL)
|
||||
prefix = g_strdup ("/usr");
|
||||
if (output_dir == NULL)
|
||||
- output_dir = g_build_filename (prefix, "share/app-info/xmls", NULL);
|
||||
+ output_dir = g_build_filename (prefix, "share/swcatalog/xml", NULL);
|
||||
if (icons_dir == NULL)
|
||||
- icons_dir = g_build_filename (prefix, "share/app-info/icons", origin, NULL);
|
||||
+ icons_dir = g_build_filename (prefix, "share/swcatalog/icons", origin, NULL);
|
||||
if (origin == NULL) {
|
||||
g_print ("WARNING: Metadata origin not set, using 'example'\n");
|
||||
origin = g_strdup ("example");
|
||||
diff --git a/client/as-util.c b/client/as-util.c
|
||||
index 87ec1e3..10c42cc 100644
|
||||
--- a/client/as-util.c
|
||||
+++ b/client/as-util.c
|
||||
@@ -1699,7 +1699,7 @@ as_util_uninstall (AsUtilPrivate *priv, gchar **values, GError **error)
|
||||
destdir = g_getenv ("DESTDIR");
|
||||
for (i = 0; locations[i] != NULL; i++) {
|
||||
g_autofree gchar *path_xml = NULL;
|
||||
- path_xml = g_strdup_printf ("%s%s/app-info/xmls/%s.xml.gz",
|
||||
+ path_xml = g_strdup_printf ("%s%s/swcatalog/xml/%s.xml.gz",
|
||||
destdir != NULL ? destdir : "",
|
||||
locations[i], values[0]);
|
||||
if (g_file_test (path_xml, G_FILE_TEST_EXISTS)) {
|
||||
@@ -1713,7 +1713,7 @@ as_util_uninstall (AsUtilPrivate *priv, gchar **values, GError **error)
|
||||
/* remove icons */
|
||||
for (i = 0; locations[i] != NULL; i++) {
|
||||
g_autofree gchar *path_icons = NULL;
|
||||
- path_icons = g_strdup_printf ("%s%s/app-info/icons/%s",
|
||||
+ path_icons = g_strdup_printf ("%s%s/swcatalog/icons/%s",
|
||||
destdir != NULL ? destdir : "",
|
||||
locations[i], values[0]);
|
||||
if (g_file_test (path_icons, G_FILE_TEST_EXISTS)) {
|
||||
diff --git a/data/appstream-compose.xml b/data/appstream-compose.xml
|
||||
index 91ce906..ea81cf5 100644
|
||||
--- a/data/appstream-compose.xml
|
||||
+++ b/data/appstream-compose.xml
|
||||
@@ -46,7 +46,7 @@
|
||||
prefix (default /usr) and a set of application names.
|
||||
It looks for appdata, metainfo, desktop and icon files with that
|
||||
basename in $prefix/share/[appdata|metainfo|applications|icons] and generates
|
||||
- appstream xml files and icons in (by default) $prefix/share/app-info.
|
||||
+ appstream xml files and icons in (by default) $prefix/share/swcatalog.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c
|
||||
index 65b557c..4fcf7ef 100644
|
||||
--- a/libappstream-glib/as-store.c
|
||||
+++ b/libappstream-glib/as-store.c
|
||||
@@ -1733,11 +1733,11 @@ as_store_from_root (AsStore *store,
|
||||
}
|
||||
|
||||
/* guess the icon path after we've read the origin and then look for
|
||||
- * ../icons/$origin if the topdir is 'xmls', falling back to ./icons */
|
||||
+ * ../icons/$origin if the topdir is 'xml', falling back to ./icons */
|
||||
if (icon_prefix != NULL) {
|
||||
g_autofree gchar *topdir = NULL;
|
||||
topdir = g_path_get_basename (icon_prefix);
|
||||
- if ((g_strcmp0 (topdir, "xmls") == 0 ||
|
||||
+ if ((g_strcmp0 (topdir, "xml") == 0 ||
|
||||
g_strcmp0 (topdir, "yaml") == 0)
|
||||
&& origin_app_icons != NULL) {
|
||||
g_autofree gchar *dirname = NULL;
|
||||
@@ -3326,7 +3326,7 @@ as_store_search_app_info (AsStore *store,
|
||||
GError **error)
|
||||
{
|
||||
AsStorePrivate *priv = GET_PRIVATE (store);
|
||||
- const gchar *supported_kinds[] = { "yaml", "xmls", NULL };
|
||||
+ const gchar *supported_kinds[] = { "yaml", "xml", NULL };
|
||||
guint i;
|
||||
|
||||
for (i = 0; supported_kinds[i] != NULL; i++) {
|
||||
@@ -3374,7 +3374,7 @@ as_store_search_per_system (AsStore *store,
|
||||
}
|
||||
if ((flags & AS_STORE_LOAD_FLAG_APP_INFO_SYSTEM) > 0) {
|
||||
g_autofree gchar *dest = NULL;
|
||||
- dest = g_build_filename (data_dirs[i], "app-info", NULL);
|
||||
+ dest = g_build_filename (data_dirs[i], "swcatalog", NULL);
|
||||
if (!as_store_search_app_info (store, flags, AS_APP_SCOPE_SYSTEM,
|
||||
dest, cancellable, error))
|
||||
return FALSE;
|
||||
@@ -3406,11 +3406,11 @@ as_store_search_per_system (AsStore *store,
|
||||
if ((flags & AS_STORE_LOAD_FLAG_APP_INFO_SYSTEM) > 0) {
|
||||
g_autofree gchar *dest1 = NULL;
|
||||
g_autofree gchar *dest2 = NULL;
|
||||
- dest1 = g_build_filename (LOCALSTATEDIR, "lib", "app-info", NULL);
|
||||
+ dest1 = g_build_filename (LOCALSTATEDIR, "lib", "swcatalog", NULL);
|
||||
if (!as_store_search_app_info (store, flags, AS_APP_SCOPE_SYSTEM, dest1,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
- dest2 = g_build_filename (LOCALSTATEDIR, "cache", "app-info", NULL);
|
||||
+ dest2 = g_build_filename (LOCALSTATEDIR, "cache", "swcatalog", NULL);
|
||||
if (!as_store_search_app_info (store, flags, AS_APP_SCOPE_SYSTEM, dest2,
|
||||
cancellable, error))
|
||||
return FALSE;
|
||||
@@ -3419,11 +3419,11 @@ as_store_search_per_system (AsStore *store,
|
||||
if (g_strcmp0 (LOCALSTATEDIR, "/var") != 0) {
|
||||
g_autofree gchar *dest3 = NULL;
|
||||
g_autofree gchar *dest4 = NULL;
|
||||
- dest3 = g_build_filename ("/var", "lib", "app-info", NULL);
|
||||
+ dest3 = g_build_filename ("/var", "lib", "swcatalog", NULL);
|
||||
if (!as_store_search_app_info (store, flags, AS_APP_SCOPE_SYSTEM,
|
||||
dest3, cancellable, error))
|
||||
return FALSE;
|
||||
- dest4 = g_build_filename ("/var", "cache", "app-info", NULL);
|
||||
+ dest4 = g_build_filename ("/var", "cache", "swcatalog", NULL);
|
||||
if (!as_store_search_app_info (store, flags, AS_APP_SCOPE_SYSTEM,
|
||||
dest4, cancellable, error))
|
||||
return FALSE;
|
||||
@@ -3448,7 +3448,7 @@ as_store_search_per_user (AsStore *store,
|
||||
/* AppStream */
|
||||
if ((flags & AS_STORE_LOAD_FLAG_APP_INFO_USER) > 0) {
|
||||
g_autofree gchar *dest = NULL;
|
||||
- dest = g_build_filename (g_get_user_data_dir (), "app-info", NULL);
|
||||
+ dest = g_build_filename (g_get_user_data_dir (), "swcatalog", NULL);
|
||||
if (!as_store_search_app_info (store, flags, AS_APP_SCOPE_USER,
|
||||
dest, cancellable, error))
|
||||
return FALSE;
|
||||
diff --git a/libappstream-glib/as-utils.c b/libappstream-glib/as-utils.c
|
||||
index d9b0f56..b262f24 100644
|
||||
--- a/libappstream-glib/as-utils.c
|
||||
+++ b/libappstream-glib/as-utils.c
|
||||
@@ -1050,7 +1050,7 @@ as_utils_install_icon (AsUtilsLocation location,
|
||||
g_autofree gchar *data = NULL;
|
||||
g_autofree gchar *dir = NULL;
|
||||
|
||||
- dir = g_strdup_printf ("%s%s/app-info/icons/%s",
|
||||
+ dir = g_strdup_printf ("%s%s/swcatalog/icons/%s",
|
||||
destdir,
|
||||
as_utils_location_get_prefix (location),
|
||||
origin);
|
||||
@@ -1239,11 +1239,11 @@ as_utils_install_filename (AsUtilsLocation location,
|
||||
case AS_FORMAT_KIND_APPSTREAM:
|
||||
if (g_strstr_len (filename, -1, ".yml.gz") != NULL) {
|
||||
path = g_build_filename (as_utils_location_get_prefix (location),
|
||||
- "app-info", "yaml", NULL);
|
||||
+ "swcatalog", "yaml", NULL);
|
||||
ret = as_utils_install_xml (filename, origin, path, destdir, error);
|
||||
} else {
|
||||
path = g_build_filename (as_utils_location_get_prefix (location),
|
||||
- "app-info", "xmls", NULL);
|
||||
+ "swcatalog", "xml", NULL);
|
||||
ret = as_utils_install_xml (filename, origin, path, destdir, error);
|
||||
}
|
||||
break;
|
||||
--
|
||||
2.43.0
|
||||
|
17
_service
Normal file
17
_service
Normal file
@ -0,0 +1,17 @@
|
||||
<services>
|
||||
<service name="obs_scm" mode="disabled">
|
||||
<param name="url">https://github.com/hughsie/appstream-glib.git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
|
||||
<param name="versionrewrite-pattern">appstream_glib_(\d+)_(\d+)_(\d+)(\+0)?(\+[1-9][0-9]*)?</param>
|
||||
<param name="versionrewrite-replacement">\1.\2.\3\5</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="revision">refs/tags/appstream_glib_0_8_3</param>
|
||||
</service>
|
||||
<service name="tar" mode="buildtime"/>
|
||||
<service name="recompress" mode="buildtime">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled"/>
|
||||
</services>
|
6
_servicedata
Normal file
6
_servicedata
Normal file
@ -0,0 +1,6 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/hughsie/appstream-glib.git</param>
|
||||
<param name="changesrevision">830cdbd0581110bdb74188e7a66c272cd059f5bb</param>
|
||||
</service>
|
||||
</servicedata>
|
BIN
appstream-glib-0.8.2.obscpio
(Stored with Git LFS)
Normal file
BIN
appstream-glib-0.8.2.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
3
appstream-glib-0.8.3.obscpio
Normal file
3
appstream-glib-0.8.3.obscpio
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6c4758c910952baa690d19261ae1347429e3a4b114706a7f9e2878281ff01ba1
|
||||
size 5242381
|
1825
appstream-glib.changes
Normal file
1825
appstream-glib.changes
Normal file
File diff suppressed because it is too large
Load Diff
4
appstream-glib.obsinfo
Normal file
4
appstream-glib.obsinfo
Normal file
@ -0,0 +1,4 @@
|
||||
name: appstream-glib
|
||||
version: 0.8.3
|
||||
mtime: 1717590488
|
||||
commit: 830cdbd0581110bdb74188e7a66c272cd059f5bb
|
205
appstream-glib.spec
Normal file
205
appstream-glib.spec
Normal file
@ -0,0 +1,205 @@
|
||||
#
|
||||
# spec file for package appstream-glib
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2014 Dominique Leuenberger, Amsterdam, The Netherlands
|
||||
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: appstream-glib
|
||||
Version: 0.8.3
|
||||
Release: 0
|
||||
Summary: AppStream Abstraction Library
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||
URL: https://people.freedesktop.org/~hughsient/appstream-glib/
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
Source1: openSUSE-appstream-process
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch1: 0001-Move-from-app-info-to-swcatalog-locations.patch
|
||||
BuildRequires: docbook-xsl-stylesheets
|
||||
BuildRequires: gcab >= 0.6
|
||||
BuildRequires: gobject-introspection-devel
|
||||
BuildRequires: gperf
|
||||
BuildRequires: gtk-doc
|
||||
BuildRequires: meson
|
||||
BuildRequires: pkgconfig
|
||||
# We still need some part to build the man pages
|
||||
BuildRequires: xsltproc
|
||||
BuildRequires: pkgconfig(gdk-pixbuf-2.0) >= 2.31.5
|
||||
BuildRequires: pkgconfig(gio-2.0)
|
||||
BuildRequires: pkgconfig(gio-unix-2.0) >= 2.45.8
|
||||
BuildRequires: pkgconfig(glib-2.0) >= 2.45.8
|
||||
BuildRequires: pkgconfig(gmodule-2.0) >= 2.45.8
|
||||
BuildRequires: pkgconfig(gobject-2.0)
|
||||
BuildRequires: pkgconfig(json-glib-1.0) >= 1.1.2
|
||||
BuildRequires: pkgconfig(libarchive)
|
||||
BuildRequires: pkgconfig(libcurl) >= 7.56.0
|
||||
BuildRequires: pkgconfig(libgcab-1.0)
|
||||
BuildRequires: pkgconfig(rpm)
|
||||
BuildRequires: pkgconfig(uuid)
|
||||
BuildRequires: pkgconfig(yaml-0.1)
|
||||
Requires: gcab
|
||||
# Required in order to be able to convert .svg icons
|
||||
Requires: gdk-pixbuf-loader-rsvg
|
||||
Requires: pngquant >= 2.8
|
||||
# Due to patch1 only swcatalog will be populated.
|
||||
# Older libs would not find any info anymore.
|
||||
Conflicts: libappstream4 < 0.15.2
|
||||
Provides: asglib(swcatalog)
|
||||
|
||||
%description
|
||||
This library provides GObjects and helper methods to read and write
|
||||
AppStream metadata. It also provides a DOM implementation to edit
|
||||
nodes and convert to and from the standardized XML representation.
|
||||
|
||||
This library allows to:
|
||||
|
||||
* Read and write compressed AppStream XML files
|
||||
* Add and search for applications in an application store
|
||||
* Get screenshot image data and release announcements
|
||||
* Easily retrieve the best application data for the current locale
|
||||
* Efficiently interface with more heavy-weight parsers like expat
|
||||
|
||||
%package -n libappstream-glib8
|
||||
Summary: AppStream Abstraction Library
|
||||
License: LGPL-2.1-or-later
|
||||
|
||||
%description -n libappstream-glib8
|
||||
This library provides GObjects and helper methods to read and write
|
||||
AppStream metadata. It also provides a DOM implementation to edit
|
||||
nodes and convert to and from the standardized XML representation.
|
||||
|
||||
%package -n typelib-1_0-AppStreamGlib-1_0
|
||||
Summary: Introspection bindings for the AppStream abstraction library
|
||||
License: LGPL-2.1-or-later
|
||||
|
||||
%description -n typelib-1_0-AppStreamGlib-1_0
|
||||
This library provides GObjects and helper methods to read and write
|
||||
AppStream metadata. It also provides a DOM implementation to edit
|
||||
nodes and convert to and from the standardized XML representation.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for the AppStream abstraction library
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||
Requires: %{name} = %{version}
|
||||
Requires: libappstream-glib8 = %{version}
|
||||
Requires: typelib-1_0-AppStreamGlib-1_0 = %{version}
|
||||
# appdata-tools was consumed into appstream-glib and is no longer maintained upstream
|
||||
Obsoletes: appdata-tools < 0.1.9
|
||||
Provides: appdata-tools = 0.1.9
|
||||
# Also obsolete the -lang package; or we end up with strange conflicts
|
||||
Obsoletes: appdata-tools-lang < 0.1.9
|
||||
|
||||
%description devel
|
||||
This library provides GObjects and helper methods to read and write
|
||||
AppStream metadata. It also provides a DOM implementation to edit
|
||||
nodes and convert to and from the standardized XML representation.
|
||||
|
||||
This library allows to:
|
||||
|
||||
* Read and write compressed AppStream XML files
|
||||
* Add and search for applications in an application store
|
||||
* Get screenshot image data and release announcements
|
||||
* Easily retrieve the best application data for the current locale
|
||||
* Efficiently interface with more heavy-weight parsers like expat
|
||||
|
||||
%package -n openSUSE-appstream-process
|
||||
Summary: Appstream processor employed by kiwi
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||
Requires: appstream-glib >= %{version}
|
||||
Requires: openSUSE-appdata-extra
|
||||
|
||||
%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
|
||||
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%meson \
|
||||
-Ddep11=true \
|
||||
-Dbuilder=true \
|
||||
-Drpm=true \
|
||||
-Dalpm=false \
|
||||
-Dfonts=false \
|
||||
-Dman=true \
|
||||
-Dgtk-doc=true \
|
||||
-Dintrospection=true \
|
||||
%{nil}
|
||||
%meson_build
|
||||
|
||||
%install
|
||||
%meson_install
|
||||
# We don't care for 'installed tests'; that's used by GNOME Smoke Testing.
|
||||
rm %{buildroot}%{_datadir}/installed-tests/appstream-glib/*.test
|
||||
|
||||
# install the appstream process script to be used by kiwi
|
||||
install -d -m 0755 %{_buildroot}%{_bindir}
|
||||
install -m 0755 -D %{SOURCE1} %{buildroot}%{_bindir}/$(basename %{SOURCE1})
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
%check
|
||||
if %meson_test; then
|
||||
echo CHECKS passed
|
||||
exit 0
|
||||
else
|
||||
echo CHECKS failed... dumping log file
|
||||
find -name testlog.txt -exec cat {} +
|
||||
exit 0
|
||||
fi
|
||||
|
||||
%ldconfig_scriptlets -n libappstream-glib8
|
||||
|
||||
%files
|
||||
%doc AUTHORS NEWS
|
||||
%{_bindir}/appstream-builder
|
||||
%{_bindir}/appstream-compose
|
||||
%{_bindir}/appstream-util
|
||||
%{_datadir}/bash-completion/completions/appstream-builder
|
||||
%{_datadir}/bash-completion/completions/appstream-util
|
||||
%{_libdir}/asb-plugins-5/
|
||||
%{_mandir}/man1/appstream-builder.1%{?ext_man}
|
||||
%{_mandir}/man1/appstream-compose.1%{?ext_man}
|
||||
%{_mandir}/man1/appstream-util.1%{?ext_man}
|
||||
|
||||
%files -n libappstream-glib8
|
||||
%license COPYING
|
||||
%{_libdir}/libappstream-glib.so.*
|
||||
|
||||
%files -n typelib-1_0-AppStreamGlib-1_0
|
||||
%{_libdir}/girepository-1.0/AppStreamGlib-1.0.typelib
|
||||
|
||||
%files devel
|
||||
%doc MAINTAINERS README.md
|
||||
%{_datadir}/aclocal/appdata-xml.m4
|
||||
%{_datadir}/aclocal/appstream-xml.m4
|
||||
%dir %{_datadir}/gettext/its
|
||||
%{_datadir}/gettext/its/appdata.*
|
||||
%{_datadir}/gir-1.0/AppStreamGlib-1.0.gir
|
||||
%{_datadir}/gtk-doc/html/appstream-glib/
|
||||
%{_includedir}/libappstream-glib/
|
||||
%{_libdir}/pkgconfig/appstream-glib.pc
|
||||
%{_libdir}/libappstream-glib.so
|
||||
|
||||
%files -n openSUSE-appstream-process
|
||||
%{_bindir}/openSUSE-appstream-process
|
||||
|
||||
%files lang -f %{name}.lang
|
||||
|
||||
%changelog
|
72
openSUSE-appstream-process
Normal file
72
openSUSE-appstream-process
Normal file
@ -0,0 +1,72 @@
|
||||
#!/bin/bash
|
||||
|
||||
SRC=$1
|
||||
DEST=$2
|
||||
URL=https://static.opensuse.org/appstream/tumbleweed
|
||||
# Do not produce the html files - the biggest tasks are done
|
||||
# Users interested in them can always produce them locally out of the appdata.xml.gz file
|
||||
HTMLOUT=no
|
||||
HASHED_NAMES=no
|
||||
|
||||
TMPDIR=$(mktemp -d)
|
||||
|
||||
/usr/bin/appstream-builder \
|
||||
--temp-dir=${TMPDIR}/apb \
|
||||
--cache-dir=${TMPDIR}/apb/cache \
|
||||
--origin=appdata \
|
||||
--basename=appdata \
|
||||
--packages-dir=${SRC} \
|
||||
--output-dir=${DEST} 2>&1 > $TMPDIR/as-builder.log
|
||||
|
||||
RET=$?
|
||||
|
||||
if [ $RET -ne 0 ]; then
|
||||
# The appstream-builder failed, exit with an error code, so prod builder knows about it
|
||||
cat $TMPDIR/as-builder.log
|
||||
exit $RET
|
||||
fi
|
||||
|
||||
# clean up TMPDIR again
|
||||
rm -rf ${TMPDIR}
|
||||
|
||||
# Change screenshot URLs to our own infrastructure; disabled, as infra not ready
|
||||
# appstream-util mirror-screenshots \
|
||||
# ${DEST}/appdata.xml.gz \
|
||||
# ${URL} \
|
||||
# /usr/share/app-screenshots \
|
||||
# /tmp/apb-screenshots
|
||||
|
||||
if [ "$HTMLOUT" = "yes" ]; then
|
||||
/usr/bin/appstream-util \
|
||||
status-html \
|
||||
${DEST}/appdata.xml.gz \
|
||||
${DEST}/appdata.html
|
||||
|
||||
# compress the HTML file (boo#942985)
|
||||
xz -9 ${DEST}/appdata.html
|
||||
|
||||
/usr/bin/appstream-util \
|
||||
status-html \
|
||||
${DEST}/appdata-failed.xml.gz \
|
||||
${DEST}/appdata-failed.html
|
||||
|
||||
# compress the HTML file (boo#942985)
|
||||
xz -9 ${DEST}/appdata-failed.html
|
||||
fi
|
||||
|
||||
|
||||
if [ "$HASHED_NAMES" = "yes" ]; then
|
||||
# rename the appdata-icons.tar.gz tarball to something like
|
||||
# appdata-icons-${hash}.tar.gz, allowing mirrorbrain to send users
|
||||
# off to a mirror to catch the file, improving performance
|
||||
read md5 fn_catchall <<<$(md5sum ${DEST}/appdata-icons.tar.gz)
|
||||
mv ${DEST}/appdata-icons.tar.gz ${DEST}/appdata-icons-${md5}.tar.gz
|
||||
|
||||
# also rename the appdata.xml.gz file in the same style
|
||||
read md5 fn_catchall <<<$(md5sum ${DEST}/appdata.xml.gz)
|
||||
mv ${DEST}/appdata.xml.gz ${DEST}/appdata-${md5}.xml.gz
|
||||
|
||||
# And the same for the -screenshots tarball (containing auto-generated screenshots for fonts)
|
||||
read md5 fn_catchall <<<$(md5sum ${DEST}/appdata-screenshots.tar)
|
||||
mv ${DEST}/appdata-screenshots.tar ${DEST}/appdata-screenshots-${md5}.tar
|
||||
fi
|
Loading…
Reference in New Issue
Block a user