File terminus-font.spec of Package terminus-font

#
# spec file for package terminus-font (Version 4.20)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           terminus-font
%if %suse_version > 910
BuildRequires:  freetype2 xorg-x11 xorg-x11-devel
%else
BuildRequires:  XFree86 XFree86-devel freetype2
%endif
License:        GPL
Group:          System/X11/Fonts
Autoreqprov:    on
PreReq:         %suseconfig_fonts_prereq
Provides:       locale(ru;bg)
Version:        4.20
Release:        1
URL:            http://www.is-vn.bg/hamster/jimmy-en.html
Source0:        http://www.is-vn.bg/hamster/terminus-font-4.20.tar.bz2
Patch1:         terminus-font.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArchitectures: noarch
Summary:        readable fixed width fonts for X11 and the Linux console

%description
readable fixed width fonts for X11 and the Linux console

Authors:
--------
    Dimitar Toshkov Zhekov <jimmy@is-vn.bg>

%prep
%setup -q
%patch1 -p1
%if "%(xft-config --prefix)" == "/usr"
%define x11dir /usr/share/fonts/misc/
%else
%define x11dir /usr/X11R6/lib/X11/fonts/misc/
%endif
%define psfdir /usr/share/kbd/consolefonts

%build
./configure --prefix=/usr
make -e x11dir=%{x11dir} psfdir=%{psfdir}

%install
make -e DESTDIR=${RPM_BUILD_ROOT}  x11dir=%{x11dir} psfdir=%{psfdir} install
rm -f ${RPM_BUILD_ROOT}%{x11dir}/fonts.dir
pushd ${RPM_BUILD_ROOT}%{psfdir}
    rename .psf.gz .psfu.gz *.psf.gz
popd

%clean
#[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT

%post
%run_suseconfig_fonts

%postun
%run_suseconfig_fonts

%files
%defattr(-, root,root)
%doc README*
%{x11dir}
%{psfdir}
%dir /usr/share/kbd

%changelog -n terminus-font
* Wed Aug 09 2006 - mfabian@suse.de
- update to 4.20.
* Tue Aug 08 2006 - dmueller@suse.de
- install fonts under /usr/share/fonts
* Mon Mar 27 2006 - ro@suse.de
- remove ifarched BuildReq (no ifarch in noarch package)
* Wed Mar 01 2006 - mfabian@suse.de
- add "Provides: locale(ru;bg)".
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Fri May 20 2005 - mfabian@suse.de
- update to 4.12.
* Fri Feb 11 2005 - uli@suse.de
- added /usr/share/kbd directory to file list (no kbd package on s390*;
  console fonts being useless on s390* the clean fix would be to
  %%ifarch them, but this would make the package non-noarch)
* Fri Dec 03 2004 - mfabian@suse.de
- update to 4.11.
- use new macro "%%run_suseconfig_fonts".
* Mon Jul 26 2004 - ro@suse.de
- added kbd to neededforbuild
* Fri Mar 19 2004 - mfabian@suse.de
- use %%suseconfig_fonts_prereq
* Tue Jan 20 2004 - mfabian@suse.de
- add mmj's check for existence of sbin/conf.d/SuSEconfig.pango
  again.
* Tue Jan 20 2004 - mfabian@suse.de
- update to 4.06.
- run SuSEconfig also in %%postun
* Mon Jan 12 2004 - mmj@suse.de
- Also call SuSEconfig.pango
* Mon Jan 12 2004 - mmj@suse.de
- Run SuSEconfig.fonts in %%post
* Tue Nov 04 2003 - ro@suse.de
- updated neededforbuild
- don't build as root
* Tue Aug 19 2003 - mfabian@suse.de
- new package: version 4.03.