diff --git a/libchardet-1.0.4-pc.in.patch b/libchardet-1.0.4-pc.in.patch new file mode 100644 index 0000000..c976e69 --- /dev/null +++ b/libchardet-1.0.4-pc.in.patch @@ -0,0 +1,8 @@ +--- libchardet-1.0.4/chardet.pc.in.orig 2015-12-10 20:03:21.809555590 +0100 ++++ libchardet-1.0.4/chardet.pc.in 2015-12-10 20:03:38.359561466 +0100 +@@ -9,4 +9,4 @@ + Description: Mozilla's Universal Charset Detector C/C++ API + Version: @PACKAGE_VERSION@ + Libs: -L${libdir} -lchardet +-Cflags: -I${includedir}/chardet @CFLAGS@ ++Cflags: -I${includedir}/chardet diff --git a/libchardet-1.0.5.tar.gz b/libchardet-1.0.5.tar.gz new file mode 100644 index 0000000..21428e4 Binary files /dev/null and b/libchardet-1.0.5.tar.gz differ diff --git a/libchardet.spec b/libchardet.spec new file mode 100644 index 0000000..a04fcfa --- /dev/null +++ b/libchardet.spec @@ -0,0 +1,76 @@ +Name: libchardet +Version: 1.0.5 +Release: 1 +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 +* Fri Aug 11 2023 leeffo - 1.0.5-1 +- init package diff --git a/libchardet.yaml b/libchardet.yaml new file mode 100644 index 0000000..433824d --- /dev/null +++ b/libchardet.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: libchardet +tag_prefix: ^v +separator: .