%define realrelease 2 %define cvs @LIBRCC_CVS@ %if %cvs %define buildname @LIBRCC_CVS_DATE@ %define release 0.%{buildname}.%{realrelease}csa %else %define buildname @VERSION@ %define release %{realrelease}csa %endif Summary: Russian Charset Conversion Library Name: librcc Version: @VERSION@ Release: %{release} License: GPL Group: Development/Libraries Vendor: DarkSoft Distribution: DarkLin Packager: Suren A. Chilingaryan Source: librcc-%{buildname}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-root URL: http://rusxmms.sourceforge.net Prefix: %{_prefix} Docdir: %{_docdir} BuildRequires: librcd-devel Requires: librcd %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 devel Summary: Russian Encoding Conversion Library Group: Development/Libraries Requires: librcc = %{version} Requires: librcd %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. %prep %setup -q -n %{name}-%{buildname} %build %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 if [ -f $RPM_BUILD_ROOT/%{_bindir}/rcc-gtk2-config ]; then ln -s rcc-gtk2-config $RPM_BUILD_ROOT/%{_bindir}/rcc-config elif [ -f $RPM_BUILD_ROOT/%{_bindir}/rcc-gtk-config ]; then ln -s rcc-gtk-config $RPM_BUILD_ROOT/%{_bindir}/rcc-config else echo "#!/bin/bash" > $RPM_BUILD_ROOT/usr/bin/rcc-config echo "echo \"Configuration UI is not available!\"" >> $RPM_BUILD_ROOT/%{_bindir}/rcc-config fi %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-, root, root) %doc AUTHORS ChangeLog NEWS README COPYING %doc examples/rcc-example.xml %dir /etc/rcc /etc/rcc.xml %{_libdir}/lib*.so.* %{_libdir}/rcc/ %{_bindir}/rcc-*config %files devel %defattr(-, root, root) %{_includedir} %{_libdir}/lib*.so %{_libdir}/*.a %changelog