File librcc.spec of Package librcc

Summary: Russian Charset Conversion Library
Name: librcc
Version: 0.2.10
Release: csa
License: LGPL
Group: Development/Libraries
Source: librcc-%{version}.tar.bz2
Patch0: librcc0.patch
Patch1: librcc-printf.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-root
URL: http://rusxmms.sourceforge.net
Prefix: %{_prefix}
Docdir: %{_docdir}
BuildRequires: librcd-devel libxml2-devel libtranslate-devel libguess-devel aspell-devel db-devel gtk2-devel enca-devel
BuildRequires: pkg-config libtool 
%if %{defined mandriva_version}
BuildRequires: gtk+-devel 
%else
BuildRequires: gtk-devel 
%endif


%description
Provides posibility to automaticaly convert considered encodings (a lot of 
languages is supported, not only russian one) to/from UTF-8. The library
is part of rusxmms patch.

%package -n librcc0
Summary: Russian Charset Conversion Library
Group: Development/Libraries
Requires: enca 
Requires: librcd0 >= 0.1.13
#We depend on patched versions
Requires: libtranslate0
Requires: libguess0

%description -n librcc0
Provides posibility to automaticaly convert considered encodings (a lot of 
languages is supported, not only russian one) to/from UTF-8. The library
is part of rusxmms patch.

%package devel 
Summary: Russian Encoding Conversion Library
Group: Development/Libraries 
Requires: librcc0 = %{version}

%description devel
Provides posibility to automaticaly convert considered encodings (a lot of 
languages is supported, not only russian one) to/from UTF-8. The library
is part of rusxmms patch.

%package -n librccgtk0
Summary: GTK1 ui module for LibRCC
Group: Development/Libraries 
Requires: librcc0 = %{version}

%description -n librccgtk0
Provides posibility to automaticaly convert considered encodings (a lot of 
languages is supported, not only russian one) to/from UTF-8. The library
is part of rusxmms patch.


%package -n librccgtk2-0
Summary: GTK2 ui module for LibRCC
Group: Development/Libraries 
Requires: librcc0 = %{version}

%description -n librccgtk2-0
Provides posibility to automaticaly convert considered encodings (a lot of 
languages is supported, not only russian one) to/from UTF-8. The library
is part of rusxmms patch.

%package gtk2-config
Summary: Configuration utility for LibRCC
Group: Development/Libraries 
Requires: librccgtk2-0 = %{version}
Provides: rcc-config

%description gtk2-config
Provides posibility to automaticaly convert considered encodings (a lot of 
languages is supported, not only russian one) to/from UTF-8. The library
is part of rusxmms patch.

%prep
%setup -q
#patch0 -p1
#patch1 -p0

%build
./autogen.sh
%configure

%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT/etc/rcc
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/rcc/engines/
mkdir -p $RPM_BUILD_ROOT/%{_bindir}

make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/rcc/engines/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/rcc/engines/*.la

make -C examples
make -C examples install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_bindir}/example*

install -m 644 examples/rcc.xml $RPM_BUILD_ROOT/etc

%clean
rm -rf $RPM_BUILD_ROOT

%post -n librcc0 -p /sbin/ldconfig

%postun -n librcc0 -p /sbin/ldconfig

%post -n librccgtk0 -p /sbin/ldconfig
%postun -n librccgtk0 -p /sbin/ldconfig

%post -n librccgtk2-0 -p /sbin/ldconfig
%postun -n librccgtk2-0 -p /sbin/ldconfig

%post gtk2-config
ln -sf rcc-gtk2-config %{_bindir}/rcc-config

%files -n librcc0
%defattr(-, root, root)
%doc AUTHORS ChangeLog NEWS README COPYING
%doc examples/rcc-example.xml
%config /etc/rcc.xml
%{_libdir}/librcc.so.*
%{_libdir}/librccui.so.*
%{_libdir}/rcc/

%files -n librccgtk0
%defattr(-, root, root)
%{_libdir}/librccgtk.so.*
%exclude %{_bindir}/rcc-gtk-config

%files -n librccgtk2-0
%defattr(-, root, root)
%{_libdir}/librccgtk2.so.*

%files gtk2-config
%defattr(-, root, root)
%{_bindir}/rcc-gtk2-config

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

%changelog
* Sat Feb 13 2010 Suren A. Chilingaryan <csa@dside.dyndns.org> - 0.2.9-csa
 New version
openSUSE Build Service is sponsored by