updated lohit-marathi to new fonts packaging guidelines

This commit is contained in:
sudip 2023-05-15 16:02:51 +05:30
parent 0c62e25931
commit 6cfb34bcdc
2 changed files with 63 additions and 33 deletions

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<match>
<test name="lang" compare="contains">
<string>mr</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Lohit Marathi</string>
</edit>
</match>
<match target="font">
<test name="family" compare="eq">
<string>Lohit Marathi</string>
</test>
<edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
</match>
<alias>
<family>Lohit Marathi</family>
<default>
<family>sans-serif</family>
</default>
</alias>
</fontconfig>

View File

@ -1,55 +1,53 @@
%global fontname lohit-marathi
%global fontconf 65-0-%{fontname}.conf
%global metainfo io.pagure.lohit.marathi.font.metainfo
Name: %{fontname}-fonts
Version: 2.94.2
Release: 16%{?dist}
Summary: Free truetype font for Marathi language
Version: 2.94.2
Release: 17%{?dist}
URL: https://github.com/lohit-fonts/lohit-marathi-fonts
License: OFL
URL: https://pagure.io/lohit
Source0: https://releases.pagure.org/lohit/%{fontname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: fontforge
BuildRequires: fontpackages-devel
BuildRequires: python3-devel
BuildRequires: make
Requires: fontpackages-filesystem
%global foundry Lohit
%global fontlicense OFL-1.1
%global fontlicenses OFL.txt COPYRIGHT
%global fontdocs AUTHORS README ChangeLog test-marathi.txt
%description
%global fontfamily Lohit Marathi
%global fontsummary Free truetype font for Marathi language
%global fonts *.ttf
%global fontconfs %{SOURCE10}
%global fontdescription %{expand:
This package provides a free Marathi truetype/opentype font.
}
BuildRequires: make
BuildRequires: fontforge
Source0: https://releases.pagure.org/lohit/%{fontname}-%{version}.tar.gz
Source10: 65-0-%{fontpkgname}.conf
%fontpkg
%prep
%setup -q -n %{fontname}-%{version}
%linuxtext OFL.txt AUTHORS README ChangeLog COPYRIGHT test-marathi.txt
%build
make ttf %{?_smp_mflags}
%fontbuild
%install
install -m 0755 -d %{buildroot}%{_fontdir}
install -m 0644 -p *.ttf %{buildroot}%{_fontdir}
%fontinstall
install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
%{buildroot}%{_fontconfig_confdir}
%check
%fontcheck
install -m 0644 -p %{fontconf} \
%{buildroot}%{_fontconfig_templatedir}/%{fontconf}
ln -s %{_fontconfig_templatedir}/%{fontconf} \
%{buildroot}%{_fontconfig_confdir}/%{fontconf}
%fontfiles
# Add AppStream metadata
install -Dm 0644 -p %{metainfo}.xml \
%{buildroot}%{_datadir}/metainfo/%{metainfo}.xml
%_font_pkg -f %{fontconf} *.ttf
%doc ChangeLog COPYRIGHT AUTHORS README test-marathi.txt
%license OFL.txt
%{_datadir}/metainfo/%{metainfo}.xml
%changelog
* Mon May 15 2023 Sudip Shil <sshil@redhat.com> - 2.94.2-17
- Convert to new fonts packaging guidelines
- Update the fonts package
- https://fedoraproject.org/wiki/Changes/New_Fonts_Packaging
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.94.2-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild