File libchardet.spec of Package libchardet
#
# spec file for package libchardet
#
# Copyright (c) 2015 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/
#
%define lname libchardet1
%define _name chardet
Name: libchardet
Version: 1.0.4
Release: 0
Summary: Mozilla Universal Chardet library
License: MPL-1.1
Group: Development/Libraries/C and C++
Url: http://mirror.oops.org/pub/oops/libchardet
Source: http://mirror.oops.org/pub/oops/%{name}/%{name}-%{version}.tar.bz2
Source1: baselibs.conf
BuildRequires: autoconf
BuildRequires: automake >= 1.12
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkg-config
%description
Mozilla's Universal Charset Detector C/C++ API.
%package -n %{lname}
Summary: Mozilla Universal Chardet library
Group: System/Libraries
%description -n %{lname}
Mozilla's Universal Charset Detector C/C++ API.
%package devel
Summary: Development files of libchardet
Group: Development/Libraries/C and C++
Requires: %{lname} = %{version}
%description devel
The libchardet development package includes the header files,
libraries, development tools necessary for compiling and linking
application which will use libchardet.
%prep
%setup -q
sed -i 's/^\(AM_MAINTAINER\)/m4_ifdef([AM_PROG_AR], [AM_PROG_AR])\n\1/' configure.ac
sed -i '/^dist_doc/d' Makefile.am
%build
autoreconf -fi
%configure --disable-static
make %{?_smp_mflags}
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig
%files -n %{lname}
%defattr(-,root,root)
%doc Changelog LICENSE README
%{_bindir}/%{_name}-config
%{_libdir}/%{name}.so.*
%files devel
%defattr(-,root,root)
%{_includedir}/%{_name}/
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{_name}.pc
%dir %{_mandir}/ko/
%dir %{_mandir}/ko/man3/
%{_mandir}/*/man?/detect*.?%{?ext_man}
%{_mandir}/man?/detect*.?%{?ext_man}
%changelog