[mgopen-fonts] Add metainfo file to show this font in gnome-software
Parag Nemade
pnemade at fedoraproject.org
Fri Nov 7 01:20:39 UTC 2014
commit d924723cb936076e04ca1dd33d52577378225571
Author: Parag Nemade <pnemade at redhat.com>
Date: Fri Nov 7 06:50:27 2014 +0530
Add metainfo file to show this font in gnome-software
- Change %define to %global
- Remove %clean section which is optional now
- Remove buildroot which is optional now
- Remove %defattr
- Remove group tag
mgopen-fonts.spec | 61 +++++++++++++++++++++++++++++++++--------------------
1 files changed, 38 insertions(+), 23 deletions(-)
---
diff --git a/mgopen-fonts.spec b/mgopen-fonts.spec
index bdfb787..6d7fb82 100644
--- a/mgopen-fonts.spec
+++ b/mgopen-fonts.spec
@@ -1,15 +1,15 @@
-%define fontname mgopen
-%define fontconf 61-%{fontname}
-%define archivename MgOpen
-%define upstream_date 20050515
+%global fontname mgopen
+%global fontconf 61-%{fontname}
+%global archivename MgOpen
+%global upstream_date 20050515
# Common description
-%define common_desc The MgOpen fonts are a font family that includes Latin and Greek glyphs.\
+%global common_desc The MgOpen fonts are a font family that includes Latin and Greek glyphs.\
The fonts have been released under a liberal license, similar to the\
license covering the Bitstream Vera fonts.
# Compat description
-%define compat_desc \
+%global compat_desc \
This package only exists to help transition pre Fedora 11 MgOpen font users to\
the new package split. It will be removed after one distribution release cycle,\
please do not reference it or depend on it in any way.\
@@ -19,9 +19,9 @@ It can be safely uninstalled.
Name: %{fontname}-fonts
Version: 0.%{upstream_date}
-Release: 22%{?dist}
+Release: 23%{?dist}
Summary: Truetype greek fonts
-Group: User Interface/X
+
License: MgOpen
URL: http://www.ellak.gr/fonts/mgopen/
Source0: %{archivename}-%{upstream_date}.tar.gz
@@ -31,7 +31,12 @@ Source1: %{archivename}-%{upstream_date}-doc.tar.gz
# The LICENCE file is an excerpt from the html page
Source2: %{fontname}-fontconfig.tar.gz
# Tarball of fontconfig files for each font
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+Source3: %{fontname}.metainfo.xml
+Source4: %{fontname}-canonica.metainfo.xml
+Source5: %{fontname}-cosmetica.metainfo.xml
+Source6: %{fontname}-modata.metainfo.xml
+Source7: %{fontname}-moderna.metainfo.xml
+
BuildArch: noarch
BuildRequires: fontpackages-devel
%description
@@ -40,7 +45,6 @@ BuildRequires: fontpackages-devel
%package common
Summary: Truetype greek fonts, common files (documentation…)
-Group: User Interface/X
Requires: fontpackages-filesystem
%description common
%common_desc
@@ -50,7 +54,6 @@ This package consists of files used by other MgOpen packages.
%package compat
Summary: Truetype greek fonts, compatibility package
-Group: User Interface/X
Obsoletes: mgopen-fonts < 0.20050515-8
Requires: %{fontname}-canonica-fonts, %{fontname}-cosmetica-fonts,
Requires: %{fontname}-modata-fonts, %{fontname}-moderna-fonts
@@ -62,7 +65,6 @@ Requires: %{fontname}-modata-fonts, %{fontname}-moderna-fonts
%package -n %{fontname}-canonica-fonts
Summary: Truetype variable-stroke-width serif font faces
-Group: User Interface/X
Requires: %{name}-common = %{version}-%{release}
%description -n %{fontname}-canonica-fonts
%common_desc
@@ -70,7 +72,7 @@ This package contains the MgOpen Canonica serif variable-stroke-width typeface,
which is based on the design of Times Roman.
%_font_pkg -n canonica -f %{fontconf}-canonica.conf MgOpenCanonica*.ttf
-
+%{_datadir}/appdata/%{fontname}-canonica.metainfo.xml
%package -n %{fontname}-cosmetica-fonts
@@ -83,7 +85,7 @@ This package contains the MgOpen Cosmetica sans serif variable-stroke-width
typeface, which is based on the design of Optima.
%_font_pkg -n cosmetica -f %{fontconf}-cosmetica.conf MgOpenCosmetica*.ttf
-
+%{_datadir}/appdata/%{fontname}-cosmetica.metainfo.xml
%package -n %{fontname}-modata-fonts
@@ -96,7 +98,7 @@ This package contains the MgOpen Modata sans serif fixed-stroke-width
which is based on the design of VAG rounded.
%_font_pkg -n modata -f %{fontconf}-modata.conf MgOpenModata*.ttf
-
+%{_datadir}/appdata/%{fontname}-modata.metainfo.xml
%package -n %{fontname}-moderna-fonts
@@ -109,7 +111,7 @@ This package contains the MgOpen Moderna sans serif fixed-stroke-width
typeface which is based on the design of Helvetica.
%_font_pkg -n moderna -f %{fontconf}-moderna.conf MgOpenModerna*.ttf
-
+%{_datadir}/appdata/%{fontname}-moderna.metainfo.xml
%prep
@@ -143,20 +145,33 @@ for fconf in %{fontconf}-canonica.conf \
%{buildroot}%{_fontconfig_confdir}/$fontconf
done
-
-%clean
-rm -rf %{buildroot}
-
+# Add AppStream metadata
+install -Dm 0644 -p %{SOURCE3} \
+ %{buildroot}%{_datadir}/appdata/%{fontname}.metainfo.xml
+install -Dm 0644 -p %{SOURCE4} \
+ %{buildroot}%{_datadir}/appdata/%{fontname}-canonica.metainfo.xml
+install -Dm 0644 -p %{SOURCE5} \
+ %{buildroot}%{_datadir}/appdata/%{fontname}-cosmetica.metainfo.xml
+install -Dm 0644 -p %{SOURCE6} \
+ %{buildroot}%{_datadir}/appdata/%{fontname}-modata.metainfo.xml
+install -Dm 0644 -p %{SOURCE6} \
+ %{buildroot}%{_datadir}/appdata/%{fontname}-moderna.metainfo.xml
%files common
-%defattr(0644,root,root,0755)
%doc LICENCE mgopen.html _files/
-%dir %{_fontdir}
-
+%{_datadir}/appdata/%{fontname}.metainfo.xml
%files compat
%changelog
+* Thu Nov 06 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.20050515-23
+- Add metainfo file to show this font in gnome-software
+- Change %%define to %%global
+- Remove %%clean section which is optional now
+- Remove buildroot which is optional now
+- Remove %%defattr
+- Remove group tag
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.20050515-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
More information about the scm-commits
mailing list