Behdad Esfahbod e0e4098
%define datrie_version 0.2.3
besfahbo 9bb2fc4
besfahbo 9bb2fc4
Summary:  Thai language support routines
besfahbo 9bb2fc4
Name: libthai
Behdad Esfahbod e0e4098
Version: 0.1.14
a7e5cfe
Release: 5%{?dist}
915df58
License: LGPLv2+
besfahbo 9bb2fc4
Group: System Environment/Libraries
besfahbo 9bb2fc4
Source: ftp://linux.thai.net/pub/thailinux/software/libthai/libthai-%{version}.tar.gz
besfahbo 9bb2fc4
Source1: ftp://linux.thai.net/pub/thailinux/software/libthai/libdatrie-%{datrie_version}.tar.gz
Behdad Esfahbod 8f1c468
Patch: libthai-libdatrie-static-build.patch
Behdad Esfahbod c26b9a5
Patch1: libthai-0.1.9-doxygen-segfault.patch
ffefb71
Patch2: libthai-0.1.9-multilib.patch
besfahbo 9bb2fc4
URL: http://linux.thai.net
besfahbo 9bb2fc4
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
besfahbo 9bb2fc4
besfahbo 9bb2fc4
BuildRequires: pkgconfig
besfahbo 9bb2fc4
BuildRequires: doxygen
besfahbo 9bb2fc4
# we edit the Makefile.am's
besfahbo 9bb2fc4
BuildRequires: automake
c7d9dec
BuildRequires: autoconf
besfahbo 9bb2fc4
BuildRequires: libtool
besfahbo 9bb2fc4
besfahbo 9bb2fc4
%description
besfahbo 9bb2fc4
LibThai is a set of Thai language support routines aimed to ease
besfahbo 9bb2fc4
developers' tasks to incorporate Thai language support in their applications.
besfahbo 9bb2fc4
It includes important Thai-specific functions e.g. word breaking, input and
besfahbo 9bb2fc4
output methods as well as basic character and string supports.
besfahbo 9bb2fc4
besfahbo 9bb2fc4
%package devel
besfahbo 9bb2fc4
Summary:  Thai language support routines
besfahbo 9bb2fc4
Group: Development/Libraries
besfahbo 9bb2fc4
Requires: %{name} = %{version}-%{release}
besfahbo 9bb2fc4
Requires: pkgconfig
besfahbo 9bb2fc4
besfahbo 9bb2fc4
%description devel
besfahbo 9bb2fc4
The libthai-devel package includes the header files and developer docs 
besfahbo 9bb2fc4
for the libthai package.
besfahbo 9bb2fc4
besfahbo 9bb2fc4
Install libthai-devel if you want to develop programs which will use
besfahbo 9bb2fc4
libthai.
besfahbo 9bb2fc4
besfahbo 9bb2fc4
%prep
besfahbo 9bb2fc4
%setup -q -n %{name}-%{version} -a 1
Behdad Esfahbod e0e4098
mv libdatrie-%{datrie_version} libdatrie
besfahbo 9bb2fc4
%patch -p1 -b .static-build
Behdad Esfahbod c26b9a5
%patch1 -p1 -b .doxygen-segfault
ffefb71
%patch2 -p1 -b .multilib
besfahbo 9bb2fc4
besfahbo 9bb2fc4
%build
besfahbo 9bb2fc4
besfahbo 9bb2fc4
# libthai depends on this library called libdatrie.  libdatrie is a
besfahbo 9bb2fc4
# data-structure implementaiton that the author of libthai ripped out of it.
besfahbo 9bb2fc4
# However, since libthai is the only user of that code, there's no reason to
besfahbo 9bb2fc4
# 1) package it separately, 2) use it as a shared library.
besfahbo 9bb2fc4
# So, we compile it as a libtool convenience library and include in libthai.so,
besfahbo 9bb2fc4
# and use symbol hiding to hide them (and other internal symbols).
besfahbo 9bb2fc4
#
besfahbo 9bb2fc4
# The patch takes care of making datrie into a convenience lib and making sure
besfahbo 9bb2fc4
# libthai will include it (and hide its symbols), and the exports make sure
besfahbo 9bb2fc4
# libthai finds the uninstalled libdatrie.  We need to call automake, since
besfahbo 9bb2fc4
# the patch modifies a few Makefile.am's.
besfahbo 9bb2fc4
besfahbo 9bb2fc4
{
Behdad Esfahbod e0e4098
  pushd libdatrie
211a00b
  mkdir m4
c7d9dec
  autoreconf -i -f
besfahbo 9bb2fc4
  %configure
besfahbo 9bb2fc4
  make
besfahbo 9bb2fc4
  popd
besfahbo 9bb2fc4
}
besfahbo 9bb2fc4
Behdad Esfahbod e0e4098
export DATRIE_CFLAGS="-I$PWD/libdatrie"
Behdad Esfahbod e0e4098
export DATRIE_LIBS="$PWD/libdatrie/datrie/libdatrie.la"
Behdad Esfahbod e0e4098
export PATH="$PWD/libdatrie/tools:$PATH"
c7d9dec
c7d9dec
autoreconf -i -f
c7d9dec
besfahbo 9bb2fc4
%configure --disable-static
besfahbo 9bb2fc4
make
besfahbo 9bb2fc4
besfahbo 9bb2fc4
%install
besfahbo 9bb2fc4
rm -rf $RPM_BUILD_ROOT
besfahbo 9bb2fc4
besfahbo 9bb2fc4
%makeinstall
besfahbo 9bb2fc4
Behdad Esfahbod c26b9a5
# move installed doc files back to build directory to package them
besfahbo 9bb2fc4
# in the right place
besfahbo 9bb2fc4
mkdir installed-docs
besfahbo 9bb2fc4
mv $RPM_BUILD_ROOT%{_docdir}/libthai/* installed-docs
besfahbo 9bb2fc4
rmdir $RPM_BUILD_ROOT%{_docdir}/libthai
besfahbo 9bb2fc4
besfahbo 9bb2fc4
rm $RPM_BUILD_ROOT%{_libdir}/*.la
besfahbo 9bb2fc4
besfahbo 9bb2fc4
%clean
besfahbo 9bb2fc4
rm -rf $RPM_BUILD_ROOT
besfahbo 9bb2fc4
besfahbo 9bb2fc4
%post -p /sbin/ldconfig
besfahbo 9bb2fc4
besfahbo 9bb2fc4
%postun -p /sbin/ldconfig
besfahbo 9bb2fc4
besfahbo 9bb2fc4
%files
besfahbo 9bb2fc4
%defattr(-, root, root)
besfahbo 9bb2fc4
%doc README AUTHORS COPYING ChangeLog TODO
besfahbo 9bb2fc4
%{_libdir}/lib*.so.*
besfahbo 9bb2fc4
%{_datadir}/libthai
besfahbo 9bb2fc4
besfahbo 9bb2fc4
%files devel
besfahbo 9bb2fc4
%defattr(-, root, root)
besfahbo 9bb2fc4
%doc installed-docs/*
besfahbo 9bb2fc4
%{_includedir}/thai
besfahbo 9bb2fc4
%{_libdir}/lib*.so
besfahbo 9bb2fc4
%{_libdir}/pkgconfig/*
besfahbo 9bb2fc4
%{_mandir}/man3/*
besfahbo 9bb2fc4
besfahbo 9bb2fc4
%changelog
a7e5cfe
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.14-5
a7e5cfe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a7e5cfe
d61dce5
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.14-4
d61dce5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
d61dce5
Behdad Esfahbod 8f1c468
* Wed Mar  3 2010 Behdad Esfahbod <behdad@redhat.com> - 0.1.14-3
Behdad Esfahbod e0e4098
- Update to 0.1.14
Behdad Esfahbod e0e4098
6b74cf7
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.12-2
6b74cf7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
6b74cf7
211a00b
* Sat Jun 27 2009 Matthias Clasen <mclasen@redhat.com> - 0.1.12-1
211a00b
- Update to 0.1.12
211a00b
c7d9dec
* Fri Feb 27 2009 Matthias Clasen <mclasen@redhat.com> - 0.1.9-7
c7d9dec
- Fix the build
c7d9dec
979f8f8
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.9-6
979f8f8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
979f8f8
915df58
* Wed May 21 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.1.9-5
915df58
- fix license tag
915df58
ffefb71
* Mon Mar 17 2008 Matthias Clasen <mclasen@redhat.com> - 0.1.9-4
ffefb71
- Attempt to fix multilib conflict
ffefb71
cccbb87
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.1.9-3
cccbb87
- Autorebuild for GCC 4.3
cccbb87
Behdad Esfahbod c26b9a5
* Tue Nov 13 2007 Behdad Esfahbod <besfahbo@redhat.com> 0.1.9-2
Behdad Esfahbod c26b9a5
- Add libthai-0.1.9-doxygen-segfault.patch to workaround doxygen segfault
Behdad Esfahbod c26b9a5
Behdad Esfahbod 3a41bed
* Tue Aug 28 2007 Behdad Esfahbod <besfahbo@redhat.com> 0.1.9-1
Behdad Esfahbod 3a41bed
- Update to 0.1.9
Behdad Esfahbod 3a41bed
- Adjust patch
Behdad Esfahbod 3a41bed
52b0c7e
* Thu Aug 23 2007 Adam Jackson <ajax@redhat.com> - 0.1.7-6
52b0c7e
- Rebuild for build ID
52b0c7e
besfahbo 964b5e8
* Tue Jan 22 2007 Behdad Esfahbod <besfahbo@redhat.com> 0.1.7-5
besfahbo 964b5e8
- Export _th_*_tbl symbols too.  They are accessed by some of the macros.
besfahbo 964b5e8
besfahbo c4d3f9f
* Tue Jan 17 2007 Behdad Esfahbod <besfahbo@redhat.com> 0.1.7-4
besfahbo c4d3f9f
- Patch libthai.pc.in to not require datrie.
besfahbo c4d3f9f
besfahbo 9bb2fc4
* Tue Jan 16 2007 Matthias Clasen <mclasen@redhat.com> 0.1.7-3
besfahbo 9bb2fc4
- Miscellaneous fixes
besfahbo 9bb2fc4
 
besfahbo 9bb2fc4
* Tue Jan 16 2007 Behdad Esfahbod <besfahbo@redhat.com> 0.1.7-2
besfahbo 9bb2fc4
- Apply comments from Matthias Clasen (#222611) 
besfahbo 9bb2fc4
- devel summary improvement
besfahbo 9bb2fc4
- devel require pkgconfig
besfahbo 9bb2fc4
- configure --disable-static
besfahbo 9bb2fc4
- Add comments about the voodoo
besfahbo 9bb2fc4
- Install docs in the right place
besfahbo 9bb2fc4
besfahbo 9bb2fc4
* Sun Jan 14 2007 Behdad Esfahbod <besfahbo@redhat.com> 0.1.7-1
besfahbo 9bb2fc4
- Initial package based on package by Supphachoke Suntiwichaya
besfahbo 9bb2fc4
  and Kamthorn Krairaksa for the OLPC.