#
# Conditional build:
-%bcond_without tests
-
+%bcond_without tests # do not perform "make check"
+%bcond_without static_libs # static libraries
+#
Summary: Text categorization library
Summary(pl.UTF-8): Biblioteka kategoryzacji tekstu
Name: libexttextcat
Release: 1
License: BSD
Group: Libraries
-URL: http://www.freedesktop.org/wiki/Software/libexttextcat
Source0: http://dev-www.libreoffice.org/src/libexttextcat/%{name}-%{version}.tar.xz
# Source0-md5: 941ec532832ffea01e121373a2733a96
+URL: http://www.freedesktop.org/wiki/Software/libexttextcat
Provides: libtextcat = %{version}-%{release}
Obsoletes: libtextcat < 3.2.0-1
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description -l pl.UTF-8
libexttextcat jest bazowaną na N-GRAM biblioteką kategoryzacji tekstu
-głównie przeznaczona do odgadywania języka.
+przeznaczona głównie do odgadywania języka.
%package devel
Summary: Development files for %{name}
Obsoletes: libtextcat-devel < 3.2.0-1
%description devel
-The %{name}-devel package contains libraries and header files for
-developing applications that use %{name}.
+This package contains the header files for developing applications
+that use %{name}.
%description devel -l pl.UTF-8
-Paczka %{name}-devel zawiera biblioteki i pliki nagłówkowe do
-tworzenia aplikacji opartych na %{name}.
+Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji opartych na
+%{name}.
+
+%package static
+Summary: Static libexttextcat library
+Summary(pl.UTF-8): Statyczna biblioteka libexttextcat
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static libexttextcat library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka libexttextcat.
%package tools
Summary: Tool for creating custom document fingerprints
-Summary(pl.UTF-8): Narzędzia do tworzenia niestandardowych odcisków dokumentów.
+Summary(pl.UTF-8): Narzędzia do tworzenia własnych odcisków dokumentów
Group: Applications/Publishing
Requires: %{name} = %{version}-%{release}
%description tools
-The %{name}-tools package contains the createfp program that allows
-you to easily create your own document fingerprints.
+This package contains the createfp program that allows you to easily
+create your own document fingerprints.
%description tools -l pl.UTF-8
-Paczka %{name}-tools zawiera program createfp który pozwla do łatwego
-tworzenia odcisków (fingerprints) dokumentów.
+Ten pakiet zawiera program createfp pozwalający łatwo tworzyć odciski
+(fingerprints) dokumentów.
%prep
%setup -q
%build
%configure \
- --disable-static \
+ %{!?with_static_libs:--disable-static} \
--disable-werror \
%{__make}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+# obsoleted by pkg-config
%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
%clean
%files
%defattr(644,root,root,755)
%doc LICENSE README*
-%attr(755,root,root) %{_libdir}/%{name}.so.*.*.*
-%ghost %{_libdir}/%{name}.so.0
+%attr(755,root,root) %{_libdir}/libexttextcat.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libexttextcat.so.0
%{_datadir}/%{name}
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/%{name}.so
+%attr(755,root,root) %{_libdir}/libexttextcat.so
%{_includedir}/%{name}
%{_pkgconfigdir}/%{name}.pc
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libexttextcat.a
+%endif
+
%files tools
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/createfp