diff --git a/uchardet-0.0.6.tar.xz b/uchardet-0.0.6.tar.xz new file mode 100644 index 0000000..411ec6d Binary files /dev/null and b/uchardet-0.0.6.tar.xz differ diff --git a/uchardet.spec b/uchardet.spec new file mode 100644 index 0000000..1170672 --- /dev/null +++ b/uchardet.spec @@ -0,0 +1,69 @@ +Name: uchardet +Version: 0.0.6 +Release: 1 +Summary: An encoding detector library ported from Mozilla +License: MPLv1.1 +URL: https://www.freedesktop.org/wiki/Software/%{name} +Source0: https://www.freedesktop.org/software/%{name}/releases/%{name}-%{version}.tar.xz + +BuildRequires: gcc gcc-c++ cmake + +%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 devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains headers and shared libraries +for developing tools for uchardet. + +%prep +%autosetup +mkdir build + +%build +pushd build + %cmake .. \ + -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ + -DBUILD_STATIC=OFF + %make_build +popd + +%install +pushd build + %make_install +popd + +%ldconfig_scriptlets + +%check +pushd build + ctest -VV \ + %ifarch %{ix86} + || : + %else + ; + %endif +popd + +%files +%doc AUTHORS +%license COPYING +%{_bindir}/%{name} +%{_libdir}/lib%{name}.so.* +%{_mandir}/man1/%{name}.1.* + +%files devel +%{_includedir}/%{name}/ +%{_libdir}/lib%{name}.so +%{_libdir}/pkgconfig/%{name}.pc + +%changelog +* Mon Mar 2 2020 openEuler Buildteam - 0.0.6-1 +- Package init