File libpinyin.spec of Package libpinyin

#
# spec file for package libpinyin
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#


Name:           libpinyin
Version:        0.8.0
Release:        0
Summary:        Intelligent Pinyin IME
License:        GPL-2.0+
Group:          System/I18n/Chinese
Url:            https://github.com/libpinyin/libpinyin
Source:         %{name}-%{version}.tar.gz
BuildRequires:  gcc-c++
BuildRequires:  glib2-devel
BuildRequires:  intltool
%if 0%{?suse_version} 
%if 0%{?suse_version} >= 1140
BuildRequires:  libdb-4_8-devel
%else
BuildRequires:  libdb-4_5-devel
%endif
%else
BuildRequires:  libdb-devel
BuildRequires:  libtool-ltdl-devel
%endif
BuildRequires:  fdupes
BuildRequires:  libtool
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Libpinyin is a staging joint effort of many Chinese Pinyin IME development teams.
It aims to be an Intelligent (and Universal) Sentence-based Pinyin IME Backend
supports many Language Models and Frontends.

%package -n %{name}2
Summary:        Intelligent Pinyin IME
Group:          System/I18n/Chinese
Provides:       %{name} = %{version}

%description -n %{name}2
Libpinyin is a staging joint effort of many Chinese Pinyin IME development teams.
It aims to be an Intelligent (and Universal) Sentence-based Pinyin IME Backend 
supports many Language Models and Frontends.

%package devel
Summary:        Intelligent Pinyin IME
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description devel
Libpinyin is a staging joint effort of many Chinese Pinyin IME development teams.
It aims to be an Intelligent (and Universal) Sentence-based Pinyin IME Backend 
supports many Language Models and Frontends.

%prep
%setup -q

%build
%configure
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install
%{__rm} -rf %{buildroot}%{_libdir}/%{name}.a
%{__rm} -rf %{buildroot}%{_libdir}/%{name}.la

%if 0%{?suse_version}
%fdupes %{buildroot}
%else
fdupes -nqr %{buildroot}
%endif

%post -n %{name}2 -p /sbin/ldconfig

%postun -n %{name}2 -p /sbin/ldconfig

%files -n %{name}2
%defattr(-,root,root)
%doc ChangeLog AUTHORS COPYING
%{_mandir}/man1/*
%{_bindir}/*
%{_libdir}/%{name}.so.*
%{_datadir}/%{name}

%files devel
%defattr(-,root,root)
%{_includedir}/%{name}-%{version}/
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc

%changelog
openSUSE Build Service is sponsored by