+#
+# Conditional build:
+# _without_doc - do not build documentation with LaTeX
+#
Summary: A library for character- and string-glyphs from Adobe Type 1 fonts
Summary(pl): Biblioteka znakowych i ³añcuchowych glifów z fontów Adobe Type 1
Summary(pt_BR): Rasterizador de fontes Type 1
Summary(ru): òÁÓÔÅÒÉÚÁÔÏÒ ÛÒÉÆÔÏ× Type 1
Summary(uk): òÁÓÔÅÒÉÚÁÔÏÒ ÛÒÉÆÔ¦× Type 1
Name: t1lib
-Version: 1.3.1
+Version: 5.0.0
Release: 4
License: LGPL
Group: Libraries
Source0: ftp://sunsite.unc.edu/pub/Linux/libs/graphics/%{name}-%{version}.tar.gz
+# Source0-md5: 6b5d79840ec2be72b506c12abb040a60
Source1: %{name}-fonts.Fontmap
Source2: %{name}-fonts.fonts.scale
+Source3: %{name}config
+Source4: %{name}config.8
Patch0: %{name}-DESTDIR.patch
Patch1: %{name}-doc.patch
Patch2: %{name}-config.patch
-Patch3: %{name}-dontprint.patch
Patch4: %{name}-KernMapSize.patch
Patch5: %{name}-man.patch
-Patch6: %{name}-%{name}config.patch
Patch7: %{name}-xglyph.patch
BuildRequires: XFree86-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
-%{!?_without_doc:BuildRequires: tetex-dvips}
-%{!?_without_doc:BuildRequires: tetex-latex}
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%if %{!?_without_doc:1}0
+BuildRequires: tetex-dvips
+BuildRequires: tetex-latex
+BuildRequires: tetex-makeindex
+BuildRequires: tetex-format-latex
+BuildRequires: tetex-tex-babel
+%endif
+Requires(post): fontpostinst >= 0.1-6
Obsoletes: libt1lib1.3.1
Obsoletes: libt1lib1.3.1-progs
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _xbindir /usr/X11R6/bin
%define _t1fontsdir %{_fontsdir}/Type1
%define _t1afmdir %{_t1fontsdir}/afm
%define _datadir /etc
+%define specflags_ia32 "-fomit-frame-pointer"
%description
t1lib is a library distributed under the GNU General Public Library
%package fonts
Summary: Type 1 fonts
Summary(pl): Fonty Type 1
-Group: X11/Fonts
-Requires(post,postun): fileutils
-Requires(post,postun): textutils
+Group: Fonts
+Requires(post,postun): fontpostinst >= 0.1-6
+Requires: %{_fontsdir}/Type1
%description fonts
Type 1 fonts.
Summary(ru): òÁÓÔÅÒÉÚÁÔÏÒ ÛÒÉÆÔÏ× Type 1 - ÆÁÊÌÙ ÄÌÑ ÒÁÚÒÁÂÏÔËÉ ÐÒÏÇÒÁÍÍ
Summary(uk): òÁÓÔÅÒÉÚÁÔÏÒ ÛÒÉÆÔ¦× Type 1 - ÆÁÊÌÉ ÄÌÑ ÒÏÚÒÏÂËÉ ÐÒÏÇÒÁÍ
Group: Development/Libraries
-Requires: %{name} = %{version}
+Requires: %{name} = %{version}-%{release}
Obsoletes: libt1lib1.3.1-devel
%description devel
Summary(pl): Biblioteki statyczne dla t1lib
Summary(pt_BR): Bibliotecas estáticas para desenvolvimento com t1lib
Group: Development/Libraries
-Requires: %{name}-devel = %{version}
+Requires: %{name}-devel = %{version}-%{release}
%description static
Static libraries for t1lib.
Summary: Test program for t1lib with X11 interface
Summary(pl): Program testowy dla t1lib z interfejsem X11
Group: X11/Applications
-Requires: %{name}-devel = %{version}
+Requires: %{name}-devel = %{version}-%{release}
%description xglyph
Test program for t1lib with X11 interface.
%patch0 -p1
%patch1 -p0
%patch2 -p0
-%patch3 -p1
%patch4 -p1
%patch5 -p1
-%patch6 -p1
%patch7 -p1
%build
install %{SOURCE1} $RPM_BUILD_ROOT%{_t1fontsdir}/Fontmap.%{name}-fonts
install %{SOURCE2} $RPM_BUILD_ROOT%{_t1fontsdir}/fonts.scale.%{name}-fonts
-install debian/t1libconfig $RPM_BUILD_ROOT%{_bindir}
+install %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}
-touch $RPM_BUILD_ROOT%{_datadir}/%{name}/FontDatabase
+> $RPM_BUILD_ROOT%{_datadir}/%{name}/FontDatabase
-for sec in 1 5 8 ; do
+for sec in 1 5; do
install debian/*.${sec} $RPM_BUILD_ROOT%{_mandir}/man${sec}
done
+install %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man8
mv -f $RPM_BUILD_ROOT%{_bindir}/xglyph $RPM_BUILD_ROOT%{_xbindir}
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p /sbin/ldconfig
+%post
+/sbin/ldconfig
+fontpostinst Type1
+
%postun -p /sbin/ldconfig
%post fonts
-umask 022
-cd %{_t1fontsdir}
-rm -f fonts.scale.bak Fontmap.bak
-cat fonts.scale.* | sort -u > fonts.scale.tmp
-cat fonts.scale.tmp | wc -l | tr -d ' ' > fonts.scale
-cat fonts.scale.tmp >> fonts.scale
-rm -f fonts.scale.tmp
-ln -sf fonts.scale fonts.dir
-cat Fontmap.* > Fontmap
+fontpostinst Type1
%postun fonts
-umask 022
-cd %{_t1fontsdir}
-rm -f fonts.scale.bak Fontmap.bak
-cat fonts.scale.* 2>/dev/null | sort -u > fonts.scale.tmp
-cat fonts.scale.tmp | wc -l | tr -d ' ' > fonts.scale
-cat fonts.scale.tmp >> fonts.scale
-rm -f fonts.scale.tmp
-ln -sf fonts.scale fonts.dir
-cat Fontmap.* > Fontmap 2>/dev/null
+fontpostinst Type1
%files
%defattr(644,root,root,755)
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/enc
-%config(noreplace) %{_datadir}/%{name}/t1lib.config
-%config(noreplace) %{_datadir}/%{name}/FontDatabase
+%ghost %{_datadir}/%{name}/t1lib.config
+%ghost %{_datadir}/%{name}/FontDatabase
%{_mandir}/man[58]/*
%{_mandir}/man1/type1afm.1*