sil-gentium-basic-fonts/sil-gentium-basic-fonts.spec
gil 609061c8b5 rebuilt
package created by autospec [release 1.1-1mamba;Wed Jan 26 2011]
2024-01-05 17:50:53 +01:00

98 lines
2.9 KiB
RPMSpec

%define fontdir %{_datadir}/sil-gentium-basic
Name: sil-gentium-basic-fonts
Version: 1.1
Release: 2mamba
Summary: Gentium Basic Font Family from SIL
Group: System/Fonts
Vendor: openmamba
Distribution: openmamba
Packager: gil <puntogil@libero.it>
URL: http://scripts.sil.org/Gentium_Basic
# http://scripts.sil.org/cms/scripts/render_download.php?&format=file&media_id=GentiumBasic_110_tar&filename=ttf-sil-gentium-basic_1.1.orig.tar.gz
Source0: ttf-sil-gentium-basic_%{version}.orig.tar.gz
Source1: 59-sil-gentium-basic.conf
Source2: 59-sil-gentium-basic-book.conf
License: SIL Open Font License
BuildRequires: mkfontdir
BuildRequires: ttmkfdir
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%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 ttf-sil-gentium-basic-%{version}
# 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
* 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