2014-11-04 10:01:55 +01:00
|
|
|
#
|
2015-01-23 14:54:24 +01:00
|
|
|
# spec file for package libzypp-plugin-appdata
|
2014-11-04 10:01:55 +01:00
|
|
|
#
|
2020-09-05 16:06:21 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2014-11-04 10:01:55 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2020-09-05 16:06:21 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-11-04 10:01:55 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: libzypp-plugin-appdata
|
2018-04-26 13:40:42 +02:00
|
|
|
Version: 1.0.1+git.20180426
|
2014-11-04 10:01:55 +01:00
|
|
|
Release: 0
|
2018-05-02 11:02:48 +02:00
|
|
|
Summary: libzypp extension to handle AppStream metadata
|
2017-06-28 17:44:36 +02:00
|
|
|
License: MIT AND CC0-1.0
|
2014-11-04 10:01:55 +01:00
|
|
|
Group: System/Libraries
|
2018-03-05 15:03:03 +01:00
|
|
|
URL: https://wiki.gnome.org/Design/Apps/Software
|
2017-06-28 17:44:36 +02:00
|
|
|
Source0: openSUSE-appstream-%{version}.tar.xz
|
2018-04-26 13:40:42 +02:00
|
|
|
Source99: libzypp-plugin-appdata-rpmlintrc
|
2021-10-11 19:19:42 +02:00
|
|
|
Patch0: harden_appstream-sync-cache.service.patch
|
2019-03-28 21:46:31 +01:00
|
|
|
# appstreamcli is provided by the AppStream package. Let's pull it in when available, but ignore its absence
|
|
|
|
Recommends: AppStream
|
2018-03-05 15:03:03 +01:00
|
|
|
# appstream-glib >= 0.3.6 is the first to correctly to appstream-util uninstall in /var/cache
|
|
|
|
Requires: appstream-glib >= 0.3.6
|
|
|
|
# appdata hook was introduced in libzypp 14.29.4
|
|
|
|
Requires: libzypp >= 14.29.4
|
2018-03-23 15:03:52 +01:00
|
|
|
# AsHelper is a python program with few dependencies
|
2018-03-27 17:44:06 +02:00
|
|
|
Requires: python3-cmdln
|
2018-03-23 15:03:52 +01:00
|
|
|
Requires: python3-createrepo_c
|
2018-03-27 17:44:06 +02:00
|
|
|
Requires(post): appstream-glib >= 0.3.6
|
|
|
|
# libzypp 16.13.1 was the version gaingin support for ZYPP_PLUGIN_APPDATA_FORCE_COLLECT
|
|
|
|
Requires(post): libzypp >= 16.13.1
|
|
|
|
Requires(post): python3-cmdln
|
|
|
|
Requires(post): python3-createrepo_c
|
|
|
|
Requires(post): zypper
|
2017-06-27 10:44:43 +02:00
|
|
|
# This is one way of providing valid appstream metadata to applications (currently the only implemented one)
|
|
|
|
Provides: appstream-provider
|
2018-03-05 15:03:03 +01:00
|
|
|
BuildArch: noarch
|
2014-11-04 10:01:55 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
This plugin extends libzypp to install AppStream metadata, as extracted from the
|
|
|
|
repository metadata, onto the file system in order to be picked up by
|
|
|
|
software centers.
|
|
|
|
|
2015-04-07 13:50:30 +02:00
|
|
|
%package -n openSUSE-appdata-extra
|
2015-01-23 14:54:24 +01:00
|
|
|
Summary: Additional Appstream Metadata
|
2017-06-28 17:44:36 +02:00
|
|
|
License: CC0-1.0
|
2018-03-05 15:03:03 +01:00
|
|
|
Group: Metapackages
|
2015-01-23 14:54:24 +01:00
|
|
|
|
2015-04-07 13:50:30 +02:00
|
|
|
%description -n openSUSE-appdata-extra
|
2015-01-23 14:54:24 +01:00
|
|
|
This package contains extra appstream metadata to be used by appstream-builder
|
|
|
|
|
2014-11-04 10:01:55 +01:00
|
|
|
%prep
|
2017-06-28 17:44:36 +02:00
|
|
|
%setup -q -n openSUSE-appstream-%{version}
|
2021-10-11 19:19:42 +02:00
|
|
|
%patch0 -p1
|
2014-11-04 10:01:55 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
%install
|
2015-01-23 14:54:24 +01:00
|
|
|
# install the additional appstream metadata
|
2015-04-07 13:50:30 +02:00
|
|
|
install -m 0755 -d %{buildroot}%{_datadir}/appdata-extra
|
|
|
|
cp appdata-extra/*/* %{buildroot}%{_datadir}/appdata-extra/
|
2015-01-23 14:54:24 +01:00
|
|
|
|
2018-03-23 15:03:52 +01:00
|
|
|
# Install AppData zypp plugin
|
2018-04-26 13:40:42 +02:00
|
|
|
install -Dm 0755 InstallAppdata.py %{buildroot}%{_prefix}/lib/zypp/plugins/appdata/InstallAppdata
|
2020-09-05 16:06:21 +02:00
|
|
|
install -Dm 0755 AsHelper.py %{buildroot}%{_prefix}/lib/AsHelper
|
2014-11-04 10:01:55 +01:00
|
|
|
|
2018-04-26 13:40:42 +02:00
|
|
|
# Install zypper helper command
|
|
|
|
install -Dm 0755 zypper-appstream-cache %{buildroot}%{_prefix}/lib/zypper/commands/zypper-appstream-cache
|
|
|
|
|
|
|
|
# Install the systemd service, which triggers when /var/cache/app-info/xmls does not yet exist during a boot
|
|
|
|
install -dm 0755 %{buildroot}%{_unitdir}
|
|
|
|
install -m 0644 appstream-sync-cache.service %{buildroot}%{_unitdir}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun appstream-sync-cache.service
|
|
|
|
|
|
|
|
%pre
|
|
|
|
%service_add_pre appstream-sync-cache.service
|
|
|
|
|
|
|
|
%post
|
|
|
|
%service_add_post appstream-sync-cache.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun appstream-sync-cache.service
|
|
|
|
|
2014-11-04 10:01:55 +01:00
|
|
|
%files
|
|
|
|
# zypp plugin triggering AppData update on repo refresh
|
2015-03-27 16:04:50 +01:00
|
|
|
%dir %{_prefix}/lib/zypp
|
|
|
|
%dir %{_prefix}/lib/zypp/plugins
|
|
|
|
%dir %{_prefix}/lib/zypp/plugins/appdata/
|
2018-04-26 13:40:42 +02:00
|
|
|
%{_prefix}/lib/zypp/plugins/appdata/InstallAppdata
|
|
|
|
%dir %{_prefix}/lib/zypper
|
|
|
|
%dir %{_prefix}/lib/zypper/commands
|
|
|
|
%{_prefix}/lib/zypper/commands/zypper-appstream-cache
|
2020-09-05 16:06:21 +02:00
|
|
|
%{_prefix}/lib/AsHelper
|
2018-04-26 13:40:42 +02:00
|
|
|
%{_unitdir}/appstream-sync-cache.service
|
2014-11-04 10:01:55 +01:00
|
|
|
|
2015-04-07 13:50:30 +02:00
|
|
|
%files -n openSUSE-appdata-extra
|
|
|
|
%{_datadir}/appdata-extra/
|
2015-01-23 14:54:24 +01:00
|
|
|
|
2014-11-04 10:01:55 +01:00
|
|
|
%changelog
|