File utf8proc.spec of Package utf8proc

#
# spec file for package utf8proc
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           utf8proc
Version:        1.1.6
%define lib_ver 1
Release:        0
Summary:        Library for processing UTF-8 encoded Unicode strings
License:        MIT
Group:          System/Libraries
Url:            http://www.public-software-group.org/utf8proc
Source:         http://www.public-software-group.org/pub/projects/utf8proc/v%{version}/utf8proc-v%{version}.tar.gz

%description
utf8proc is a library for processing UTF-8 encoded Unicode strings.
Some features are Unicode normalization, stripping of default ignorable
characters, case folding and detection of grapheme cluster boundaries.
A special character mapping is available, which converts for example
the characters “Hyphen” (U+2010), “Minus” (U+2212) and “Hyphen-Minus
(U+002D, ASCII Minus) all into the ASCII minus sign, to make them
equal for comparisons.

The currently supported Unicode version is 5.0.0.

%package     -n lib%{name}%{lib_ver}
Summary:        Library for processing UTF-8 encoded Unicode strings
Group:          System/Libraries

%description -n lib%{name}%{lib_ver}
utf8proc is a library for processing UTF-8 encoded Unicode strings.
Some features are Unicode normalization, stripping of default ignorable
characters, case folding and detection of grapheme cluster boundaries.
A special character mapping is available, which converts for example
the characters “Hyphen” (U+2010), “Minus” (U+2212) and “Hyphen-Minus
(U+002D, ASCII Minus) all into the ASCII minus sign, to make them
equal for comparisons.

The currently supported Unicode version is 5.0.0.

%package        devel
Summary:        Library for processing UTF-8 encoded Unicode strings
Group:          Development/Libraries/C and C++
Requires:       lib%{name}%{lib_ver} = %{version}

%description    devel
utf8proc is a library for processing UTF-8 encoded Unicode strings.
Some features are Unicode normalization, stripping of default ignorable
characters, case folding and detection of grapheme cluster boundaries.
A special character mapping is available, which converts for example
the characters “Hyphen” (U+2010), “Minus” (U+2212) and “Hyphen-Minus
(U+002D, ASCII Minus) all into the ASCII minus sign, to make them
equal for comparisons.

The currently supported Unicode version is 5.0.0.

This package provides libraries and header files for developing applications
that use utf8proc.

%prep
%setup -q -n %{name}-v%{version}

%build
make %{?_smp_mflags} CFLAGS="%{optflags} -Wl,-soname,libutf8proc.so.%{lib_ver}"
mv libutf8proc.so libutf8proc.so.%{lib_ver}
ln -s libutf8proc.so.%{lib_ver} libutf8proc.so
chmod 755 libutf8proc.so*

%install
install -d %{buildroot}%{_libdir} %{buildroot}%{_includedir}
install libutf8proc.so.%{lib_ver} %{buildroot}%{_libdir}/libutf8proc.so.%{lib_ver}
install libutf8proc.so            %{buildroot}%{_libdir}/libutf8proc.so
install -Dm 644 utf8proc.h %{buildroot}%{_includedir}/utf8proc.h

%post -n lib%{name}%{lib_ver} -p /sbin/ldconfig
%postun -n lib%{name}%{lib_ver} -p /sbin/ldconfig

%files -n lib%{name}%{lib_ver}
%defattr(-,root,root,-)
%doc Changelog lump.txt LICENSE README
%{_libdir}/libutf8proc.so.*

%files devel
%defattr(-,root,root,-)
%{_includedir}/utf8proc.h
%{_libdir}/libutf8proc.so

%changelog
openSUSE Build Service is sponsored by