[gnu-free-fonts] Add metainfo file to show this font in gnome-software

Parag Nemade pnemade at fedoraproject.org
Fri Nov 7 01:21:15 UTC 2014


commit 885fd117c362583c3f3a55aecc0e1ab1359209fd
Author: Parag Nemade <pnemade at redhat.com>
Date:   Fri Nov 7 06:51:02 2014 +0530

    Add metainfo file to show this font in gnome-software
    
    - Remove %clean section which is optional now
    - Remove buildroot which is optional now
    - Remove removal of buildroot in %install
    - Remove %defattr
    - Remove group tag

 gnu-free-fonts.spec |   37 +++++++++++++++++++++++++++++--------
 1 files changed, 29 insertions(+), 8 deletions(-)
---
diff --git a/gnu-free-fonts.spec b/gnu-free-fonts.spec
index b73ec90..c31ce7b 100644
--- a/gnu-free-fonts.spec
+++ b/gnu-free-fonts.spec
@@ -3,9 +3,9 @@
 
 Name:      %{fontname}-fonts
 Version:   20120503
-Release:   9%{?dist}
+Release:   10%{?dist}
 Summary:   Free UCS Outline Fonts
-Group:     User Interface/X
+
 # Standard font exception
 License:   GPLv3+ with exceptions
 URL:       http://www.gnu.org/software/freefont/ 
@@ -13,8 +13,13 @@ Source0:   http://ftp.gnu.org/gnu/freefont/freefont-src-%{version}.tar.gz
 Source2:   %{fontconf}-mono.conf
 Source3:   %{fontconf}-sans.conf
 Source4:   %{fontconf}-serif.conf
+Source5:   %{fontname}.metainfo.xml
+Source6:   %{fontname}-mono.metainfo.xml
+Source7:   %{fontname}-sans.metainfo.xml
+Source8:   %{fontname}-serif.metainfo.xml
+
 Patch0:    gnu-free-fonts-devanagari-rendering.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
 BuildArch: noarch
 BuildRequires: fontpackages-devel fontforge
 
@@ -85,8 +90,6 @@ This package contains the GNU FreeFont serif font.
 make
 
 %install
-rm -rf %{buildroot}
-
 pushd sfd
 install -m 0755 -d %{buildroot}%{_fontdir}
 install -p -m 644 *.ttf  %{buildroot}%{_fontdir}
@@ -111,18 +114,36 @@ for fconf in %{fontconf}-mono.conf \
         %{buildroot}%{_fontconfig_confdir}/$fconf
 done
 
-%clean
-rm -rf %{buildroot}
+# Add AppStream metadata
+install -Dm 0644 -p %{SOURCE5} \
+        %{buildroot}%{_datadir}/appdata/%{fontname}.metainfo.xml
+install -Dm 0644 -p %{SOURCE6} \
+        %{buildroot}%{_datadir}/appdata/%{fontname}-mono.metainfo.xml
+install -Dm 0644 -p %{SOURCE7} \
+        %{buildroot}%{_datadir}/appdata/%{fontname}-sans.metainfo.xml
+install -Dm 0644 -p %{SOURCE8} \
+        %{buildroot}%{_datadir}/appdata/%{fontname}-serif.metainfo.xml
 
 %_font_pkg -n mono -f %{fontconf}-mono.conf FreeMono*.ttf
+%{_datadir}/appdata/%{fontname}-mono.metainfo.xml
 %_font_pkg -n sans -f %{fontconf}-sans.conf FreeSans*.ttf
+%{_datadir}/appdata/%{fontname}-sans.metainfo.xml
 %_font_pkg -n serif -f %{fontconf}-serif.conf FreeSerif*.ttf
+%{_datadir}/appdata/%{fontname}-serif.metainfo.xml
 
 %files common
-%defattr(0644,root,root,0755)
 %doc AUTHORS ChangeLog CREDITS COPYING README
+%{_datadir}/appdata/%{fontname}.metainfo.xml
 
 %changelog
+* Thu Nov 06 2014 Parag Nemade <pnemade AT redhat DOT com> - 20120503-10
+- Add metainfo file to show this font in gnome-software
+- Remove %%clean section which is optional now
+- Remove buildroot which is optional now
+- Remove removal of buildroot in %%install
+- Remove %%defattr
+- Remove group tag
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 20120503-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list