File libtabe.spec of Package libtabe

#
# spec file for package libtabe
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           libtabe
Version:        0.2.6
Release:        0
Summary:        A Library for Chinese Language Processing Used in Input Methods
License:        BSD-3-Clause
Group:          System/I18n/Chinese
URL:            https://libtabe.sourceforge.net/
Source0:        ftp://xcin.linux.org.tw/pub/xcin/xcin/libtabe-0.2.6.tar.bz2
Source1:        config.sub
Patch0:         libtabe-noweak.diff
Patch1:         libtabe-db41.diff
Patch2:         libtabe-proper-DESTDIR.patch
Patch3:         libtabe-memoryleak.patch
BuildRequires:  db-devel
BuildRequires:  libX11-devel
BuildRequires:  libtool

%description
libtabe is a library that provides useful Chinese functions and
routines that deal with many fundamental elements, such as
pronunciation(BoPoMoFo), character frequency, word identification, and
word frequency. libtabe also comes with a free word database consisting
of 140,000 words.

More functionality is expected to be put into the library in the
future.

A practical application of libtabe is the intelligent phonetic input
method interface, bims. bims accepts input in BoPoMoFo and generates
output as meaningful sentences.

The XCIN-2.5 bimsphone module is based directly on libtabe and bims. In
the future, more modules might also be based on it.

%package -n libtabe2
Summary:        A Library for Chinese Language Processing Used in Input Methods
Group:          System/Libraries

%description -n libtabe2
libtabe is a library that provides useful Chinese functions and
routines that deal with many fundamental elements, such as
pronunciation(BoPoMoFo), character frequency, word identification, and
word frequency. libtabe also comes with a free word database consisting
of 140,000 words.

More functionality is expected to be put into the library in the
future.

A practical application of libtabe is the intelligent phonetic input
method interface, bims. bims accepts input in BoPoMoFo and generates
output as meaningful sentences.

The XCIN-2.5 bimsphone module is based directly on libtabe and bims. In
the future, more modules might also be based on it.

%package -n libbims2
Summary:        Intelligent phonetic input method interface
Group:          System/Libraries

%description -n libbims2
A practical application of libtabe is the intelligent phonetic input
method interface, bims. bims accepts input in BoPoMoFo and generates
output as meaningful sentences.

%package devel
Summary:        Development Libraries and Header Files for libtabe Library
Group:          Development/Libraries/C and C++
Requires:       libbims2 = %{version}
Requires:       libtabe2 = %{version}
Requires:       xorg-x11-proto-devel

%description devel
This package provides the development libraries and header files for
the libtabe library.

%prep
%setup -q -n libtabe
%patch -P 0 -p1
%patch -P 1
%patch -P 2
%patch -P 3
cp -f %{SOURCE1} script/

%build
mv script/configure.in .
rm -Rf CVS doc/CVS
libtoolize --force
aclocal
autoconf
%configure --disable-static --with-pic \
            --with-db-inc=%{_includedir}/db4 \
            --enable-shared
#parallel make does not work
make

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
chmod +x %{buildroot}%{_libdir}/*.so.*

%post -n libtabe2 -p /sbin/ldconfig
%post -n libbims2 -p /sbin/ldconfig
%postun -n libtabe2 -p /sbin/ldconfig
%postun -n libbims2 -p /sbin/ldconfig

%files -n libtabe2
%license COPYING
%doc doc
%{_libdir}/libtabe.so.*
%{_bindir}/*
%{_libdir}/tabe/

%files -n libbims2
%{_libdir}/libbims.so.*

%files devel
%{_libdir}/lib*.so
%{_includedir}/*.h

%changelog
openSUSE Build Service is sponsored by