[lato-fonts] Split out the metainfo file to a file

Richard Hughes rhughes at fedoraproject.org
Thu Oct 16 18:42:14 UTC 2014


commit 2f98cc965542986ebb3fdba9260de966b22910d8
Author: Richard Hughes <richard at hughsie.com>
Date:   Thu Oct 16 19:41:23 2014 +0100

    Split out the metainfo file to a file

 lato-fonts.spec   |   24 ++++--------------------
 lato.metainfo.xml |   16 ++++++++++++++++
 2 files changed, 20 insertions(+), 20 deletions(-)
---
diff --git a/lato-fonts.spec b/lato-fonts.spec
index ddffbf6..fee455a 100644
--- a/lato-fonts.spec
+++ b/lato-fonts.spec
@@ -12,6 +12,7 @@ URL:            http://www.latofonts.com/
 # Fonts retrieved 2014-09-04 from http://www.latofonts.com/download/Lato2OFL.zip
 Source0:        %{name}-%{version}.zip
 Source1:        %{name}-fontconfig.conf
+Source2:        %{fontname}.metainfo.xml
 
 BuildArch:      noarch
 BuildRequires:  fontpackages-devel
@@ -65,29 +66,12 @@ install -m 0644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_fontconfig_templatedir}/%{fontco
 ln -s %{_fontconfig_templatedir}/%{fontconf} $RPM_BUILD_ROOT%{_fontconfig_confdir}/%{fontconf}
 
 # Add AppStream metadata
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
-cat > $RPM_BUILD_ROOT%{_datadir}/appdata/Lato.metainfo.xml <<EOF
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright 2014 Richard Hughes <richard at hughsie.com> -->
-<component type="font">
-  <id>Lato</id>
-  <metadata_license>CC0-1.0</metadata_license>
-  <name>Lato</name>
-  <summary>A classical sans-serif font family</summary>
-  <description>
-    <p>
-      The semi-rounded details of the letters give Lato a feeling of warmth,
-      while the strong structure provides stability and seriousness.
-    </p>
-  </description>
-  <updatecontact>richard_at_hughsie_dot_com</updatecontact>
-  <url type="homepage">http://www.latofonts.com/</url>
-</component>
-EOF
+install -Dm 0644 -p %{SOURCE2} \
+        %{buildroot}%{_datadir}/appdata/%{fontname}.metainfo.xml
 
 %_font_pkg -f %{fontconf} *.ttf
 %doc Lato2OFL/{OFL.txt,README.txt}
-%{_datadir}/appdata/Lato.metainfo.xml
+%{_datadir}/appdata/%{fontname}.metainfo.xml
 
 
 %changelog
diff --git a/lato.metainfo.xml b/lato.metainfo.xml
new file mode 100644
index 0000000..2196aee
--- /dev/null
+++ b/lato.metainfo.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2014 Richard Hughes <richard at hughsie.com> -->
+<component type="font">
+  <id>lato</id>
+  <metadata_license>CC0-1.0</metadata_license>
+  <name>Lato</name>
+  <summary>A classical sans-serif font family</summary>
+  <description>
+    <p>
+      The semi-rounded details of the letters give Lato a feeling of warmth,
+      while the strong structure provides stability and seriousness.
+    </p>
+  </description>
+  <updatecontact>richard_at_hughsie_dot_com</updatecontact>
+  <url type="homepage">http://www.latofonts.com/</url>
+</component>


More information about the fonts-bugs mailing list