Name: libchardet Version: 1.0.5 Release: 2 Summary: Mozilla's universal character set detector License: MPLv1.1 or LGPLv2+ or GPLv2+ URL: http://ftp.oops.org/pub/oops/libchardet/ Source0: https://github.com/Joungkyun/libchardet/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch0: %{name}-1.0.4-pc.in.patch BuildRequires: libstdc++-devel BuildRequires: glibc-common BuildRequires: coreutils BuildRequires: make BuildRequires: findutils BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: sed BuildRequires: perl-interpreter %description libchardet provides an interface to Mozilla's universal charset detector, which detects the charset used to encode data. %package devel Summary: Header and object files for development using libchardet Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The libchardet-devel package contains the header and object files necessary for developing programs which use the libchardet libraries. %prep %setup -q %patch0 -p1 # Fix rpmlint file-not-utf8 pushd man/en for i in detect_init.3 detect_obj_free.3 detect_obj_init.3 detect_reset.3 ; do iconv --from=ISO-8859-1 --to=UTF-8 $i > $i.conv mv $i.conv $i done popd %build %configure --disable-static --enable-shared %make_build %install %make_install %find_lang %{name}-devel --with-man --all-name # remove all '*.la' files find %{buildroot} -name '*.la' -exec rm -f {} ';' # remove LICENSE file from %%_docdir rm -rf %{buildroot}%{_datadir}/doc/%{name}/LICENSE %ldconfig_scriptlets %files %doc Changelog README.md %license LICENSE %{_libdir}/%{name}.so.* %files devel -f %{name}-devel.lang %{_bindir}/chardet-config %{_libdir}/*.so %{_libdir}/pkgconfig/chardet.pc %{_includedir}/chardet/*.h %{_mandir}/man3/* %changelog * Sun Sep 29 2024 zhuhongbo - 1.0.5-2 - fix: use accessible URL * Fri Aug 11 2023 leeffo - 1.0.5-1 - init package