3 %bcond_without apidocs # disable gtk-doc
4 %bcond_without recode # build without recode support
6 Summary: Extremely Naive Charset Analyser
7 Summary(pl.UTF-8): Skrajnie naiwny analizator zestawów znaków
13 Source0: http://dl.cihar.com/enca/%{name}-%{version}.tar.xz
14 # Source0-md5: a7a0c152658e012db701a48ae8b79525
15 URL: http://cihar.com/software/enca/
16 BuildRequires: autoconf >= 2.52
17 BuildRequires: automake >= 1:1.8
18 %{?with_apidocs:BuildRequires: gtk-doc >= 1.0}
20 BuildRequires: libtool
21 %{?with_recode:BuildRequires: recode-devel}
22 BuildRequires: tar >= 1:1.22
24 Requires: %{name}-libs = %{version}-%{release}
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Enca is an Extremely Naive Charset Analyser. It detects character set
30 and encoding of text files and can also convert them to other
31 encodings using either a built-in converter or external libraries and
32 tools like libiconv, librecode, or cstocs.
34 Currently, it has support for Belarussian, Bulgarian, Croatian, Czech,
35 Estonian, Latvian, Lithuanian, Polish, Russian, Slovak, Slovene, and
36 Ukrainian and some multibyte encodings (mostly variants of Unicode)
37 independently on the language.
39 %description -l pl.UTF-8
40 Enca to Extremely Naive Charset Analyser (skrajnie naiwny analizator
41 zestawów znaków). Wykrywa zestaw znaków i kodowanie plików tekstowych,
42 może także konwertować do innych kodowań przy użyciu wbudowanego
43 konwertera lub zewnętrznych bibliotek i narzędzi takich jak libiconv,
46 Aktualnie obsługiwane są znaki białoruskie, bułgarskie, chorwackie,
47 czeskie, estońskie, litewskie, łotewskie, polskie, rosyjskie,
48 słowackie, słoweńskie i ukraińskie oraz niektóre kodowania
49 wielobajtowe (głównie warianty unikodu) niezależnie od języka.
52 Summary: Shared Enca library
53 Summary(pl.UTF-8): Biblioteka współdzielona Enca
57 This package contains shared Enca library other programs can make use
60 %description libs -l pl.UTF-8
61 Ten pakiet zawiera bibliotekę współdzieloną Enca, która może być
62 wykorzystywana przez inne programy.
65 Summary: Header files for ENCA library
66 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki ENCA
67 Group: Development/Libraries
68 Requires: %{name}-libs = %{version}-%{release}
71 Header files for ENCA library.
73 %description devel -l pl.UTF-8
74 Pliki nagłówkowe biblioteki ENCA.
77 Summary: Static ENCA library
78 Summary(pl.UTF-8): Statyczna biblioteka ENCA
79 Group: Development/Libraries
80 Requires: %{name}-devel = %{version}-%{release}
85 %description static -l pl.UTF-8
86 Statyczna biblioteka ENCA.
89 Summary: ENCA library API documentation
90 Summary(pl.UTF-8): Dokumentacja API biblioteki ENCA
92 Requires: gtk-doc-common
96 ENCA library API documentation.
98 %description apidocs -l pl.UTF-8
99 Dokumentacja API biblioteki ENCA.
111 MKTEMP_PROG=/bin/mktemp \
112 --enable-gtk-doc%{!?with_apidocs:=no} \
113 --with-html-dir=%{_gtkdocdir}
118 rm -rf $RPM_BUILD_ROOT
121 DESTDIR=$RPM_BUILD_ROOT
123 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/enconv.1
124 echo '.so enca.1' > $RPM_BUILD_ROOT%{_mandir}/man1/enconv.1
126 %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}}
129 rm -rf $RPM_BUILD_ROOT
131 %post libs -p /sbin/ldconfig
132 %postun libs -p /sbin/ldconfig
135 %defattr(644,root,root,755)
136 %doc AUTHORS ChangeLog FAQ NEWS README THANKS TODO
137 %attr(755,root,root) %{_bindir}/enca
138 %attr(755,root,root) %{_bindir}/enconv
139 %attr(755,root,root) %{_libexecdir}/enca
140 %{_mandir}/man1/enca.1*
141 %{_mandir}/man1/enconv.1*
144 %defattr(644,root,root,755)
145 %attr(755,root,root) %{_libdir}/libenca.so.*.*.*
146 %attr(755,root,root) %ghost %{_libdir}/libenca.so.0
149 %defattr(644,root,root,755)
151 %attr(755,root,root) %{_libdir}/libenca.so
152 %{_libdir}/libenca.la
153 %{_includedir}/enca.h
154 %{_pkgconfigdir}/enca.pc
157 %defattr(644,root,root,755)
162 %defattr(644,root,root,755)
163 %{_gtkdocdir}/libenca