File fonts-arabic.spec of Package fonts-arabic

# spec file for package fonts-arabic (Version 0.20091208)
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

# norootforbuild

Name:           fonts-arabic
BuildRequires:  xorg-x11
%define	bitmap_fontdir  /usr/share/fonts/misc
%define	ttf_fontdir     /usr/share/fonts/truetype
License:        Public Domain, Freeware
Group:          System/X11/Fonts
Provides:       scalable-font-ar
AutoReqProv:    on
PreReq:         %suseconfig_fonts_prereq
Provides:       locale(ar)
Version:        0.20091208
Release:        2
# public domain:
Source0:        ae_fonts_mono.tar.bz2
Source2:        kacst_fonts_2.01.tar.bz2
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        A Collection of Free Arabic Fonts

A collection of free Arabic fonts available from

-------- <>
    King Abdulaziz City for Science and Technology and the Saudi LUG
    Lateef Sagar Shaikh <>
    Sharif University
    Mehran Mehr <>
    Markus Kuhn <>

%setup -T -c %{name} -n %{name} -a 0 -a 1 -a 2 -a 3 -a 5
bunzip2 --stdout $RPM_SOURCE_DIR/sharif.univ_ttf.bz2 > sharif.univ.ttf
mv License.txt License.Naqsh.txt
cp KacstArabicFonts-*/LICENSE LICENSE.Kacst
cp ae_fonts*/COPYING COPYING.ae_fonts
cp ae_fonts*/ChangeLog ChangeLog.ae_fonts
cp ae_fonts*/README README.ae_fonts


mkdir -p $RPM_BUILD_ROOT%{bitmap_fontdir}
mkdir -p $RPM_BUILD_ROOT%{ttf_fontdir}
for i in *.ttf */*.ttf */*/*.ttf
    # one of the kacst TrueType font files has size zero
    # make sure to install only .ttf files with size greater than zero
    # (OpenOffice even coredumps when .ttf files with size zero
    # are in the path).
    if [ -s $i ] ; then
        install -c -m 644 $i $RPM_BUILD_ROOT%{ttf_fontdir}
for i in */*.bdf
    bdftopcf $i | gzip -9  > \
    $RPM_BUILD_ROOT%{bitmap_fontdir}/`basename $i .bdf`.pcf.gz

[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;



%defattr(-, root,root)
%doc License* LICENSE*

openSUSE Build Service is sponsored by