File libdatrie.spec of Package libdatrie

#
# spec file for package libdatrie
#
# Copyright (c) 2015 SUSE LINUX 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:           libdatrie
Version:        0.2.9
Release:        0
Summary:        Double-Array Trie Library
License:        LGPL-2.1
Group:          System/Libraries
Url:            http://linux.thai.net/~thep/datrie/datrie.html
Source:         http://linux.thai.net/pub/thailinux/software/libthai/%{name}-%{version}.tar.xz
Source99:       baselibs.conf
# sent upstream (theppitak@gmail.com)
Patch0:         libdatrie-doxygen-version-check.patch
BuildRequires:  autoconf-archive
BuildRequires:  doxygen
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRequires:  xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is an implementation of double-array structure for representing
trie, as proposed by Junichi Aoe.

%package -n libdatrie1
Summary:        Double-Array Trie Library
Group:          Development/Libraries/C and C++

%description -n libdatrie1
This is an implementation of double-array structure for representing
trie, as proposed by Junichi Aoe.

%package devel
Summary:        Double-Array Trie Library (development)
Group:          Development/Libraries/C and C++
Requires:       libdatrie1 = %{version}

%description devel
This is an implementation of double-array structure for representing
trie, as proposed by Junichi Aoe.

This package contains the development files for libdatrie.

%prep
%setup -q
%patch0 -p1

%build
autoreconf -fiv
%configure \
        --disable-static --with-pic \
        --with-html-docdir=%{_docdir}/libdatrie/html
make %{?_smp_mflags}

%install
%makeinstall
rm -f %{buildroot}%{_libdir}/libdatrie.la
# This is not installed where it should
mv %{buildroot}%{_datadir}/doc/libdatrie/README.migration %{buildroot}%{_docdir}/libdatrie/

%post -n libdatrie1 -p /sbin/ldconfig

%postun -n libdatrie1 -p /sbin/ldconfig

%files -n libdatrie1
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING README
%{_libdir}/libdatrie.so.1*

%files devel
%defattr(-,root,root)
%{_bindir}/trietool*
%doc %{_mandir}/man*/trietool*.1.gz
%{_includedir}/datrie/
%{_libdir}/libdatrie.so
%{_libdir}/pkgconfig/datrie-0.2.pc
%doc %{_docdir}/libdatrie/

%changelog