File arabic-fonts.spec of Package arabic-fonts

#
# spec file for package arabic-fonts
#
# Copyright (c) 2012 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 http://bugs.opensuse.org/
#


Name:           arabic-fonts
Version:        0.20091208
Release:        0
Summary:        A Collection of Free Arabic Fonts
License:        GPL-2.0+
Group:          System/X11/Fonts
Url:            http://www.arabeyes.org/resources.php
# public domain:
Source0:        ae_fonts_mono.tar.bz2
Source1:        http://heanet.dl.sourceforge.net/sourceforge/arabeyes/haydar_fonts.tar.bz2
Source2:        kacst_fonts_2.01.tar.bz2
Source3:        http://heanet.dl.sourceforge.net/sourceforge/arabeyes/lateef.shaikh_fonts.tar.bz2
Source4:        http://heanet.dl.sourceforge.net/sourceforge/arabeyes/sharif.univ_ttf.bz2
Source5:        http://downloads.sourceforge.net/arabeyes/ae_fonts_2.0.tar.bz2
BuildRequires:  dos2unix
BuildRequires:  fontpackages-devel
%if 0%{?suse_version} >= 1220
BuildRequires:  bdftopcf
#BuildRequires:  fontconfig
#BuildRequires:  imake
#BuildRequires:  mkfontdir
#BuildRequires:  xorg-cf-files
%else
BuildRequires:  xorg-x11
%endif
%reconfigure_fonts_prereq
Provides:       scalable-font-ar
Provides:       locale(ar)
# FIXME: This causes a rpmlint warning; change <= to < once here's a new upstream version
Obsoletes:      fonts-arabic <= %{version}
Provides:       fonts-arabic = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
A collection of free Arabic fonts available from
http://www.arabeyes.org/resources.php.

%prep
%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
dos2unix License.txt
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

%build

%install
mkdir -p %{buildroot}%{_miscfontsdir}
mkdir -p %{buildroot}%{_ttfontsdir}
for i in *.ttf */*.ttf */*/*.ttf
do
    # 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 %{buildroot}%{_ttfontsdir}
    fi
done
for i in */*.bdf
do
    bdftopcf $i | gzip -9  > \
    %{buildroot}%{_miscfontsdir}/`basename $i .bdf`.pcf.gz
done

%reconfigure_fonts_scriptlets

%files
%defattr(-, root,root)
%doc License* LICENSE*
%{_miscfontsdir}
%{_ttfontsdir}

%changelog
openSUSE Build Service is sponsored by