File xfntjp.spec of Package xfntjp

#
# spec file for package xfntjp (Version 20020904)
#
# Copyright (c) 2008 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:           xfntjp
BuildRequires:  xorg-x11 xorg-x11-devel
%if %suse_version > 1020
BuildRequires:  fdupes
%endif
License:        Public Domain, Freeware
Group:          System/X11/Fonts
AutoReqProv:    on
PreReq:         %suseconfig_fonts_prereq
Provides:       locale(xorg-x11:ja)
Version:        20020904
Release:        569
Url:            http://openlab.ring.gr.jp/efont/japanese/
Source0:        http://openlab.ring.gr.jp/efont/dist/japanese/japanese-bitmap-fonts-0.4.5.tar.bz2
Source1:        mkbold
Source2:        mkitalic
Source4:        xfonts_jp.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Summary:        Japanese Fixed Fonts for the X Window System

%description
This Package contains Japanese fixed-width fonts for X11.

It contains the fonts knj10, kaname-alter, shinonome12, shinonome16,
k14goth, Kappa20, kanji32, and marumoji.

On top of that, it also contains bold, italic, and bold-italic versions
of the popular Japanese fonts usually found in the
/usr/lib/X11/fonts/misc directory of the standard X11 distribution and
bold, italic, and bold-italic versions of iso-8859-1 fonts which fit
nicely in style and width to the Japanese fonts.



%if "%(xft-config --prefix)" == "/usr"
%define fontdir   /usr/share/fonts/japanese
%else
%define fontdir   /usr/X11R6/lib/X11/fonts/japanese
%endif

%prep
%setup -q -n japanese-bitmap-fonts-0.4.5
mkdir -p extra
pushd extra
    tar xvf $RPM_SOURCE_DIR/xfonts_jp.tar.bz2
popd

%build
mkdir build
./configure --with-pcf=yes --with-fontdir=`pwd`/build
make pcf
rm build/fonts.dir
gzip -9 build/*.pcf
pushd extra
    for i in 7x14 7x14rk k14 8x16 8x16rk jiskan16 ; do
      /usr/bin/perl $RPM_SOURCE_DIR/mkbold ${i}.bdf > ${i}b.bdf
      /usr/bin/perl $RPM_SOURCE_DIR/mkitalic  ${i}.bdf > ${i}i.bdf
      /usr/bin/perl $RPM_SOURCE_DIR/mkbold ${i}i.bdf > ${i}bi.bdf
        # the non-(bold/italic) versions of the 14 and 16 pixel fonts
	# are already in xf86.rpm, include only the bold/italic ones here:
	for j in ${i}b.bdf ${i}i.bdf ${i}bi.bdf ; do
	    /usr/X11R6/bin/bdftopcf $j | gzip -9  > `basename $j .bdf`.pcf.gz
	done
    done
popd

%install
mkdir -p $RPM_BUILD_ROOT%{fontdir}
cp -p build/* $RPM_BUILD_ROOT%{fontdir}
cp -p extra/*.pcf* $RPM_BUILD_ROOT%{fontdir}
%if %suse_version > 1020
%fdupes $RPM_BUILD_ROOT%{fontdir}
%endif

%clean

%post
%run_suseconfig_fonts

%postun
%run_suseconfig_fonts

%files
%defattr(-, root,root)
%doc README* ChangeLog
%{fontdir}

%changelog
* Wed Jan 23 2008 mfabian@suse.de
- remove kanji32 font completely to be able to remove the
  "NoSource" tag.
- use fdupes.
- bzip2 all sources.
* Tue Aug 08 2006 dmueller@suse.de
- install fonts to /usr/share/fonts
* Wed Mar 01 2006 mfabian@suse.de
- add "Provides: locale(xorg-x11:ja)".
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Dec 03 2004 mfabian@suse.de
- use new macro "%%run_suseconfig_fonts".
* Fri Mar 19 2004 mfabian@suse.de
- use %%suseconfig_fonts_prereq
* Mon Mar 01 2004 mfabian@suse.de
- run SuSEconfig.fonts and SuSEconfig.pango in %%post and %%postun
* Sun Nov 02 2003 ro@suse.de
- updated neededforbuild
* Fri Jul 18 2003 mfabian@suse.de
- Don't include kanji32.bdf in the binary rpm and mark it
  as "NoSource" because there might be legal problems
  distributing this font.
* Thu Sep 05 2002 mfabian@suse.de
- re-add lost bold, italic, and bold-italic versions of
  kanji32 font and the 14 and 16 pixel X11 fonts.
* Mon Aug 26 2002 masaru@turbolinux.co.jp
- upgraded to japanese-bitmap-fonts-0.4.5.
* Mon Mar 11 2002 mfabian@suse.de
- remove %%post and %%postun, SuSEconfig.fonts does that already,
  it's better not duplicate the work of SuSEconfig.fonts.
* Wed Feb 20 2002 mfabian@suse.de
- fix changelog (build did fail an ia64 because of incorrectly
  formatted changelog)
* Wed Mar 07 2001 mfabian@suse.de
- add xf86 to "# neededforbuild" (/usr/X11R6/bin/bdftopcf is
  needed).
* Tue Jan 30 2001 mfabian@suse.de
- add shinonome12-1.0.8 and shinonome16-1.0.3
- update k14goth to version 1.6.9
- improve fonts.alias
- don't pack fonts.dir
- cleanup of spec file.
* Fri Aug 04 2000 mfabian@suse.de
- adapted to SuSE,
- updated Nagao San's knj10 fonts to version knj10-1.1
- added Nagao San's Nagamaru and Nagamin fonts
  and bold, italic, and bold-italic versions of these.
- replaced 'fonts.dir.jp' by a call to mkfontdir
- patched 'mkitalic' which caused autobuild to fail
* Wed Mar 01 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
- 2.0-7, 2.0-9, 2.0-10
- updated to kaname-alter-2.8.1, k14goth-1.5
* Tue Jan 18 2000 Jun Nishii <jun@vinelinux.org>
- 2.0-6
- updated to kaname-alter-2.5
* Tue Jan 11 2000 Jun Nishii <jun@vinelinux.org>
- 2.0-5
- change group
- bzip2 many sources
- updated to kaname-alter-2.4, k14goth-1.3
* Wed Dec 29 1999 Jun Nishii <jun@vinelinux.org>
- rebuild (last build seems to be failed...)
* Fri Dec 24 1999 Jun Nishii <jun@vinelinux.org>
- removed verbose files in /usr/doc
* Thu Dec 23 1999 Jun Nishii <jun@vinelinux.org>
- kaname-alter-2.3
- k14goth-1.2
* Thu Nov 11 1999 Jun Nishii <jun@vinelinux.org>
- 1.9-1.1 try Mr.Furukawa's mkitalic
- 1.9-1.0
- bug fix in fonts.alias
* Tue Nov 09 1999 Jun Nishii <jun@vinelinux.org>
- update to kaname-alter-2.1
* Fri Oct 15 1999 MATSUMOTO Shoji <shom@flatout.org>
- change mkitalic
- change to kaname-alter-1.3
- change to k14goth-1.0
- add kanji32
* Tue Oct 05 1999 MATSUMOTO Shoji <shom@flatout.org>
- add mkitalic
- replace k14 to k14goth
* Tue Sep 14 1999 Norihito Ohmori <ohmori@flatout.org>
- change kaname-machi font to kaname-machi kai
* Wed Dec 09 1998 MATSUMOTO Shoji <pje@linux.or.jp>
- create spec