sil-gentium-basic-fonts/sil-gentium-basic-fonts.spec

98 lines
2.9 KiB
RPMSpec

%define fontdir %{_datadir}/sil-gentium-basic
%define pkgver %(echo %version | tr -d .)
Name: sil-gentium-basic-fonts
Version: 1.102
Release: 1mamba
Summary: Gentium Basic Font Family from SIL
Group: System/Fonts
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://software.sil.org/gentium/
Source0: https://software.sil.org/downloads/r/gentium/GentiumBasic_%{pkgver}.zip
Source1: 59-sil-gentium-basic.conf
Source2: 59-sil-gentium-basic-book.conf
License: SIL Open Font License
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
BuildRequires: mkfontdir
BuildRequires: ttmkfdir
%description
Gentium Basic and Gentium Book Basic are font families based on the original Gentium design, but with additional weights. Both families come with a complete regular, bold, italic and bold italic set of fonts.
These "Basic" fonts support only the Basic Latin and Latin-1 Supplement Unicode ranges, plus a selection of the more commonly used extended Latin characters, with miscellaneous diacritical marks, symbols and punctuation.
%prep
%setup -q -n GentiumBasic_%{pkgver}
# build require FontLab tools http://www.fontlab.com/about/
rm -rf Sources
for txt in *.txt ; do
fold -s $txt > $txt.new
sed -i 's/\r//' $txt.new
touch -r $txt $txt.new
mv $txt.new $txt
done
iconv -f iso-8859-1 -t utf-8 GENTIUM-FAQ.txt -o GENTIUM-FAQ.txt_
touch -r GENTIUM-FAQ.txt GENTIUM-FAQ.txt_
mv GENTIUM-FAQ.txt_ GENTIUM-FAQ.txt
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d %{buildroot}%{fontdir} %{buildroot}%{_sysconfdir}/fonts/{conf.d,conf.avail}
install -m0644 *.ttf %{buildroot}%{fontdir}/
install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/fonts/conf.avail/59-sil-gentium-basic.conf
install -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/fonts/conf.avail/59-sil-gentium-basic-book.conf
pushd %{buildroot}%{_sysconfdir}/fonts/conf.avail
for f in *.conf; do
ln -s ../conf.avail/$f ../conf.d/$f
done
popd
ttmkfdir -d %{buildroot}%{fontdir} -o %{buildroot}%{fontdir}/fonts.scale
mkfontdir %{buildroot}%{fontdir}
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache %{_datadir}/fonts
fi
:
%postun
if [ "$1" = "0" ]; then
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache %{_datadir}/fonts
fi
fi
:
%files
%defattr(-,root,root)
%{_sysconfdir}/fonts/conf.avail/*gentium-basic*.conf
%{_sysconfdir}/fonts/conf.d/*gentium-basic*.conf
%dir %{fontdir}
%{fontdir}/GenB*.ttf
%{fontdir}/fonts.dir
%{fontdir}/fonts.scale
%doc FONTLOG.txt GENTIUM-FAQ.txt OFL-FAQ.txt OFL.txt
%changelog
* Fri May 21 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.102-1mamba
- update to 1.102
* Sun Apr 10 2011 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 1.1-2mamba
- rebuilt
* Wed Jan 26 2011 gil <puntogil@libero.it> 1.1-1mamba
- package created by autospec