# help2man is executed from ./src/Makefile if main.c or configure.ac is newer
# than recode.1.
BuildRequires: make
BuildRequires: libtool
BuildRequires: texinfo
# Tests:
BuildRequires: python3-Cython
BuildRequires: python3-devel >= 3.7.5
BuildRequires: python3-setuptools
%description
The `recode' converts files between character sets and usages.
It recognizes or produces nearly 150 different character sets
and is able to transliterate files between almost any pair. When exact
transliteration are not possible, it may get rid of the offending
characters or fall back on approximations. Most RFC 1345 character sets
are supported.
The recode tool and library convert files between character sets and surfaces.
It recognizes or produces over 200 different character sets (or about 300 if
combined with an iconv library) and transliterates files between almost any
pair. When exact transliteration is not possible, it gets rid of the offending
character or falls back on an approximations.
%package devel
Summary: Header files for development using recode
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: Header files for development using recode library
# Header files are LGPLv3+
License: LGPL-3.0-or-later
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The `recode' library converts files between character sets and usages.
The library recognizes or produces nearly 150 different character sets
and is able to transliterate files between almost any pair. When exact
transliteration are not possible, it may get rid of the offending
characters or fall back on approximations. Most RFC 1345 character sets
are supported.
This package provides the header files for a recode library.
%prep
%setup -q
%patch0 -p1
%patch1 -p1 -b .getcwd
%patch2 -p0
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
rm m4/libtool.m4
rm acinclude.m4
%autosetup -p1 -n %{name}-%{version}
autoreconf -fi
%build
autoreconf -fiv
%configure --disable-static
make %{?_smp_mflags}
export PYTHON=%{__python3}
%configure \
--without-dmalloc \
--disable-gcc-warnings \
--enable-largefile \
--enable-nls \
--disable-rpath \
--enable-shared \
--disable-static
%{make_build}
%check
make check
%install
%makeinstall
%{make_install}
%find_lang %{name}
# remove unpackaged file from the buildroot
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
rm -r $RPM_BUILD_ROOT%{_infodir}/dir
# remove libtool archives
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
%post
/sbin/ldconfig
/sbin/install-info %{_infodir}/recode.info.gz %{_infodir}/dir --entry="* recode: (recode). Conversion between character sets and surfaces." || :
%preun
if [ $1 = 0 ]; then
/sbin/install-info --delete %{_infodir}/recode.info.gz %{_infodir}/dir --entry="* recode: (recode). Conversion between character sets and surfaces." || :
fi
%postun -p /sbin/ldconfig
rm $RPM_BUILD_ROOT%{_libdir}/*.la
%files -f %{name}.lang
%doc AUTHORS COPYING* ChangeLog NEWS README THANKS TODO
%license COPYING COPYING-LIB
# Changelog is not helpful
%doc AUTHORS NEWS README THANKS TODO
%{_mandir}/*/*
%{_infodir}/recode.info*
%{_bindir}/*
%{_libdir}/*.so.0*
%{_libdir}/librecode.so.3
%{_libdir}/librecode.so.3.*
%files devel
%{_libdir}/*.so
%{_includedir}/*
%changelog
* Thu Dec 26 2024 Dmitriy Samoylik <samoylikdv@msvsphere-os.ru> - 3.7.14-6