c7bd01
%define fontname paktype-naskh-basic
c7bd01
%global fontconf 67-%{fontname}
c7bd01
%define fontdir %{_datadir}/fonts/%{fontname}
c7bd01
c7bd01
# Common description
c7bd01
%define common_desc \
c7bd01
The paktype-naskh-basic-fonts package contains fonts for the display of \
c7bd01
Arabic, Farsi, Urdu and Sindhi from PakType by Lateef Sagar.
c7bd01
c7bd01
Name:    %{fontname}-fonts
c7bd01
Version: 3.0
c7bd01
Release: 6%{?dist}
c7bd01
License: GPLv2 with exceptions
c7bd01
URL: https://sourceforge.net/projects/paktype/
c7bd01
Source0: http://downloads.sourceforge.net/project/paktype/NaskhBasic-3.0.tar.gz
c7bd01
Source1: %{fontconf}-sa.conf
c7bd01
Source2: %{fontconf}-sindhi.conf
c7bd01
Source3: %{fontconf}-farsi.conf
c7bd01
Source4: %{fontconf}-urdu.conf
c7bd01
Source5: %{fontconf}.conf
c7bd01
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
c7bd01
BuildArch: noarch
c7bd01
BuildRequires:  fontpackages-devel
c7bd01
Requires:       %{name}-common 
c7bd01
Group: User Interface/X
c7bd01
Summary: Fonts for Arabic, Farsi, Urdu and Sindhi from PakType
c7bd01
c7bd01
 
