Blob Blame History Raw
%define gitdate 20170301

Summary:   Cached AppStream metadata
Name:      appstream-data
Version:   7
Release:   %{gitdate}%{?dist}
BuildArch: noarch
License:   CC0 and CC-BY and CC-BY-SA and GFDL
URL:       http://people.redhat.com/rhughes/metadata/
Source1:   http://people.redhat.com/rhughes/metadata/rhel-%{version}-%{gitdate}.xml.gz
Source2:   http://people.redhat.com/rhughes/metadata/rhel-%{version}-%{gitdate}-icons.tar.gz
Source3:   https://raw.githubusercontent.com/hughsie/fedora-appstream/master/appstream-extra/adobe-flash.xml
Source4:   https://raw.githubusercontent.com/hughsie/fedora-appstream/master/appstream-extra/gstreamer-non-free.xml
Source5:   https://raw.githubusercontent.com/hughsie/fedora-appstream/master/appstream-extra/other-repos.xml

# specially prepared for RHEL
Source6:   ibus.xml
Source7:   fonts.xml.gz
Source8:   fonts-icons.tar.gz

# extra applications not in RHEL
Source9:   http://people.redhat.com/rhughes/metadata/epel-%{version}-%{gitdate}.xml.gz
Source10:  http://people.redhat.com/rhughes/metadata/epel-%{version}-%{gitdate}-icons.tar.gz

# This is built using:
# sshfs user@host:/media/bulk/mirror/RHEL /media/mirror/
# reposync -r rhel-7.4-candidate -p /media/mirror/
# https://github.com/hughsie/appstream-scripts/blob/master/rhel/rhel-7.4-candidate.sh
#
# For a long time (but not long enough to be older than the original release of
# RHEL 7) we require applications to ship with AppData files if they want to
# show up in the software center.
#
# Do avoid dropping important apps without .appdata.xml files we will grab
# metadata from Fedora 23,24,25 for the missing components.
#
# So we never drop applications from one RHEL release to the next we'll also do:
#
# appstream-util merge-appstream rhel-7-new.xml.gz old/rhel-7.xml.gz new/rhel-7.xml.gz
# appstream-util merge-appstream epel-7-new.xml.gz old/epel-7.xml.gz new/epel-7.xml.gz
#
# ...and then you must manually MERGE the icon tarballs rather than replacing
# the tarball with the generated copy.
#
# You can also verify what was added or removed using:
# appstream-util compare old/epel-7.xml.gz new/epel-7.xml.gz

BuildRequires: libappstream-glib

%description
This package provides the distribution specific AppStream metadata required
for the GNOME and KDE software centers.

%install

# we can't use `install-origin` as appstream-glib in RHEL is too old, and the
# tarball name has to match the origin :/
cp %{SOURCE1} rhel-%{version}.xml.gz
cp %{SOURCE2} rhel-%{version}-icons.tar.gz
cp %{SOURCE9} epel-%{version}.xml.gz
cp %{SOURCE10} epel-%{version}-icons.tar.gz

DESTDIR=%{buildroot} appstream-util install rhel-%{version}.xml.gz rhel-%{version}-icons.tar.gz
DESTDIR=%{buildroot} appstream-util install epel-%{version}.xml.gz epel-%{version}-icons.tar.gz
DESTDIR=%{buildroot} appstream-util install \
	%{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8}

# work around the not-yet-in-rhel install-origin
mv %{buildroot}/usr/share/app-info/icons/fonts/64x64/* %{buildroot}/usr/share/app-info/icons/rhel-%{version}/64x64/
rmdir %{buildroot}/usr/share/app-info/icons/fonts/64x64
rmdir %{buildroot}/usr/share/app-info/icons/fonts

%files
%attr(0644,root,root) %{_datadir}/app-info/xmls/*
%{_datadir}/app-info/icons/rhel-%{version}/*/*.png
%{_datadir}/app-info/icons/epel-%{version}/*/*.png
%dir %{_datadir}/app-info
%dir %{_datadir}/app-info/icons
%dir %{_datadir}/app-info/icons/rhel-%{version}/64x64
%dir %{_datadir}/app-info/icons/rhel-%{version}/128x128
%dir %{_datadir}/app-info/icons/epel-%{version}/64x64
%dir %{_datadir}/app-info/icons/epel-%{version}/128x128
%dir %{_datadir}/app-info/xmls

%changelog
* Wed Mar 01 2017 Richard Hughes <richard@hughsie.com> 7-20170301
- Rename the generated metadata files to placate RPMDiff.
- Resolves: RHBZ#1386778

* Wed Mar 01 2017 Richard Hughes <richard@hughsie.com> 7-7
- Regenerate the RHEL metadata using rhel-7.4-candidate
- Resolves: RHBZ#1386778

* Wed Jul 29 2015 Richard Hughes <richard@hughsie.com> 7-6
- Use a Red Hat screenshot mirror location
- Resolves: #1237362

* Thu Jun 18 2015 Richard Hughes <richard@hughsie.com> 7-5
- Do not duplicate the RHEL-7 icons in EPEL-7
- Resolves: #1184202

* Thu Jun 18 2015 Richard Hughes <richard@hughsie.com> 7-4
- Add the applications from EPEL 7
- Resolves: #1184202

* Wed Jun 17 2015 Richard Hughes <richard@hughsie.com> 7-3
- Add the missing GStreamer, fonts and IBus metadata
- Resolves: #1184202

* Tue Jun 16 2015 Richard Hughes <richard@hughsie.com> 7-2
- Regenerate the RHEL metadata using rhel-7.2-candidate
- Ship HiDPI icons
- Resolves: #1184202

* Thu Oct 29 2014 Richard Hughes <richard@hughsie.com> 7-1
- Initial metadata version
- Resolves: #1184202