+#
+# Conditional build:
+%bcond_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.1.0
Release: 3
License: LGPL
Group: Libraries
Source0: ftp://sunsite.unc.edu/pub/Linux/libs/graphics/%{name}-%{version}.tar.gz
+# Source0-md5: a05bed4aa63637052e60690ccde70421
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
+Patch3: %{name}-KernMapSize.patch
+Patch4: %{name}-man.patch
+Patch5: %{name}-xglyph.patch
+Patch6: %{name}-link.patch
+Patch7: %{name}-aclocal.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXaw-devel
+BuildRequires: xorg-lib-libXt-devel
+%if %{with doc}
BuildRequires: tetex-dvips
+BuildRequires: tetex-format-latex
BuildRequires: tetex-latex
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+BuildRequires: tetex-makeindex
+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
- wsparcie dla podkre¶lania, nadkre¶lania, przekre¶lania
- nowe wektory kodowania mog± byæ wczytane w czasie dzia³ania i fonty
mog± byæ ponownie zakodowane przy u¿yciu tych wektorów
-- antyaliasing zaimplementowany przy u¿yciu trzech stopni szaaro¶ci
+- antyaliasing zaimplementowany przy u¿yciu trzech stopni szaro¶ci
pomiêdzy czerni± a biel±
- interaktywny program testowy xglyph - w osobnym pakiecie (wymaga X).
%package fonts
Summary: Type 1 fonts
Summary(pl): Fonty Type 1
-Group: X11/Fonts
-Requires(post,postun):fileutils
-Requires(post,postun):sed
-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.
%package xglyph
Summary: Test program for t1lib with X11 interface
-Summary: Program testowy dla t1lib z interfejsem X11
+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.
%patch6 -p1
%patch7 -p1
+rm -f ac-tools/aclocal.m4
+
%build
%{__libtoolize}
-aclocal
-mv -f aclocal.m4 ac-tools
+%{__aclocal} -I ac-tools
%{__autoconf}
%configure
-
-%{__make} %{?_without_doc:without_doc}
+%{__make} %{!?with_doc:without_doc}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_libdir},%{_datadir},%{_bindir}} \
- $RPM_BUILD_ROOT{%{_includedir},%{_xbindir}} \
+install -d $RPM_BUILD_ROOT{%{_libdir},%{_datadir},%{_bindir},%{_includedir}} \
$RPM_BUILD_ROOT{%{_t1fontsdir},%{_t1afmdir}} \
$RPM_BUILD_ROOT%{_mandir}/man{1,5,8}
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
cp -a Fonts/enc $RPM_BUILD_ROOT%{_datadir}/%{name}
install Fonts/afm/*.afm $RPM_BUILD_ROOT%{_t1afmdir}
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
- install debian/*.${sec} $RPM_BUILD_ROOT/%{_mandir}/man${sec}/
+for sec in 1 5; do
+ install debian/*.${sec} $RPM_BUILD_ROOT%{_mandir}/man${sec}
done
-
-mv -f $RPM_BUILD_ROOT%{_bindir}/xglyph $RPM_BUILD_ROOT%{_xbindir}
-
-gzip -9nf Changes README.t1* %{!?_without_doc:doc/*.dvi}
+install %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man8
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p /sbin/ldconfig
+%post
+/sbin/ldconfig
+fontpostinst Type1
+
%postun -p /sbin/ldconfig
%post fonts
-cd %{_t1fontsdir}
-rm -f fonts.scale.bak Fontmap.bak
-cat fonts.scale.* | sort -u > fonts.scale.tmp
-cat fonts.scale.tmp | wc -l | sed -e 's/ //g' > 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
-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 | sed -e 's/ //g' > 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)
-%doc {Changes,README.t1*}.gz
-%if %{?_without_doc:0}%{!?_without_doc:1}
-%doc doc/*.dvi.gz
+%doc Changes README.t1*
+%if %{with doc}
+%doc doc/*.dvi
%endif
%doc doc/*.{tex,eps,fig}
%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*
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/*.so
-%attr(755,root,root) %{_libdir}/*.la
+%{_libdir}/*.la
%{_includedir}/*
%files static
%files xglyph
%defattr(644,root,root,755)
-%attr(755,root,root) %{_xbindir}/xglyph
+%attr(755,root,root) %{_bindir}/xglyph
%{_mandir}/man1/xglyph.1*