stix-fonts/stix-fonts.spec
2007-11-01 17:53:36 +00:00

249 lines
6.5 KiB
RPMSpec

%define fontname stix
%define fontdir %{_datadir}/fonts/%{fontname}
%define fontconfdir %{_sysconfdir}/fonts/conf.d
%define archivename STIXBeta
Name: %{fontname}-fonts
Version: 0.9
Release: 5%{?dist}
Summary: STIX scientific and engineering fonts
Group: User Interface/X
License: STIX
URL: http://www.stixfonts.org/
Source0: %{archivename}.zip
Source1: %{name}-License.txt
Source2: stix-fonts-fontconfig.conf
Source3: stix-fonts-pua-fontconfig.conf
Source4: stix-fonts-integrals-fontconfig.conf
Source5: stix-fonts-sizes-fontconfig.conf
Source6: stix-fonts-variants-fontconfig.conf
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
%description
The mission of the Scientific and Technical Information Exchange (STIX) font
creation project is the preparation of a comprehensive set of fonts that serve
the scientific and engineering community in the process from manuscript
creation through final publication, both in electronic and print formats.
This package includes base Unicode fonts containing most glyphs for standard
use.
%package pua
Group: User Interface/X
Summary: STIX scientific and engineering fonts, PUA glyphs
# Does not really make sense without the core typefaces
Requires: %{name} = %{version}-%{release}
%description pua
The mission of the Scientific and Technical Information Exchange (STIX) font
creation project is the preparation of a comprehensive set of fonts that serve
the scientific and engineering community in the process from manuscript
creation through final publication, both in electronic and print formats.
This package includes fonts containing glyphs called out from the Unicode
Private Use Area (PUA) range. Glyphs in this range do not have an official
Unicode codepoint. They're generally accessible only through specialised
software. Text using them will break if they're ever accepted by the Unicode
Consortium and moved to an official codepoint.
%package integrals
Group: User Interface/X
Summary: STIX scientific and engineering fonts, additional integral glyphs
# Does not really make sense without the core typefaces
Requires: %{name} = %{version}-%{release}
%description integrals
The mission of the Scientific and Technical Information Exchange (STIX) font
creation project is the preparation of a comprehensive set of fonts that serve
the scientific and engineering community in the process from manuscript
creation through final publication, both in electronic and print formats.
This package includes fonts containing additional integrals of various size
and slant.
%package sizes
Group: User Interface/X
Summary: STIX scientific and engineering fonts, additional glyph sizes
# Does not really make sense without the core typefaces
Requires: %{name} = %{version}-%{release}
%description sizes
The mission of the Scientific and Technical Information Exchange (STIX) font
creation project is the preparation of a comprehensive set of fonts that serve
the scientific and engineering community in the process from manuscript
creation through final publication, both in electronic and print formats.
This package includes fonts containing glyphs in additional sizes (Mostly
"fence" and "piece" glyphs).
%package variants
Group: User Interface/X
Summary: STIX scientific and engineering fonts, additional glyph variants
# Does not really make sense without the core typefaces
Requires: %{name} = %{version}-%{release}
%description variants
The mission of the Scientific and Technical Information Exchange (STIX) font
creation project is the preparation of a comprehensive set of fonts that serve
the scientific and engineering community in the process from manuscript
creation through final publication, both in electronic and print formats.
This package includes fonts containing alternative variants of some glyphs.
%prep
%setup -c -q -n %{archivename}
install -m 0644 -p %{SOURCE1} License.txt
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
%build
# Source format not available
%install
rm -fr %{buildroot}
install -m 0755 -d %{buildroot}%{fontdir}
install -m 0644 -p *.otf %{buildroot}%{fontdir}
install -m 0755 -d %{buildroot}%{fontconfdir}
install -m 0644 -p %{SOURCE2} %{buildroot}%{fontconfdir}/61-%{fontname}.conf
install -m 0644 -p %{SOURCE3} %{buildroot}%{fontconfdir}/61-%{fontname}-pua.conf
install -m 0644 -p %{SOURCE4} %{buildroot}%{fontconfdir}/61-%{fontname}-integrals.conf
install -m 0644 -p %{SOURCE5} %{buildroot}%{fontconfdir}/61-%{fontname}-sizes.conf
install -m 0644 -p %{SOURCE6} %{buildroot}%{fontconfdir}/61-%{fontname}-variants.conf
%clean
rm -fr %{buildroot}
%post
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache -f %{fontdir}
fi
%postun
if [ "$1" = "0" ]; then
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache -f %{fontdir}
fi
fi
%post pua
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache -f %{fontdir}
fi
%postun pua
if [ "$1" = "0" ]; then
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache -f %{fontdir}
fi
fi
%post integrals
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache -f %{fontdir}
fi
%postun integrals
if [ "$1" = "0" ]; then
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache -f %{fontdir}
fi
fi
%post sizes
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache -f %{fontdir}
fi
%postun sizes
if [ "$1" = "0" ]; then
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache -f %{fontdir}
fi
fi
%post variants
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache -f %{fontdir}
fi
%postun variants
if [ "$1" = "0" ]; then
if [ -x %{_bindir}/fc-cache ]; then
%{_bindir}/fc-cache -f %{fontdir}
fi
fi
%files
%defattr(0644,root,root,0755)
%doc *.txt
%config(noreplace) %{fontconfdir}/61-%{fontname}.conf
%dir %{fontdir}
%{fontdir}/STIXGeneral*otf
%files pua
%defattr(0644,root,root,0755)
%config(noreplace) %{fontconfdir}/61-%{fontname}-pua.conf
%{fontdir}/STIXNonUni*otf
%files integrals
%defattr(0644,root,root,0755)
%config(noreplace) %{fontconfdir}/61-%{fontname}-integrals.conf
%{fontdir}/STIXInt*.otf
%files sizes
%defattr(0644,root,root,0755)
%config(noreplace) %{fontconfdir}/61-%{fontname}-sizes.conf
%{fontdir}/STIXSiz*.otf
%files variants
%defattr(0644,root,root,0755)
%config(noreplace) %{fontconfdir}/61-%{fontname}-variants.conf
%{fontdir}/STIXVar*otf
%changelog
* Thu Nov 1 2007 <nicolas.mailhot at laposte.net>
0.9-5
Add some fontconfig aliasing rules
0.9-4
Initial experimental packaging