c7bd01
%description
c7bd01
%common_desc
c7bd01
c7bd01
%package common
c7bd01
Summary:  Common files for paktype-naskh fonts
c7bd01
Group:  User Interface/X
c7bd01
Requires: fontpackages-filesystem
c7bd01
%description common
c7bd01
%common_desc
c7bd01
c7bd01
c7bd01
%package -n %{fontname}-farsi-fonts
c7bd01
Summary: Font for Farsi from PakType
c7bd01
Group: User Interface/X
c7bd01
Requires: %{name}-common = %{version}-%{release}
c7bd01
%description -n %{fontname}-farsi-fonts
c7bd01
%common_desc 
c7bd01
This package provides a free Farsi truetype/opentype font 
c7bd01
c7bd01
%_font_pkg -n farsi -f %{fontconf}-farsi.conf PakTypeNaskhBasicFarsi.ttf
c7bd01
c7bd01
%package -n %{fontname}-sa-fonts
c7bd01
Summary: Fonts for Arabic, Farsi, Urdu and Sindhi from PakType
c7bd01
Group: User Interface/X
c7bd01
Requires: %{name}-common = %{version}-%{release}
c7bd01
%description -n %{fontname}-sa-fonts
c7bd01
%common_desc
c7bd01
c7bd01
%_font_pkg -n sa -f %{fontconf}-sa.conf PakTypeNaskhBasicSA.ttf
c7bd01
c7bd01
%package -n %{fontname}-sindhi-fonts
c7bd01
Summary: Font for Sindhi from PakType
c7bd01
Group: User Interface/X
c7bd01
Requires: %{name}-common = %{version}-%{release}
c7bd01
%description -n %{fontname}-sindhi-fonts
c7bd01
%common_desc 
c7bd01
This package provides a free Sindhi truetype/opentype font 
c7bd01
c7bd01
%_font_pkg -n sindhi -f %{fontconf}-sindhi.conf PakTypeNaskhBasicSindhi.ttf
c7bd01
c7bd01
%package -n %{fontname}-urdu-fonts
c7bd01
Summary: Font for Urdu from PakType
c7bd01
Group: User Interface/X
c7bd01
Requires: %{name}-common = %{version}-%{release}
c7bd01
%description -n %{fontname}-urdu-fonts
c7bd01
%common_desc 
c7bd01
This package provides a free Urdu truetype/opentype font 
c7bd01
c7bd01
%_font_pkg -n urdu -f %{fontconf}-urdu.conf PakTypeNaskhBasicUrdu.ttf
c7bd01
c7bd01
%_font_pkg  -f %{fontconf}.conf PakTypeNaskhBasic.ttf
c7bd01
c7bd01
%prep
c7bd01
%setup -q -c
c7bd01
mv NaskhBasic-3.0/* .
c7bd01
mv Ready\ to\ use\ fonts/* .
c7bd01
mv PakType\ Naskh\ Basic\ Farsi.ttf PakTypeNaskhBasicFarsi.ttf
c7bd01
mv PakType\ Naskh\ Basic.ttf PakTypeNaskhBasic.ttf
c7bd01
mv PakType\ Naskh\ Basic\ SA.ttf PakTypeNaskhBasicSA.ttf
c7bd01
mv PakType\ Naskh\ Basic\ Urdu.ttf PakTypeNaskhBasicUrdu.ttf
c7bd01
mv PakType\ Naskh\ Basic\ Sindhi.ttf PakTypeNaskhBasicSindhi.ttf
c7bd01
mv License\ files/* .
c7bd01
mv PakType\ Naskh\ Basic\ Comparison\ Chart.htm  PakType_Naskh_Basic_Comparison_Chart.htm
c7bd01
mv PakType\ Naskh\ Basic\ Comparison\ Chart.pdf PakType_Naskh_Basic_Comparison_Chart.pdf
c7bd01
%{__sed} -i 's/\r//'  PakType_Naskh_Basic_Comparison_Chart.htm
c7bd01
mv PakType\ Naskh\ Basic\ License.txt  PakType_Naskh_Basic_License.txt
c7bd01
%{__sed} -i 's/\r//' PakType_Naskh_Basic_License.txt
c7bd01
chmod a-x PakType_Naskh_Basic_Comparison_Chart.htm PakType_Naskh_Basic_License.txt PakType_Naskh_Basic_Comparison_Chart.pdf
c7bd01
for txt in Readme.txt ; do
c7bd01
   fold -s $txt > $txt.new
c7bd01
   sed -i 's/\x92//g' $txt.new
c7bd01
   sed -i 's/\x93//g' $txt.new
c7bd01
   sed -i 's/\x94//g' $txt.new
c7bd01
   sed -i 's/\x96//g' $txt.new
c7bd01
   sed -i 's/\r//' $txt.new
c7bd01
   touch -r $txt $txt.new
c7bd01
   mv $txt.new $txt
c7bd01
done
c7bd01
c7bd01
%build
c7bd01
echo "Nothing to do in Build."
c7bd01
c7bd01
%install
c7bd01
rm -rf $RPM_BUILD_ROOT
c7bd01
install -m 0755 -d $RPM_BUILD_ROOT%{_fontdir}
c7bd01
install -m 0644 -p PakTypeNaskhBasicFarsi.ttf PakTypeNaskhBasic.ttf PakTypeNaskhBasicSA.ttf PakTypeNaskhBasicUrdu.ttf PakTypeNaskhBasicSindhi.ttf $RPM_BUILD_ROOT%{_fontdir}
c7bd01
c7bd01
install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} \
c7bd01
                %{buildroot}%{_fontconfig_confdir}
c7bd01
c7bd01
install -m 0644 -p %{SOURCE1} \
c7bd01
        %{buildroot}%{_fontconfig_templatedir}/%{fontconf}-sa.conf
c7bd01
c7bd01
c7bd01
install -m 0644 -p %{SOURCE2} \
c7bd01
        %{buildroot}%{_fontconfig_templatedir}/%{fontconf}-sindhi.conf
c7bd01
c7bd01
install -m 0644 -p %{SOURCE3} \
c7bd01
        %{buildroot}%{_fontconfig_templatedir}/%{fontconf}-farsi.conf
c7bd01
c7bd01
c7bd01
install -m 0644 -p %{SOURCE4} \
c7bd01
        %{buildroot}%{_fontconfig_templatedir}/%{fontconf}-urdu.conf
c7bd01
c7bd01
install -m 0644 -p %{SOURCE5} \
c7bd01
        %{buildroot}%{_fontconfig_templatedir}/%{fontconf}.conf
c7bd01
c7bd01
c7bd01
for fconf in %{fontconf}-sa.conf \
c7bd01
             %{fontconf}-sindhi.conf \
c7bd01
             %{fontconf}-farsi.conf \
c7bd01
             %{fontconf}-urdu.conf \
c7bd01
             %{fontconf}.conf ; do
c7bd01
  ln -s %{_fontconfig_templatedir}/$fconf \
c7bd01
        %{buildroot}%{_fontconfig_confdir}/$fconf
c7bd01
done
c7bd01
c7bd01
c7bd01
c7bd01
%clean
c7bd01
rm -rf $RPM_BUILD_ROOT
c7bd01
c7bd01
c7bd01
%files common
c7bd01
%defattr(-,root,root,-)
c7bd01
%dir %{fontdir}
c7bd01
%doc PakType_Naskh_Basic_Comparison_Chart.htm PakType_Naskh_Basic_License.txt PakType_Naskh_Basic_Comparison_Chart.pdf Readme.txt
c7bd01
c7bd01
%changelog
c7bd01
* Fri Mar 12 2010 Naveen Kumar <nkumar@redhat.com> - 3.0-6
c7bd01
- Changes in summary and description
c7bd01
c7bd01
* Fri Mar 12 2010 Naveen Kumar <nkumar@redhat.com> - 3.0-5
c7bd01
- changed the name of package from paktype-nashk-basic to paktype-naskh-basic
c7bd01
c7bd01
* Fri Mar 9 2010 Naveen Kumar <nkumar@redhat.com> - 3.0-4
c7bd01
- removed redundant  BuildRequires from specfile
c7bd01
- removed unnecessary rm/rmdir's from specfile
c7bd01
- Sane updates in docs.
c7bd01
c7bd01
* Fri Mar 5 2010 Naveen Kumar <nkumar@redhat.com> - 3.0-3
c7bd01
- removed all cd's
c7bd01
- changes w.r.t sed in prep section
c7bd01
- added .conf file for PakTypeNaskhBasic.ttf
c7bd01
- files section added for common
c7bd01
- removed space from 67-*-sindhi.conf
c7bd01
c7bd01
* Mon Feb 15 2010 Naveen Kumar <nkumar@redhat.com> - 3.0-2
c7bd01
- Re-packing with updated License information.
c7bd01
- Changes in Spec file with new upstream source.
c7bd01
- Added conf files
c7bd01
c7bd01
* Mon Feb 15 2010 Naveen Kumar <nkumar@redhat.com> - 3.0-1
c7bd01
- Initial packaging for version-3.0