Blob Blame History Raw
%define pkgname font-utils

# NOTE: When enabled, this provides symbolic links in /usr/X11R6/bin which
# provide backward compatibility for utilities/scripts that hard code paths
# to /usr/X11R6/bin/mkfontdir et al.  This compatibility support will be
# disabled and removed in a future OS release, so 3rd party application
# developers and package maintainers should update their software as soon
# as possible.
%define with_X11R6_compat 1
%define _x11r6bindir /usr/X11R6/bin

Summary: X.Org X11 font utilities
Name: xorg-x11-%{pkgname}
# IMPORTANT: If package ever gets renamed to something else, remove the Epoch line!
Epoch: 1
# NOTE: Keep version set to the X11Rx.y release the package is based upon.
Version: 7.1
# Bump release for updates.
Release: 1.1
License: MIT/X11
Group: User Interface/X
URL: http://www.x.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Source0: ftp://ftp.x.org/pub/individual/app/bdftopcf-1.0.0.tar.bz2
Source1: ftp://ftp.x.org/pub/individual/app/fonttosfnt-1.0.1.tar.bz2
Source2: ftp://ftp.x.org/pub/individual/app/mkfontdir-1.0.2.tar.bz2
Source3: ftp://ftp.x.org/pub/individual/app/mkfontscale-1.0.1.tar.bz2
Source4: ftp://ftp.x.org/pub/individual/app/font-util-1.0.1.tar.bz2

Patch0: font-util-1.0.1-mapdir-use-datadir-fix.patch
Patch1: font-util-1.0.1-autoconf-add-with-fontdir-option.patch

BuildRequires: pkgconfig
# xorg-x11-libXfont-devel needed for bdftopcf
BuildRequires: libXfont-devel
# xorg-x11-libX11-devel needed for fonttosfnt
BuildRequires: libX11-devel
# xorg-x11-libfontenc-devel needed for fonttosfnt, mkfontscale
BuildRequires: libfontenc-devel >= 0.99.2-2
# freetype-devel needed for bdftopcf, fonttosfnt, mkfontscale
BuildRequires: freetype-devel
# zlib-devel needed for bdftopcf
BuildRequires: zlib-devel
# xorg-x11-proto-devel is needed for mkfontscale, which includes headers
# from it directly.
BuildRequires: xorg-x11-proto-devel

BuildRequires: autoconf

Requires(pre): xorg-x11-filesystem >= 0.99.2-3

# NOTE: This versioned pre-dependency is needed to ensure that the bugfix for
# bug #173875 is installed in order for mkfontscale/mkfontdir to work
# properly.  It is a "pre" dep, to ensure libfontenc gets installed before
# xorg-font-utils, before any fonts in an rpm upgrade or multi-transaction
# set, avoiding a possible race condition.
Requires(pre): libfontenc >= 0.99.2-2

Provides: %{pkgname}
Provides: bdftopcf, fonttosfnt, mkfontdir, mkfontscale, bdftruncate, ucs2any
# NOTE: XFree86-font-utils package contains mkfontdir, mkfontscale, so this
# is needed for upgrades to work properly from OS releases that had XFree86
Obsoletes: XFree86-font-utils
# NOTE: XFree86 package used to contain bdftopcf, mkfontdir, mkfontscale so
# this is needed for upgrades to work.
Obsoletes: XFree86
# NOTE: The fonts/util subdir moved from xorg-x11-base-fonts to
# xorg-x11-font-utils in 6.7.99.903-3
Obsoletes: xorg-x11-base-fonts <= 6.7.99.903-3
# NOTE: ucs2any moved from xorg-x11-tools to xorg-x11-font-utils in 6.7.99.903-3
Obsoletes: xorg-x11-tools <= 6.7.99.903-3

%description
X.Org X11 font utilities required for font installation, conversion,
and generation.

%prep
%setup -q -c %{name}-%{version} -a1 -a2 -a3 -a4
%patch0 -p0 -b .font-util-mapdir-use-datadir-fix
%patch1 -p0 -b .autoconf-add-with-fontdir-option

%build
# Build all apps
{
   for app in bdftopcf fonttosfnt mkfontdir mkfontscale font-util ; do
      pushd $app-*
      # FIXME: We run autoconf to activate font-util-0.99.1-mapdir-use-datadir-fix.patch
      case $app in
         font-util)
            autoconf
            ;;
      esac
      %configure
      make
      popd
   done
}

%install
rm -rf $RPM_BUILD_ROOT
# Install all apps
{
   for app in bdftopcf fonttosfnt mkfontdir mkfontscale font-util; do
      pushd $app-*
      make install DESTDIR=$RPM_BUILD_ROOT
      popd
   done
}

%if %{with_X11R6_compat}
{
   mkdir -p $RPM_BUILD_ROOT%{_x11r6bindir}

   for util in mkfontdir mkfontscale ; do
      ln -sf ../../..%{_bindir}/$util $RPM_BUILD_ROOT%{_x11r6bindir}/$util
   done
}
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
# FIXME: Include missing docs sometime
%doc
%{_bindir}/bdftopcf
%{_bindir}/bdftruncate
%{_bindir}/fonttosfnt
%{_bindir}/mkfontdir
%{_bindir}/mkfontscale
%{_bindir}/ucs2any
# NOTE: These compat symlinks will be removed in a future OS release.
# Developers and package maintainers should update their software to handle
# the X11R7 changes in a clean manner.
%if %{with_X11R6_compat}
%dir %{_x11r6bindir}
%{_x11r6bindir}/mkfontdir
%{_x11r6bindir}/mkfontscale
%endif
%dir %{_datadir}/X11
%dir %{_datadir}/X11/fonts
%dir %{_datadir}/X11/fonts/util
%{_datadir}/X11/fonts/util/map-*
%{_datadir}/aclocal/fontutil.m4
%{_libdir}/pkgconfig/fontutil.pc
#%dir %{_mandir}/man1x
%{_mandir}/man1/bdftopcf.1x*
%{_mandir}/man1/bdftruncate.1x*
%{_mandir}/man1/fonttosfnt.1x*
%{_mandir}/man1/mkfontdir.1x*
%{_mandir}/man1/mkfontscale.1x*
%{_mandir}/man1/ucs2any.1x*

