0.7.1
This commit is contained in:
parent
dd1d8335e5
commit
cc1ae621a6
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
/AppStream-0.6.2.tar.gz
|
||||
/AppStream-0.7.0.tar.xz
|
||||
/AppStream-0.7.1.tar.xz
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
From 2382796e9f22be8b1af4669c9e0bc09da524412c Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Klumpp <matthias@tenstral.net>
|
||||
Date: Wed, 16 Jul 2014 18:06:32 +0200
|
||||
Subject: [PATCH 3/3] qt: Respect the global install paths set by the toplevel
|
||||
CMake file
|
||||
|
||||
---
|
||||
qt/CMakeLists.txt | 12 ++++++++++++
|
||||
qt/src/CMakeLists.txt | 12 ++++++------
|
||||
2 files changed, 18 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/qt/CMakeLists.txt b/qt/CMakeLists.txt
|
||||
index 6ec18d3..67cce18 100644
|
||||
--- a/qt/CMakeLists.txt
|
||||
+++ b/qt/CMakeLists.txt
|
||||
@@ -26,4 +26,16 @@ if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
+if (NOT DEFINED INSTALL_DIR_LIB)
|
||||
+ set(INSTALL_DIR_LIB lib${LIB_SUFFIX}/${CMAKE_LIBRARY_ARCHITECTURE} CACHE PATH "Installation directory for libraries")
|
||||
+endif()
|
||||
+
|
||||
+if (NOT DEFINED INSTALL_DIR_BIN)
|
||||
+ set(INSTALL_DIR_BIN bin CACHE PATH "Installation directory for executables")
|
||||
+endif()
|
||||
+
|
||||
+if (NOT DEFINED INSTALL_DIR_INC)
|
||||
+ set(INSTALL_DIR_INC include CACHE PATH "Installation directory for headers")
|
||||
+endif()
|
||||
+
|
||||
add_subdirectory(src)
|
||||
diff --git a/qt/src/CMakeLists.txt b/qt/src/CMakeLists.txt
|
||||
index 69cb8a3..b05108b 100644
|
||||
--- a/qt/src/CMakeLists.txt
|
||||
+++ b/qt/src/CMakeLists.txt
|
||||
@@ -32,20 +32,20 @@ set_property(TARGET AppstreamQt PROPERTY VERSION "${APPSTREAMQT_SO_VERSION}.0.0"
|
||||
set_property(TARGET AppstreamQt PROPERTY SOVERSION "${APPSTREAMQT_SO_VERSION}" )
|
||||
|
||||
install(TARGETS AppstreamQt EXPORT AppstreamQtTargets
|
||||
- RUNTIME DESTINATION "bin"
|
||||
- LIBRARY DESTINATION "lib"
|
||||
- ARCHIVE DESTINATION "lib"
|
||||
- INCLUDES DESTINATION "include"
|
||||
+ RUNTIME DESTINATION ${INSTALL_DIR_BIN}
|
||||
+ LIBRARY DESTINATION ${INSTALL_DIR_LIB}
|
||||
+ ARCHIVE DESTINATION ${INSTALL_DIR_LIB}
|
||||
+ INCLUDES DESTINATION ${INSTALL_DIR_INC}
|
||||
)
|
||||
|
||||
-install(FILES ${APPSTREAMQT_PUBLIC_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/appstreamqt_export.h DESTINATION "include/AppstreamQt")
|
||||
+install(FILES ${APPSTREAMQT_PUBLIC_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/appstreamqt_export.h DESTINATION "${INSTALL_DIR_INC}/AppstreamQt")
|
||||
|
||||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/AppstreamQtConfigVersion.cmake VERSION ${APPSTREAMQT_VERSION} COMPATIBILITY SameMajorVersion )
|
||||
|
||||
export(TARGETS AppstreamQt
|
||||
FILE "${CMAKE_CURRENT_BINARY_DIR}/AppstreamQtTargets.cmake")
|
||||
|
||||
-set(ConfigPackageLocation lib/cmake/AppstreamQt)
|
||||
+set(ConfigPackageLocation ${INSTALL_DIR_LIB}/cmake/AppstreamQt)
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/AppstreamQtConfig.cmake.in"
|
||||
--
|
||||
1.9.3
|
||||
|
||||
82
0005-Ensure-that-we-do-not-convert-NULL-to-a-C-string.patch
Normal file
82
0005-Ensure-that-we-do-not-convert-NULL-to-a-C-string.patch
Normal file
@ -0,0 +1,82 @@
|
||||
From ac4ae2cd07034dff58ec69ff35b1b3b546da8a64 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Klumpp <matthias@tenstral.net>
|
||||
Date: Thu, 11 Sep 2014 17:49:39 +0200
|
||||
Subject: [PATCH 5/7] Ensure that we do not convert NULL to a C++ string
|
||||
|
||||
---
|
||||
src/as-component.c | 24 ++++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/src/as-component.c b/src/as-component.c
|
||||
index 712afa4..22bc2d8 100644
|
||||
--- a/src/as-component.c
|
||||
+++ b/src/as-component.c
|
||||
@@ -1061,6 +1061,10 @@ as_component_set_name (AsComponent *cpt, const gchar* value)
|
||||
{
|
||||
g_return_if_fail (cpt != NULL);
|
||||
|
||||
+ /* safety measure, so we can always convert this to a C++ string */
|
||||
+ if (value == NULL)
|
||||
+ value = "";
|
||||
+
|
||||
g_free (cpt->priv->name);
|
||||
cpt->priv->name = g_strdup (value);
|
||||
g_object_notify ((GObject *) cpt, "name");
|
||||
@@ -1078,6 +1082,10 @@ as_component_set_name_original (AsComponent *cpt, const gchar* value)
|
||||
{
|
||||
g_return_if_fail (cpt != NULL);
|
||||
|
||||
+ /* safety measure, so we can always convert this to a C++ string */
|
||||
+ if (value == NULL)
|
||||
+ value = "";
|
||||
+
|
||||
g_free (cpt->priv->name_original);
|
||||
cpt->priv->name_original = g_strdup (value);
|
||||
g_object_notify ((GObject *) cpt, "name-original");
|
||||
@@ -1096,6 +1104,10 @@ as_component_set_summary (AsComponent *cpt, const gchar* value)
|
||||
{
|
||||
g_return_if_fail (cpt != NULL);
|
||||
|
||||
+ /* safety measure, so we can always convert this to a C++ string */
|
||||
+ if (value == NULL)
|
||||
+ value = "";
|
||||
+
|
||||
g_free (cpt->priv->summary);
|
||||
cpt->priv->summary = g_strdup (value);
|
||||
g_object_notify ((GObject *) cpt, "summary");
|
||||
@@ -1117,6 +1129,10 @@ as_component_set_description (AsComponent *cpt, const gchar* value)
|
||||
{
|
||||
g_return_if_fail (cpt != NULL);
|
||||
|
||||
+ /* safety measure, so we can always convert this to a C++ string */
|
||||
+ if (value == NULL)
|
||||
+ value = "";
|
||||
+
|
||||
g_free (cpt->priv->description);
|
||||
cpt->priv->description = g_strdup (value);
|
||||
g_object_notify ((GObject *) cpt, "description");
|
||||
@@ -1174,6 +1190,10 @@ as_component_set_icon (AsComponent *cpt, const gchar* value)
|
||||
{
|
||||
g_return_if_fail (cpt != NULL);
|
||||
|
||||
+ /* safety measure, so we can always convert this to a C++ string */
|
||||
+ if (value == NULL)
|
||||
+ value = "";
|
||||
+
|
||||
g_free (cpt->priv->icon);
|
||||
cpt->priv->icon = g_strdup (value);
|
||||
g_object_notify ((GObject *) cpt, "icon");
|
||||
@@ -1208,6 +1228,10 @@ as_component_set_icon_url (AsComponent *cpt, const gchar* value)
|
||||
{
|
||||
g_return_if_fail (cpt != NULL);
|
||||
|
||||
+ /* safety measure, so we can always convert this to a C++ string */
|
||||
+ if (value == NULL)
|
||||
+ value = "";
|
||||
+
|
||||
g_free (cpt->priv->icon_url);
|
||||
cpt->priv->icon_url = g_strdup (value);
|
||||
g_object_notify ((GObject *) cpt, "icon-url");
|
||||
--
|
||||
1.9.3
|
||||
|
||||
176
0006-Remove-the-PackageKit-plugin.patch
Normal file
176
0006-Remove-the-PackageKit-plugin.patch
Normal file
@ -0,0 +1,176 @@
|
||||
From e149e933232febcccf8baae5af8efa9a4d5cc490 Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Klumpp <matthias@tenstral.net>
|
||||
Date: Fri, 12 Sep 2014 13:48:17 +0200
|
||||
Subject: [PATCH 6/7] Remove the PackageKit plugin
|
||||
|
||||
Tools which modify the AppStream data will now have to call
|
||||
$ appstream-index refresh
|
||||
in order to get the cache updated (or use the equivalent libas API
|
||||
calls)
|
||||
---
|
||||
src/CMakeLists.txt | 8 +---
|
||||
src/pk-plugin/CMakeLists.txt | 30 ------------
|
||||
src/pk-plugin/pk-plugin-appstream.c | 91 -------------------------------------
|
||||
3 files changed, 1 insertion(+), 128 deletions(-)
|
||||
delete mode 100644 src/pk-plugin/CMakeLists.txt
|
||||
delete mode 100644 src/pk-plugin/pk-plugin-appstream.c
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 2359144..366833f 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -96,10 +96,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/xapian
|
||||
${YAML_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
-add_definitions("-DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE"
|
||||
- "-DI_KNOW_THE_PACKAGEKIT_PLUGIN_API_IS_SUBJECT_TO_CHANGE"
|
||||
- "-DAS_COMPILATION"
|
||||
-)
|
||||
+add_definitions("-DAS_COMPILATION")
|
||||
|
||||
# ensure that the GI compiler has been found (apparently, the automatic tests fail on some machines)
|
||||
if (INTROSPECTION_COMPILER STREQUAL "")
|
||||
@@ -145,6 +142,3 @@ gir_add_introspections(INTROSPECTION_GIRS)
|
||||
install(TARGETS appstream DESTINATION ${INSTALL_DIR_LIB})
|
||||
install(FILES ${LIBAPPSTREAM_PUBLIC_HEADERS} DESTINATION include/Appstream)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/appstream.pc DESTINATION ${INSTALL_DIR_LIB}/pkgconfig/)
|
||||
-
|
||||
-# include the PackageKit plugin
|
||||
-add_subdirectory(pk-plugin)
|
||||
diff --git a/src/pk-plugin/CMakeLists.txt b/src/pk-plugin/CMakeLists.txt
|
||||
deleted file mode 100644
|
||||
index f719dcc..0000000
|
||||
--- a/src/pk-plugin/CMakeLists.txt
|
||||
+++ /dev/null
|
||||
@@ -1,30 +0,0 @@
|
||||
-# CMakeLists for AppStream PackageKit PlugIn
|
||||
-
|
||||
-find_package(GLIB2 REQUIRED)
|
||||
-pkg_check_modules(GIO2 REQUIRED gio-2.0)
|
||||
-pkg_check_modules(PACKAGEKIT REQUIRED packagekit-glib2)
|
||||
-pkg_check_modules(PACKAGEKIT_PLUGIN REQUIRED packagekit-plugin)
|
||||
-
|
||||
-set(PK_APPSTREAM_SOURCES pk-plugin-appstream.c
|
||||
-)
|
||||
-
|
||||
-add_library(pk_plugin_appstream MODULE ${PK_APPSTREAM_SOURCES})
|
||||
-
|
||||
-target_link_libraries(pk_plugin_appstream
|
||||
- ${M_LIB}
|
||||
- ${GIO2_LIBRARIES}
|
||||
- ${PACKAGEKIT_LIBRARIES}
|
||||
- ${PACKAGEKIT_PLUGIN_LIBRARIES}
|
||||
- appstream
|
||||
-)
|
||||
-
|
||||
-include_directories(${CMAKE_BINARY_DIR}
|
||||
- ${CMAKE_BINARY_DIR}/src
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
- ${GLIB2_INCLUDE_DIR}
|
||||
- ${GIO2_INCLUDE_DIR}
|
||||
- ${PACKAGEKIT_INCLUDE_DIRS}
|
||||
- ${PACKAGEKIT_PLUGIN_INCLUDE_DIRS}
|
||||
-)
|
||||
-
|
||||
-install(TARGETS pk_plugin_appstream DESTINATION ${INSTALL_DIR_LIB}/packagekit-plugins-2)
|
||||
diff --git a/src/pk-plugin/pk-plugin-appstream.c b/src/pk-plugin/pk-plugin-appstream.c
|
||||
deleted file mode 100644
|
||||
index 2247fd5..0000000
|
||||
--- a/src/pk-plugin/pk-plugin-appstream.c
|
||||
+++ /dev/null
|
||||
@@ -1,91 +0,0 @@
|
||||
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
|
||||
- *
|
||||
- * Copyright (C) 2012-2013 Matthias Klumpp <matthias@tenstral.net>
|
||||
- *
|
||||
- * Licensed under the GNU Lesser General Public License Version 2.1
|
||||
- *
|
||||
- * This library is free software: you can redistribute it and/or modify
|
||||
- * it under the terms of the GNU Lesser General Public License as published by
|
||||
- * the Free Software Foundation, either version 2.1 of the license, or
|
||||
- * (at your option) any later version.
|
||||
- *
|
||||
- * This library is distributed in the hope that it will be useful,
|
||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
- * GNU Lesser General Public License for more details.
|
||||
- *
|
||||
- * You should have received a copy of the GNU Lesser General Public License
|
||||
- * along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
- */
|
||||
-
|
||||
-#include <packagekit-glib2/packagekit.h>
|
||||
-#include <plugin/packagekit-plugin.h>
|
||||
-
|
||||
-#include "../as-cache-builder.h"
|
||||
-
|
||||
-struct PkPluginPrivate {
|
||||
- guint dummy;
|
||||
-};
|
||||
-
|
||||
-/**
|
||||
- * pk_plugin_get_description:
|
||||
- */
|
||||
-const gchar *
|
||||
-pk_plugin_get_description (void)
|
||||
-{
|
||||
- return "Refreshes the Appstream database of available applications";
|
||||
-}
|
||||
-
|
||||
-/**
|
||||
- * pk_plugin_initialize:
|
||||
- */
|
||||
-void
|
||||
-pk_plugin_initialize (PkPlugin *plugin)
|
||||
-{
|
||||
- /* create private area */
|
||||
- plugin->priv = PK_TRANSACTION_PLUGIN_GET_PRIVATE (PkPluginPrivate);
|
||||
-}
|
||||
-
|
||||
-/**
|
||||
- * pk_plugin_transaction_finished_end:
|
||||
- */
|
||||
-void
|
||||
-pk_plugin_transaction_finished_end (PkPlugin *plugin,
|
||||
- PkTransaction *transaction)
|
||||
-{
|
||||
- AsBuilder *builder = NULL;
|
||||
- PkRoleEnum role;
|
||||
-
|
||||
- /* skip simulate actions */
|
||||
- if (pk_bitfield_contain (pk_transaction_get_transaction_flags (transaction),
|
||||
- PK_TRANSACTION_FLAG_ENUM_SIMULATE)) {
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- /* skip only-download */
|
||||
- if (pk_bitfield_contain (pk_transaction_get_transaction_flags (transaction),
|
||||
- PK_TRANSACTION_FLAG_ENUM_ONLY_DOWNLOAD)) {
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- /* check the role */
|
||||
- role = pk_transaction_get_role (transaction);
|
||||
- if (role != PK_ROLE_ENUM_REFRESH_CACHE)
|
||||
- goto out;
|
||||
-
|
||||
- /* use a local backend instance */
|
||||
- pk_backend_reset_job (plugin->backend, plugin->job);
|
||||
- pk_backend_job_set_status (plugin->job,
|
||||
- PK_STATUS_ENUM_SCAN_APPLICATIONS);
|
||||
-
|
||||
- /* refresh the AppStream cache using the database builder */
|
||||
- builder = as_builder_new ();
|
||||
- as_builder_initialize (builder);
|
||||
- as_builder_refresh_cache (builder, FALSE, NULL);
|
||||
-
|
||||
- pk_backend_job_set_percentage (plugin->job, 100);
|
||||
- pk_backend_job_set_status (plugin->job, PK_STATUS_ENUM_FINISHED);
|
||||
-out:
|
||||
- if (builder != NULL)
|
||||
- g_object_unref (builder);
|
||||
-}
|
||||
--
|
||||
1.9.3
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
|
||||
Summary: Utilities to generate, maintain and access the AppStream Xapian database
|
||||
Name: appstream
|
||||
Version: 0.7.0
|
||||
Release: 4%{?dist}
|
||||
Version: 0.7.1
|
||||
Release: 1%{?dist}
|
||||
|
||||
# lib LGPLv2+, tools GPLv2+
|
||||
License: GPLv2+ and LGPLv2+
|
||||
@ -10,7 +10,8 @@ URL: http://www.freedesktop.org/wiki/Distributions/AppStream/Software
|
||||
Source0: http://www.freedesktop.org/software/appstream/releases/AppStream-%{version}.tar.xz
|
||||
|
||||
## upstream patches
|
||||
Patch103: 0003-qt-Respect-the-global-install-paths-set-by-the-tople.patch
|
||||
Patch5: 0005-Ensure-that-we-do-not-convert-NULL-to-a-C-string.patch
|
||||
Patch6: 0006-Remove-the-PackageKit-plugin.patch
|
||||
|
||||
## upstreamable patches
|
||||
|
||||
@ -20,7 +21,6 @@ BuildRequires: intltool
|
||||
BuildRequires: pkgconfig(gio-2.0) pkgconfig(gobject-introspection-1.0)
|
||||
BuildRequires: pkgconfig(libxml-2.0)
|
||||
BuildRequires: pkgconfig(packagekit-glib2)
|
||||
BuildRequires: pkgconfig(packagekit-plugin)
|
||||
BuildRequires: pkgconfig(QtCore)
|
||||
BuildRequires: xapian-core-devel
|
||||
BuildRequires: xmlto
|
||||
@ -29,9 +29,7 @@ Requires: appstream-data
|
||||
|
||||
%description
|
||||
AppStream-Core makes it easy to access application information from the
|
||||
AppStream database over a nice GObject-based interface. It uses a
|
||||
PackageKit plugin to automatically (re)generate the AppStream Xapian
|
||||
database of applications.
|
||||
AppStream database over a nice GObject-based interface.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
@ -95,14 +93,15 @@ touch %{buildroot}/var/cache/app-info/cache.watch
|
||||
make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300" ||:
|
||||
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%posttrans
|
||||
## include this scriptlet *somewhere*, but only if it is safe and
|
||||
## won't hang or take a long time, see
|
||||
## https://bugzilla.redhat.com/1098306
|
||||
%{_bindir}/appstream-index --refresh --force >& /dev/null ||:
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files -f appstream.lang
|
||||
%doc AUTHORS
|
||||
%doc LICENSE.GPLv2 LICENSE.LGPLv2.1
|
||||
@ -114,8 +113,6 @@ make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300" ||:
|
||||
%{_libdir}/girepository-1.0/Appstream-0.7.typelib
|
||||
%{_libdir}/libappstream.so.1*
|
||||
%{_libdir}/libappstream.so.%{version}
|
||||
%dir %{_libdir}/packagekit-plugins
|
||||
%{_libdir}/packagekit-plugins/libpk_plugin_appstream.so
|
||||
%dir %{_datadir}/app-info/
|
||||
%dir %{_datadir}/app-info/icons
|
||||
%dir %{_datadir}/app-info/xmls
|
||||
@ -151,6 +148,9 @@ make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300" ||:
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Sep 12 2014 Rex Dieter <rdieter@fedoraproject.org> 0.7.1-1
|
||||
- 0.7.1
|
||||
|
||||
* Wed Aug 20 2014 Rex Dieter <rdieter@fedoraproject.org> 0.7.0-4
|
||||
- enable Qt bindings support
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user