| |
@@ -5,10 +5,12 @@
|
| |
%global common_font_desc \
|
| |
<FONT COLLECTION DESCRIPTION: ②>
|
| |
|
| |
- Source1: %{name}-<FAMILY>-fontconfig.conf
|
| |
+ Source1: %{name}-<FAMILYX>-fontconfig.conf
|
| |
+ Source2: %{fontname}-<FAMILYX>.metainfo.xml
|
| |
# …
|
| |
|
| |
BuildRequires: fontpackages-devel
|
| |
+ BuildRequires: libappstream-glib
|
| |
|
| |
%description
|
| |
%common_font_desc
|
| |
@@ -16,7 +18,6 @@
|
| |
|
| |
%package fonts-common
|
| |
Summary: Common files of <NAME>
|
| |
- Group: User Interface/X
|
| |
BuildArch: noarch
|
| |
Requires: fontpackages-filesystem
|
| |
|
| |
@@ -27,25 +28,25 @@
|
| |
|
| |
|
| |
# Repeat for every font family ③
|
| |
- %package <FAMILY>-fonts
|
| |
+ %package <FAMILYX>-fonts
|
| |
Summary:
|
| |
- Group: User Interface/X
|
| |
BuildArch: noarch
|
| |
Requires: %{name}-fonts-common = %{version}-%{release}
|
| |
|
| |
- %description -n %{fontname}-<FAMILY>-fonts
|
| |
+ %description -n %{fontname}-<FAMILYX>-fonts
|
| |
%common_font_desc
|
| |
|
| |
- <FAMILY DESCRIPTION>
|
| |
+ <FAMILYX DESCRIPTION>
|
| |
|
| |
- %_font_pkg -n <FAMILY> -f %{fontconf}-<FAMILY>.conf <NAME>*.ttf
|
| |
+ %_font_pkg -n <FAMILYX> -f %{fontconf}-<FAMILYX>.conf <NAME>*.ttf
|
| |
|
| |
%doc <FONT DOCUMENTATION>
|
| |
+ %license add-license-file-here
|
| |
+ %{_datadir}/metainfo/%{fontname}-<FAMILYX>.metainfo.xml
|
| |
|
| |
# …
|
| |
|
| |
%install
|
| |
- rm -fr %{buildroot}
|
| |
|
| |
# …
|
| |
|
| |
@@ -66,11 +67,22 @@
|
| |
%{buildroot}%{_fontconfig_confdir}/$fconf
|
| |
done
|
| |
|
| |
+ # Add AppStream metadata file, Repeat for every font family
|
| |
+ install -Dm 0644 -p %{SOURCEX} \
|
| |
+ %{buildroot}%{_datadir}/metainfo/%{fontname}-<FAMILYX>.metainfo.xml
|
| |
+
|
| |
+ # …
|
| |
+
|
| |
+ %check
|
| |
+ # Repeat for every font family
|
| |
+ appstream-util validate-relax --nonet \
|
| |
+ %{buildroot}%{_datadir}/metainfo/%{fontname}-<FAMILYX>.metainfo.xml
|
| |
+
|
| |
# …
|
| |
|
| |
%files common
|
| |
- %defattr(0644,root,root,0755)
|
| |
%doc <FONT DOCUMENTATION>
|
| |
+ %license add-license-file-here
|
| |
|
| |
# …
|
| |
|
| |
Here I have tried to update the fonts spec file templates according to current packaging guidelines.