%changelog
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - sh: line 0: fg: no job control
- rebuild

* Wed Jun 21 2006 Mike A. Harris <mharris@redhat.com> 1:7.1-1
- Update to font-util-1.0.1 from X11R7.1
- Set package version to X11 release the tarballs are based from.

* Thu Apr 26 2006 Adam Jackson <ajackson@redhat.com> 1:1.0.2-2
- Update mkfontdir

* Wed Feb 22 2006 Mike A. Harris <mharris@redhat.com> 1:1.0.1-3
- Remove "Obsoletes: xorg-x11-font-utils" as the package should not obsolete
  itself.  Leftover from the original package template it seems.  (#182439)

* Fri Feb 17 2006 Mike A. Harris <mharris@redhat.com> 1:1.0.1-2
- Added with_X11R6_compat macro to conditionalize inclusion of mkfontdir and
  mkfontscale symlinks in the old X11R6 locations, pointing to the X11R7
  binaries.  This will provide backward compatibilty for Fedora Core 5, however
  3rd party developers and rpm package maintainers should update to using the
  new X11R7 locations immediately, as these compatibility links are temporary,
  and will be removed from a future OS release.
- Remove system directories from file manifest to appease the banshees.

* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> 1:1.0.1-1.2
- bump again for double-long bug on ppc(64)

* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> 1:1.0.1-1.1
- rebuilt for new gcc4.1 snapshot and glibc changes

* Wed Jan 18 2006 Mike A. Harris <mharris@redhat.com> 1:1.0.1-1
- Updated all utilities to the versions shipped in X11R7.0.

* Thu Dec 15 2005 Mike A. Harris <mharris@redhat.com> 1:1.0.0-1
- Updated all utilities to version 1.0.0 from X11R7 RC4.
- Updated font-util-1.0.0-mapdir-use-datadir-fix.patch to work with RC4.
- Added font-util-1.0.0-autoconf-add-with-fontdir-option.patch to add a new
  variable "fontdir" to the fontutil.pc file which all of the font packages
  can autodetect and use instead of having to put manual fontdir overrides
  in every single rpm package.

* Tue Dec 13 2005 Mike A. Harris <mharris@redhat.com> 1:0.99.2-1
- Updated bdftopcf, fonttosfnt to version 0.99.3, and mkfontdir, mkfontscale,
  and font-util to version 0.99.2 from X11R7 RC3.
- Changed manpage dir from man1x back to man1 due to another upstream change.
- Added fontutil.m4 to file manifest.

* Tue Nov 22 2005 Mike A. Harris <mharris@redhat.com> 1:0.99.1-1
- Changed package version to 0.99.1 to match the upstream font-util tarball
  version, and added "Epoch: 1" to the package for upgrades.
- Added font-util-0.99.1-mapdir-use-datadir-fix.patch to fix the font-util
  mapfiles data to install into datadir instead of libdir (#173943)
- Added "Requires(pre): libfontenc >= 0.99.2-2" to force a version of
  libfontenc to be installed that fixes bug #173453, and to also force it
  to be installed before xorg-x11-font-utils in a multi-package rpm
  transaction, which will ensure that when font packages get installed
  during upgrades via anaconda or yum, that the right libfontenc is being
  used by mkfontscale/mkfontdir.
- Added ">= 0.99.2-2" to BuildRequires for libfontenc, as a convenience to
  people rebuilding xorg-x11-font-utils, as they'll need to install the new
  libfontenc now anyway before they can install the font-utils package.

* Mon Nov 14 2005 Jeremy Katz <katzj@redhat.com> 6.99.99.902-2
- require newer filesystem (#172610)

* Wed Nov 09 2005 Mike A. Harris <mharris@redhat.com> 6.99.99.902-1
- Updated bdftopcf, fonttosfnt, mkfontdir, mkfontscale to version 0.99.1 from
  X11R7 RC1.

* Wed Nov 09 2005 Mike A. Harris <mharris@redhat.com> 6.99.99.901-3
- Glob util/map-* files in file manifest.
- Added missing "Obsoletes: xorg-x11-font-utils".
- Added "BuildRequires: pkgconfig".

* Sun Nov 06 2005 Mike A. Harris <mharris@redhat.com> 6.99.99.901-2
- Added font-util-0.99.1 to package, from X11R7 RC1 release, which provides
  ucs2any, bdftruncate.

* Wed Oct 26 2005 Mike A. Harris <mharris@redhat.com> 6.99.99.901-1
- Updated bdftopcf, fonttosfnt, mkfontdir, mkfontscale to version 0.99.1 from
  X11R7 RC1.
- Bumped package version to 6.99.99.901, the X11R7 RC1 release version tag.
- Updated file manifest to to find the manpages in "man1x".

* Wed Aug 24 2005 Mike A. Harris <mharris@redhat.com> 6.99.99.0-1
- Initial build.