uchardet/uchardet.spec
OBS User mrdocs 71b01e453e Accepting request 455607 from GNOME:Next
Fix source URL; please submit to oS:F, as this is a dependency to the GNOME 3.24 stack

OBS-URL: https://build.opensuse.org/request/show/455607
OBS-URL: https://build.opensuse.org/package/show/M17N/uchardet?expand=0&rev=4
2017-02-09 05:29:30 +00:00

112 lines
3.4 KiB
RPMSpec

#
# spec file for package uchardet
#
# Copyright (c) 2013 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 major 0
Name: uchardet
Version: 0.0.6
Release: 0
License: MPL-1.1 or GPL-2.0+ or LGPL-2.1+
Summary: Universal Charset Detection Library
Url: https://www.freedesktop.org/wiki/Software/uchardet/
Group: Productivity/Text/Utilities
Source0: https://www.freedesktop.org/software/%{name}/releases/%{name}-%{version}.tar.xz
Source1: baselibs.conf
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkg-config
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
uchardet is a C language binding of the original C++ implementation of
the universal charset detection library by Mozilla.
uchardet is an encoding detector library, which takes a sequence of
bytes in an unknown character encoding without any additional
information, and attempts to determine the encoding of the text.
%package -n libuchardet%{major}
Summary: Universal Charset Detection Library
Group: System/Libraries
%description -n libuchardet%{major}
uchardet is a C language binding of the original C++ implementation of
the universal charset detection library by Mozilla.
uchardet is an encoding detector library, which takes a sequence of
bytes in an unknown character encoding without any additional
information, and attempts to determine the encoding of the text.
This package contains the shared library.
%package -n libuchardet-devel
Summary: Universal Charset Detection Library
Group: Development/Libraries/C and C++
Requires: libuchardet%{major} = %{version}
%description -n libuchardet-devel
uchardet is a C language binding of the original C++ implementation of
the universal charset detection library by Mozilla.
uchardet is an encoding detector library, which takes a sequence of
bytes in an unknown character encoding without any additional
information, and attempts to determine the encoding of the text.
This package contains the development files.
%prep
%setup -q
%build
mkdir build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_C_FLAGS="%{optflags}" \
-DCMAKE_CXX_FLAGS="%{optflags}" \
-DCMAKE_INSTALL_LIBDIR=%{_libdir}
make %{?_smp_mflags} VERBOSE=1
%install
pushd build
%make_install
popd
rm -f %{buildroot}%{_libdir}/libuchardet.a
%post -n libuchardet%{major} -p /sbin/ldconfig
%postun -n libuchardet%{major} -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING
%{_bindir}/%{name}
%doc %{_mandir}/man?/*
%files -n libuchardet%{major}
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%files -n libuchardet-devel
%defattr(-,root,root,-)
%doc AUTHORS COPYING
%{_includedir}/%{name}
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%changelog