[dustin-dustismo-fonts] Add metainfo file to show this font in gnome-software

Parag Nemade pnemade at fedoraproject.org
Fri Nov 7 09:19:17 UTC 2014


commit 7851fbba41bbe65810be83ef22ea9339df07a57d
Author: Parag Nemade <pnemade at redhat.com>
Date:   Fri Nov 7 14:49:05 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
    - Change %define to %global

 dustin-dustismo-fonts.spec |   41 ++++++++++++++++++++++++++---------------
 1 files changed, 26 insertions(+), 15 deletions(-)
---
diff --git a/dustin-dustismo-fonts.spec b/dustin-dustismo-fonts.spec
index 9e6d9cc..564fd88 100644
--- a/dustin-dustismo-fonts.spec
+++ b/dustin-dustismo-fonts.spec
@@ -1,15 +1,14 @@
-%define fontname dustin-dustismo
-%define fontconf 63-%{fontname}
+%global fontname dustin-dustismo
+%global fontconf 63-%{fontname}
 
-%define common_desc General purpose fonts by Dustin Norlander available in \
+%global common_desc General purpose fonts by Dustin Norlander available in \
 serif and sans-serif versions. The fonts cover all European Latin characters.
 
 Name:          %{fontname}-fonts
 Version:       20030318
-Release:       11%{?dist}
+Release:       12%{?dist}
 Summary:       General purpose sans-serif font with bold, italic and bold-italic variations
 
-Group:         User Interface/X
 License:       GPLv2+
 URL:           http://www.dustismo.com
 # Actual download URL
@@ -17,7 +16,9 @@ URL:           http://www.dustismo.com
 Source0:       Dustismo.zip
 Source1:       %{name}-sans-fontconfig.conf
 Source2:       %{name}-roman-fontconfig.conf
-BuildRoot:     %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+Source3:       %{fontname}.metainfo.xml
+Source4:       %{fontname}-sans.metainfo.xml
+Source5:       %{fontname}-roman.metainfo.xml
 
 BuildArch:     noarch
 BuildRequires: fontpackages-devel
@@ -27,7 +28,6 @@ BuildRequires: fontpackages-devel
 
 %package common
 Summary:       Common files for %{name}
-Group:         User Interface/X
 Requires:      fontpackages-filesystem
 
 %description common
@@ -37,7 +37,6 @@ This package consists of files used by other %{name} packages.
 
 %package -n %{fontname}-sans-fonts
 Summary:       General purpos sans-serif fonts
-Group:         User Interface/X
 Requires:      %{name}-common = %{version}-%{release}
 Provides:      %{name} = 20030318-3
 Obsoletes:     %{name} < 20030318-3
@@ -48,10 +47,10 @@ Obsoletes:     %{name} < 20030318-3
 General purpose sans-serif font with bold, italic and bold-italic variations
 
 %_font_pkg -n sans -f %{fontconf}-sans.conf dustismo_bold_italic.ttf dustismo_bold.ttf dustismo_italic.ttf Dustismo.ttf
+%{_datadir}/appdata/%{fontname}-sans.metainfo.xml
 
 %package -n %{fontname}-roman-fonts
 Summary:       General purpose serif font
-Group:         User Interface/X
 Requires:      %{name}-common = %{version}-%{release}
 Provides:      %{name}-roman = 20030318-3
 Obsoletes:     %{name}-roman < 20030318-3
@@ -62,6 +61,7 @@ Obsoletes:     %{name}-roman < 20030318-3
 General purpose serif font with bold, italic and bold-italic variations
 
 %_font_pkg -n roman -f %{fontconf}-roman.conf Dustismo_Roman_Bold.ttf Dustismo_Roman.ttf Dustismo_Roman_Italic_Bold.ttf Dustismo_Roman_Italic.ttf      
+%{_datadir}/appdata/%{fontname}-roman.metainfo.xml
 
 %prep
 %setup -q -c %{name}
@@ -70,8 +70,6 @@ sed -i 's/\r//' license.txt
 %build
 
 %install
-rm -rf $RPM_BUILD_ROOT
-
 install -m 0755 -d %{buildroot}%{_fontdir}
 install -m 0644 -p *.ttf %{buildroot}%{_fontdir}
 
@@ -84,16 +82,29 @@ for fontconf in %{fontconf}-sans.conf %{fontconf}-roman.conf ; do
   ln -s %{_fontconfig_templatedir}/$fontconf %{buildroot}%{_fontconfig_confdir}/$fontconf
 done
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+# Add AppStream metadata
+install -Dm 0644 -p %{SOURCE1} \
+        %{buildroot}%{_datadir}/appdata/%{fontname}.metainfo.xml
+install -Dm 0644 -p %{SOURCE2} \
+        %{buildroot}%{_datadir}/appdata/%{fontname}-sans.metainfo.xml
+install -Dm 0644 -p %{SOURCE3} \
+        %{buildroot}%{_datadir}/appdata/%{fontname}-roman.metainfo.xml
 
 %files common
-%defattr(0644,root,root,0755)
 %doc license.txt
+%{_datadir}/appdata/%{fontname}.metainfo.xml
 
-%dir %{_fontdir}
 
 %changelog
+* Fri Nov 07 2014 Parag Nemade <pnemade AT redhat DOT com> - 20030318-12
+- 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
+- Change %%define to %%global
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 20030318-11
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the fonts-bugs mailing list