File m17n-lib.spec of Package m17n-lib

#
# spec file for package m17n-lib
#
# Copyright (c) 2012 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:           m17n-lib
BuildRequires:  freetype2-devel
BuildRequires:  fribidi-devel
BuildRequires:  gd-devel
BuildRequires:  ispell
BuildRequires:  ispell-british
BuildRequires:  libotf-devel
BuildRequires:  libxml2
BuildRequires:  m17n-db
BuildRequires:  pkgconfig
BuildRequires:  wordcut-devel
BuildRequires:  xorg-x11-devel
%define	appdefdir  /usr/share/X11
Version:        1.6.3
Release:        0
Url:            http://www.m17n.org/m17n-lib/
Source0:        http://www.m17n.org/m17n-lib-download/m17n-lib-%{version}.tar.gz
Source1:        m17n-lib-rpmlintrc
Source2:        baselibs.conf
Patch0:         m17n-lib-fix-warnings.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        Multilingual Text Processing Library for the C Language
License:        GPL-2.0+ ; LGPL-2.1+ ; MIT
Group:          System/I18n/Japanese

%description
A multilingual text processing library for the C language.
This package contains m17n-* programs.

%package -n libm17n0

Summary:        Multilingual text processing library for the C language
Group:          System/I18n/Japanese
Requires:       m17n-db

%description -n libm17n0
A multilingual text processing library for the C language.
This package contains shared libraries.

%package devel
Summary:        Multilingual text processing library for the C language
Group:          Development/Libraries/Other
Requires:       %{name} = %{version} glibc-devel xorg-x11-libX11-devel

%description devel
A multilingual text processing library for the C language

%prep
%setup -q
%patch0 -p1

%build
export SUSE_ASNEEDED=0
%configure --disable-static --with-pic
%{__make}

%check
export MALLOC_CHECK_=2
%{__make} check
unset MALLOC_CHECK_

%install
make DESTDIR=${RPM_BUILD_ROOT} install
# Japanese app-defaults:
mkdir -p $RPM_BUILD_ROOT%{appdefdir}/{ja,ja_JP,ja_JP.eucJP,ja_JP.SJIS,ja_JP.UTF-8}/app-defaults
iconv -f EUC-JP -t EUC-JP < example/M17NEdit.ja \
      > $RPM_BUILD_ROOT%{appdefdir}/ja/app-defaults/M17NEdit
iconv -f EUC-JP -t EUC-JP < example/M17NEdit.ja \
      > $RPM_BUILD_ROOT%{appdefdir}/ja_JP/app-defaults/M17NEdit
iconv -f EUC-JP -t EUC-JP < example/M17NEdit.ja \
      > $RPM_BUILD_ROOT%{appdefdir}/ja_JP.eucJP/app-defaults/M17NEdit
iconv -f EUC-JP -t SJIS < example/M17NEdit.ja \
      > $RPM_BUILD_ROOT%{appdefdir}/ja_JP.SJIS/app-defaults/M17NEdit
iconv -f EUC-JP -t UTF-8 < example/M17NEdit.ja \
      > $RPM_BUILD_ROOT%{appdefdir}/ja_JP.UTF-8/app-defaults/M17NEdit
rm -f %{buildroot}%{_libdir}/m17n/*/*.la
rm -f %{buildroot}%{_libdir}/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -n libm17n0 -p /sbin/ldconfig

%postun -n libm17n0 -p /sbin/ldconfig

%files
%defattr(-, root, root)
%doc AUTHORS COPYING NEWS README ChangeLog
%{_bindir}/*
%dir %{appdefdir}/??
%dir %{appdefdir}/??_*
%dir %{appdefdir}/*/app-defaults
%config %{appdefdir}/*/app-defaults/M17NEdit

%files -n libm17n0
%defattr(-, root, root)
%{_libdir}/lib*.so.*
%{_libdir}/m17n

%files devel
%defattr(-, root, root)
%{_includedir}/*
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc

%changelog
openSUSE Build Service is sponsored by