summaryrefslogtreecommitdiffstats
path: root/librcc.spec.in
blob: 0e162df17de727648d4ca72846ab350c20449299 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
%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 <ds7fff@myrealbox.com>
Distribution: DarkLin <ds7fff@myrealbox.com>
Packager: Suren A. Chilingaryan <ds7fff@myrealbox.com>
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