%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}

# Basic Information
Name:		libunistring
Summary:	library for manipulating Unicode strings
Summary(ja):	Unicode 文字列を処理するライブラリ
Version:	1.1
Release:	1%{?_dist_release}
Vendor:		Project Vine
Group:		system
Distribution:	Vine Linux
Packager:	yasumichi

License:	GPLv3+
URL:		https://www.gnu.org/software/libunistring/
Source0:	https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

# Dependency
BuildRequires:	texinfo
BuildRequires:	texlive
BuildRequires:	perl

%description
Text files are nowadays usually encoded in Unicode, and may consist of very
different scripts – from Latin letters to Chinese Hanzi –, with many kinds
of special characters – accents, right-to-left writing marks, hyphens,
Roman numbers, and much more. But the POSIX platform APIs for text do not
contain adequate functions for dealing with particular properties of many
Unicode characters. In fact, the POSIX APIs for text have several
assumptions at their base which don't hold for Unicode text.

This library provides functions for manipulating Unicode strings and for
manipulating C strings according to the Unicode standard.

#%%description -l ja
#%ここに日本語で詳細を記述してください。

%package devel
Summary:	Development files and documentation for libunistring
Summary(ja):	libunistring の開発用ファイルとドキュメント
Group:		programming
Requires:	%{name} = %{version}-%{release}

%description devel
Development files and documentation for libunistring

%package -n compat32-%{name}
Summary:        library for manipulating Unicode strings
Summary(ja):    Unicode 文字列を処理するライブラリ
Group:          system,legacy
Requires:       %{name} = %{version}-%{release}

%description -n compat32-%{name}
Text files are nowadays usually encoded in Unicode, and may consist of very
different scripts – from Latin letters to Chinese Hanzi –, with many kinds
of special characters – accents, right-to-left writing marks, hyphens,
Roman numbers, and much more. But the POSIX platform APIs for text do not
contain adequate functions for dealing with particular properties of many
Unicode characters. In fact, the POSIX APIs for text have several
assumptions at their base which don't hold for Unicode text.

This library provides functions for manipulating Unicode strings and for
manipulating C strings according to the Unicode standard.

%package -n compat32-%{name}-devel
Summary:        Development files and documentation for libunistring
Summary(ja):    libunistring の開発用ファイルとドキュメント
Group:          programming,legacy
Requires:       compat32-%{name} = %{version}-%{release}
Requires:       %{name}-devel = %{version}-%{release}

%description -n compat32-%{name}-devel
Development files and documentation for libunistring


%debug_package


%prep
%setup -q


%build
%configure --disable-static
%{__make} %{?_smp_mflags}


%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__make} install DESTDIR=${RPM_BUILD_ROOT}

%{__rm} ${RPM_BUILD_ROOT}%{_libdir}/libunistring.la
%{__rm} ${RPM_BUILD_ROOT}%{_infodir}/dir


%clean
%{__rm} -rf ${RPM_BUILD_ROOT}


%files
%defattr(-,root,root)
%license COPYING
%doc AUTHORS ChangeLog HACKING NEWS README THANKS
%{_libdir}/*.so.*


%files devel
%{_includedir}/uni*.h
%{_includedir}/unistring
%{_libdir}/libunistring.so
%{_docdir}/libunistring
%{_infodir}/libunistring.info.gz

%if %{build_compat32}
%files -n compat32-%{name}
%defattr(-,root,root,-)
%{_libdir}/*.so.*

%files -n compat32-%{name}-devel
%{_libdir}/libunistring.so
%endif


%changelog
* Fri Nov 18 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1-1
- new upstream release.

* Fri Jan 14 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0-1
- new upstream release.

* Sun Apr 12 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.9.10-2
- rebuilt with current environment.

* Thu Nov 08 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.9.10-1
- updated to 0.9.10.

* Fri Feb 23 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.9.8-1
- updated to 0.9.8.

* Tue Jan 27 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.4-2
- create compat32 packages

* Mon Oct  6 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.9.4-1
- updated to 0.9.4
- moved libunistring to System Environment/Libraries
- added %%post and %%postun

* Sat Oct 13 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.3-2
- add Requires: %{name} (devel package)

* Wed Aug 15 2012 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.9.3-1
- initial build for Vine Linux
