%define ver 20030118
%define rel 5
%define prefix /usr/lib/im

Summary:IIIMF Input Method Software Developpers Kit
Name: im-sdk
Version: %{ver}
Release: %{rel}
License: Distributable
Source: %{name}-%{version}.tar.bz2
Source1: %{name}-htt.conf
Patch0: %{name}-20030110-buildpatch.patch
#Patch1: %{name}-20011223-DESTDIR.patch
#Patch2: %{name}-20011223-strlcpy.patch
URL: http://www.oepni18n.org/
Group: User Interface/X
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildPreReq: tcp_wrappers
#BuildRequires: Canna-devel
ExcludeArch: ia64

%description
im-sdk is a IIIMF Input Method Software Developpers Kit.

%prep
rm -rf $RPM_BUILD_ROOT

%setup -q -n %{name}
%patch0 -p1
#%patch1 -p2 -b .DESTDIR
#%patch2 -p1 -b .strlcpy

%build
make config
make build

%install

cd leif
make DESTDIR=${RPM_BUILD_ROOT} LOCALEDIR=/usr/lib/im/locale install
cd -
cd lib/CSConv
make prefix=${RPM_BUILD_ROOT}%{prefix} install
cd -
cd iiimxcf/xiiimp.so
make DESTDIR=${RPM_BUILD_ROOT} install
cd iiimp
mkdir -p $RPM_BUILD_ROOT/usr/X11R6/lib/X11/locale/common/
/bin/sh ../libtool --mode=install /usr/bin/install -c xiiimp.la \
        $RPM_BUILD_ROOT/usr/X11R6/lib/X11/locale/common/xiiimp.la
cd ../../..
cd iiimxcf/htt_xbe
make DESTDIR=${RPM_BUILD_ROOT} install
cd -
cd iiimsf
make DESTDIR=${RPM_BUILD_ROOT} bindir=/usr/lib/im install
cd
%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root)
%{prefix}/*
/usr/X11R6/lib/X11/locale/common/*

%changelog
* Mon Feb 24 2003 Elliot Lee <sopwith@redhat.com>
- debuginfo rebuild

* Sun Feb 23 2003 Tim Powers <timp@redhat.com>
- added buildprereq on tcp_wrappers

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

* Wed Jan 22 2003 Yu Shao <yshao@redhat.com>
- added several 64bit patches to build it on all
  architectures

* Mon Jan 20 2003 Yu Shao <yshao@redhat.com>
- new 20030118 build

* Thu Jan 16 2003 Yu Shao <yshao@redhat.com>
- new codebase with EIMIL/PCE interim implemention
- spec file update
- im-sdk-20030110-buildpatch.patch

* Thu Oct 7 2002 Yu Shao <yshao@redhat.com>
- experimental implementation IIIMSF CVS

* Thu Oct 3 2002 Yu Shao <yshao@redhat.com>
- new stable branch CVS

* Thu Aug 15 2002 Yu Shao <yshao@redhat.com>
- new 20020813 CVS, disable patch2

* Sat Aug 10 2002 Elliot Lee <sopwith@redhat.com>
- rebuilt with gcc-3.2 (we hope)

* Tue Jul 23 2002 Tim Powers <timp@redhat.com> 20011223-7
- build using gcc-3.2-0.1

* Thu Jul 18 2002 Akira TAGOH <tagoh@redhat.com> 20011223-6
- add the owned directory.

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

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

* Tue Mar 26 2002 Yukihiro Nakai <ynakai@redhat.com>
- Add some fix for ia64,alpha
- Add strlcpy/strlcat patch, #61898

* Sun Dec 30 2001 Yukihiro Nakai <ynakai@redhat.com>
- Initial release