%global fontname smc-raghumalayalamsans
%global fontconf 67-%{fontname}.conf
Name: %{fontname}-fonts
Version: 2.1.2
Release: 4%{?dist}
Epoch: 1
Summary: Open Type Fonts for Malayalam script
License: GPLv2+
URL: https://gitlab.com/smc/fonts/raghumalayalamsans
Source0: %{url}/-/archive/Version%{version}/raghumalayalamsans-Version%{version}.tar.gz
Source1: %{fontname}-fontconfig.conf
Source2: %{fontname}.metainfo.xml
Source3: %{name}-generate.pe
BuildArch: noarch
BuildRequires: fontpackages-devel
BuildRequires: libappstream-glib
BuildRequires: fontforge
BuildRequires: python3
Requires: fontpackages-filesystem
Obsoletes: smc-raghumalayalam-fonts < 6.1-11
Obsoletes: smc-fonts-common < 6.1-11
%description
RaghuMalayalam is the name of a digital font - a typeface in
Malayalam Script to be used for composing text in Malayalam language.
It has been originally designed in Open Type Format with Unicode standards
and reordering as well as combining characters according to the visual
syllable standard of IndiX Compugraphy.
%prep
%autosetup -n raghumalayalamsans-Version%{version}
chmod 644 *.txt
cp -p %{SOURCE1} .
cp -p %{SOURCE2} .
cp -p %{SOURCE3} .
chmod 755 %{name}-generate.pe
%build
./%{name}-generate.pe *.sfd
%install
install -m 0755 -d %{buildroot}%{_fontdir}
install -m 0644 -p *.ttf %{buildroot}%{_fontdir}
install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
%{buildroot}%{_fontconfig_confdir}
install -m 0644 -p %{SOURCE1} \
%{buildroot}%{_fontconfig_templatedir}/%{fontconf}
install -Dm 0644 -p %{SOURCE2} \
%{buildroot}%{_datadir}/metainfo/%{fontname}.metainfo.xml
ln -s %{_fontconfig_templatedir}/%{fontconf} \
%{buildroot}%{_fontconfig_confdir}/%{fontconf}
%check
appstream-util validate-relax --nonet \
%{buildroot}%{_datadir}/metainfo/%{fontname}.metainfo.xml
%_font_pkg -f %{fontconf} *.ttf
%doc README
%license LICENSE.txt
%{_datadir}/metainfo/%{fontname}.metainfo.xml
%changelog
* Wed Jul 24 2019 Vishal Vijayraghavan <vishalvijayraghavan@gmail.com> - 1:2.1.2-4
- Font CI test added
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Jan 15 2019 Vishal Vijayraghavan <vishalvijayraghavan@gmail.com> - 1:2.1.2-2
- Updated License in metainfo and spec cleanup
* Wed Nov 28 2018 Vishal Vijayraghavan <vishalvijayraghavan@gmail.com> - 1:2.1.2-1
- first release of smc-raghumalayalamsans fonts