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
This commit is contained in:
Parag Nemade 2014-11-07 06:51:02 +05:30
parent 4de6a53c3d
commit 885fd117c3

View File

@ -3,9 +3,9 @@
Name: %{fontname}-fonts Name: %{fontname}-fonts
Version: 20120503 Version: 20120503
Release: 9%{?dist} Release: 10%{?dist}
Summary: Free UCS Outline Fonts Summary: Free UCS Outline Fonts
Group: User Interface/X
# Standard font exception # Standard font exception
License: GPLv3+ with exceptions License: GPLv3+ with exceptions
URL: http://www.gnu.org/software/freefont/ 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 Source2: %{fontconf}-mono.conf
Source3: %{fontconf}-sans.conf Source3: %{fontconf}-sans.conf
Source4: %{fontconf}-serif.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 Patch0: gnu-free-fonts-devanagari-rendering.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch BuildArch: noarch
BuildRequires: fontpackages-devel fontforge BuildRequires: fontpackages-devel fontforge
@ -85,8 +90,6 @@ This package contains the GNU FreeFont serif font.
make make
%install %install
rm -rf %{buildroot}
pushd sfd pushd sfd
install -m 0755 -d %{buildroot}%{_fontdir} install -m 0755 -d %{buildroot}%{_fontdir}
install -p -m 644 *.ttf %{buildroot}%{_fontdir} install -p -m 644 *.ttf %{buildroot}%{_fontdir}
@ -111,18 +114,36 @@ for fconf in %{fontconf}-mono.conf \
%{buildroot}%{_fontconfig_confdir}/$fconf %{buildroot}%{_fontconfig_confdir}/$fconf
done done
%clean # Add AppStream metadata
rm -rf %{buildroot} 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 %_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 %_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 %_font_pkg -n serif -f %{fontconf}-serif.conf FreeSerif*.ttf
%{_datadir}/appdata/%{fontname}-serif.metainfo.xml
%files common %files common
%defattr(0644,root,root,0755)
%doc AUTHORS ChangeLog CREDITS COPYING README %doc AUTHORS ChangeLog CREDITS COPYING README
%{_datadir}/appdata/%{fontname}.metainfo.xml
%changelog %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@lists.fedoraproject.org> - 20120503-9 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20120503-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild