Blob Blame History Raw
%define fontname        khmeros
%define fontdir         %{_datadir}/fonts/%{fontname}
%define archivename     All_KhmerOS_%{version}

Name:           %{fontname}-fonts
Version:        5.0
Release:        3%{?dist}
Summary:        Khmer font set created by Danh Hong of the Cambodian Open Institute

Group:          User Interface/X
License:        LGPLv2+
URL:            http://www.khmeros.info/drupal/?q=en/download/fonts
Source0:        http://downloads.sourceforge.net/khmer/%{archivename}.zip
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch

%description
The Khmer OS fonts include Khmer and Latin alphabets, and they have equivalent
sizes for Khmer and English alphabets, so that when texts mix both it is not 
necessary to have different point sizes for the text in each language.

They were created by Danh Hong of the Cambodian Open Institute.

%package base
Summary: Base Khmer font set created by Danh Hong of the Cambodian Open Institute
Group: User Interface/X
%description base
The Khmer OS fonts include base Khmer and Latin alphabets, and they have 
equivalent sizes for Khmer and English alphabets, so that when texts mix 
both it is not necessary to have different point sizes for the text in each 
language.

They were created by Danh Hong of the Cambodian Open Institute.

%package battambang
Summary: Khmer font set created by Danh Hong of the Cambodian Open Institute
Group: User Interface/X
%description battambang
The Khmer OS fonts include Khmer and Latin alphabets, and they have 
equivalent sizes for Khmer and English alphabets, so that when texts mix 
both it is not necessary to have different point sizes for the text in each 
language.

They were created by Danh Hong of the Cambodian Open Institute.

%package bokor
Summary: Khmer font set created by Danh Hong of the Cambodian Open Institute
Group: User Interface/X
%description bokor
The Khmer OS fonts include Khmer and Latin alphabets, and they have 
equivalent sizes for Khmer and English alphabets, so that when texts mix 
both it is not necessary to have different point sizes for the text in each 
language.

They were created by Danh Hong of the Cambodian Open Institute.


%package handwritten
Summary: Handwritten Khmer font set created by Danh Hong of the Cambodian Open Institute
Group: User Interface/X
%description handwritten
The Khmer OS fonts include Khmer and Latin alphabets, and they have 
equivalent sizes for Khmer and English alphabets, so that when texts mix 
both it is not necessary to have different point sizes for the text in each 
language.

They were created by Danh Hong of the Cambodian Open Institute.


%package metalchrieng
Summary: Old-fashioned Khmer font set by Danh Hong of the Cambodian Open Institute
Group: User Interface/X
%description metalchrieng
The Khmer OS fonts include Khmer and Latin alphabets, and they have 
equivalent sizes for Khmer and English alphabets, so that when texts mix 
both it is not necessary to have different point sizes for the text in each 
language.

They were created by Danh Hong of the Cambodian Open Institute.


%package muol
Summary: Khmer font set created by Danh Hong of the Cambodian Open Institute
Group: User Interface/X
%description muol
The Khmer OS fonts include Khmer and Latin alphabets, and they have 
equivalent sizes for Khmer and English alphabets, so that when texts mix 
both it is not necessary to have different point sizes for the text in each 
language.

They were created by Danh Hong of the Cambodian Open Institute.


%package siemreap
Summary: Khmer font set created by Danh Hong of the Cambodian Open Institute
Group: User Interface/X
%description siemreap
The Khmer OS fonts include Khmer and Latin alphabets, and they have 
equivalent sizes for Khmer and English alphabets, so that when texts mix 
both it is not necessary to have different point sizes for the text in each 
language.

They were created by Danh Hong of the Cambodian Open Institute.


%prep
%setup -q -n %{archivename}


%build


%install
rm -rf %{buildroot}

# One of the fonts is named 'KhmerOS .ttf' (note the space).
#   1) It is apparently a mistake.
#   2) Have problems with installing it inside %%files base
rename ' ' '' *

install -dm 755 %{buildroot}%{fontdir}
install -pm 644 *.ttf %{buildroot}%{fontdir}


%clean
rm -rf %{buildroot}


%post base
if [ -x %{_bindir}/fc-cache ] ; then
    %{_bindir}/fc-cache -f %{fontdir} || :
fi

%post battambang
if [ -x %{_bindir}/fc-cache ] ; then
    %{_bindir}/fc-cache -f %{fontdir} || :
fi

%post bokor
if [ -x %{_bindir}/fc-cache ] ; then
    %{_bindir}/fc-cache -f %{fontdir} || :
fi

%post handwritten
if [ -x %{_bindir}/fc-cache ] ; then
    %{_bindir}/fc-cache -f %{fontdir} || :
fi

%post metalchrieng
if [ -x %{_bindir}/fc-cache ] ; then
    %{_bindir}/fc-cache -f %{fontdir} || :
fi

%post muol
if [ -x %{_bindir}/fc-cache ] ; then
    %{_bindir}/fc-cache -f %{fontdir} || :
fi

%post siemreap
if [ -x %{_bindir}/fc-cache ] ; then
    %{_bindir}/fc-cache -f %{fontdir} || :
fi

%postun base
if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then
    %{_bindir}/fc-cache -f %{fontdir} || :
fi
%postun battambang
if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then
    %{_bindir}/fc-cache -f %{fontdir} || :
fi
%postun bokor
if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then
    %{_bindir}/fc-cache -f %{fontdir} || :
fi
%postun handwritten
if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then
    %{_bindir}/fc-cache -f %{fontdir} || :
fi
%postun metalchrieng
if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then
    %{_bindir}/fc-cache -f %{fontdir} || :
fi
%postun muol
if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then
    %{_bindir}/fc-cache -f %{fontdir} || :
fi
%postun siemreap
if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ] ; then
    %{_bindir}/fc-cache -f %{fontdir} || :
fi


%files base
%defattr(644,root,root,755)
%dir %{fontdir}
%{fontdir}/KhmerOS.ttf
%{fontdir}/KhmerOS_sys.ttf
%{fontdir}/KhmerOS_content.ttf

%files battambang
%defattr(644,root,root,755)
%dir %{fontdir}
%{fontdir}/KhmerOS_battambang.ttf

%files bokor
%defattr(644,root,root,755)
%dir %{fontdir}
%{fontdir}/KhmerOS_bokor.ttf

%files handwritten
%defattr(644,root,root,755)
%dir %{fontdir}
%{fontdir}/KhmerOS_fasthand.ttf
%{fontdir}/KhmerOS_freehand.ttf

%files metalchrieng
%defattr(644,root,root,755)
%dir %{fontdir}
%{fontdir}/KhmerOS_metalchrieng.ttf

%files muol
%defattr(644,root,root,755)
%dir %{fontdir}
%{fontdir}/KhmerOS_muol.ttf
%{fontdir}/KhmerOS_muolpali.ttf
%{fontdir}/KhmerOS_muollight.ttf

%files siemreap
%defattr(644,root,root,755)
%dir %{fontdir}
%{fontdir}/KhmerOS_siemreap.ttf

%changelog
* Tue Jul 8 2008 Michal Nowak <mnowak@redhat.com> - 5.0-3
- reshaping to multiple subpackages based on font type/purpose
- license uncertainity is solved; licence field is set according
  to information from .ttf files read via gnome-font-viewer

* Mon Jul 7 2008 Michal Nowak <mnowak@redhat.com> - 5.0-2
- removing Fedora specific license
- refactoring summary and description texts (Nicolas Mailhot)

* Fri Jul 4 2008 Michal Nowak <mnowak@redhat.com> - 5.0-1
- Initial release