Name: bg5ps
Version: 1.3.0
Release: 12
License: GPL
Summary: Converts Big5 encoded Chinese into printable postscript.
Group: Applications/Publishing
Source: %{name}-%{PACKAGE_VERSION}.tar.gz
Source1: %{name}-%{PACKAGE_VERSION}-big5.conf
Source2: %{name}-%{PACKAGE_VERSION}-gb2312.conf
Patch: %{name}-%{PACKAGE_VERSION}-redhat.patch
Requires: python
BuildPrereq: freetype-devel
BuildRoot: %{_tmppath}/%{name}-%{version}

%description
Bg5ps uses the ttf2ps program to convert the Big5 Coding chinese text
into a printable postscript file. Since it uses true type font, the
quality is much better than using bitmap fonts.

%prep
%setup -q
%patch -p1 -b .redhat

%build
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_sysconfdir}
cp bg5ps ttf2psm $RPM_BUILD_ROOT%{_bindir}
cp %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/bg5ps.conf.zh_TW.Big5
ln -sf bg5ps.conf.zh_TW.Big5 $RPM_BUILD_ROOT%{_sysconfdir}/bg5ps.conf
ln -sf bg5ps.conf.zh_TW.Big5 $RPM_BUILD_ROOT%{_sysconfdir}/bg5ps.conf.zh_TW
cp %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/bg5ps.conf.zh_CN.GB2312
ln -sf bg5ps.conf.zh_CN.GB2312 $RPM_BUILD_ROOT%{_sysconfdir}/bg5ps.conf.zh_CN

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc doc/*
%{_bindir}/*
%config %{_sysconfdir}/*.conf*

%changelog
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt

* Tue Jan 14 2003 Akira TAGOH <tagoh@redhat.com> 1.3.0-11
- create the symlinks to bg5ps.conf.ll_cc in order to works correctly on CUPS.
- use the appropriate macros.
- s/Copyright/License/

* Thu Dec 12 2002 Tim Powers <timp@redhat.com> 1.3.0-10
- rebuild on all arches

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Tue Feb 26 2002 Leon Ho <llch@redhat.com>
- rebuild for new tree

* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Mon Jul 30 2001 Yukihiro Nakai <ynakai@redhat.com>
- Add BuildPrereq (#48483)

* Wed Jul 11 2001 Yukihiro Nakai <ynakai@redhat.com>
- Fix Makefile to support our freetype include path

* Mon Jul  9 2001 Yukihiro Nakai <ynakai@redhat.com>
- Add lang-switching configure function

* Sun Jul  8 2001 Yukihiro Nakai <ynakai@redhat.com>
- Change the bg5ps.conf default path.
- Fix the default setting in bg5ps.conf
- Add zh_CN.GB2312 settings

* Tue Jun 26 2001 Yukihiro Nakai <ynakai@redhat.com>
- Update to 1.3.0
- Rebuild against RHL 7.2

* Mon Jan 22 2001 Jason Wilson <jwilson@redhat.com>
- Added special ttf fonts and fixed config file

* Fri Jan  5 2001 Jason Wilson <jwilson@redhat.com>
- initial version