]>
Commit | Line | Data |
---|---|---|
2b80baee | 1 | # |
903fee6f | 2 | # Conditional build: |
a8f0a392 | 3 | %bcond_without apidocs # disable gtk-doc |
903fee6f | 4 | %bcond_without recode # build without recode support |
2b80baee | 5 | # |
c5a29f4c | 6 | Summary: Extremely Naive Charset Analyser |
1b834328 | 7 | Summary(pl.UTF-8): Skrajnie naiwny analizator zestawów znaków |
c5a29f4c | 8 | Name: enca |
bb9e3038 | 9 | Version: 1.9 |
a8f0a392 | 10 | Release: 3 |
c5a29f4c JB |
11 | License: GPL v2 |
12 | Group: Libraries | |
13 | Source0: http://trific.ath.cx/Ftp/enca/%{name}-%{version}.tar.bz2 | |
bb9e3038 | 14 | # Source0-md5: b3581e28d68d452286fb0bfe58bed3b3 |
282d380f | 15 | Patch0: %{name}-libdir.patch |
c5a29f4c | 16 | URL: http://trific.ath.cx/software/enca/ |
e685884d | 17 | BuildRequires: autoconf |
9636619a | 18 | BuildRequires: automake |
a8f0a392 | 19 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.0} |
e685884d | 20 | BuildRequires: iconv |
903fee6f | 21 | %{?with_recode:BuildRequires: recode-devel} |
c5a29f4c | 22 | Requires: /bin/mktemp |
1229a396 | 23 | Requires: %{name}-libs = %{version}-%{release} |
c5a29f4c JB |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
27 | Enca is an Extremely Naive Charset Analyser. It detects character set | |
28 | and encoding of text files and can also convert them to other | |
29 | encodings using either a built-in converter or external libraries and | |
30 | tools like libiconv, librecode, or cstocs. | |
31 | ||
32 | Currently, it has support for Belarussian, Bulgarian, Croatian, Czech, | |
33 | Estonian, Latvian, Lithuanian, Polish, Russian, Slovak, Slovene, and | |
34 | Ukrainian and some multibyte encodings (mostly variants of Unicode) | |
35 | independently on the language. | |
36 | ||
f7439809 | 37 | %description -l pl.UTF-8 |
c5a29f4c | 38 | Enca to Extremely Naive Charset Analyser (skrajnie naiwny analizator |
f7439809 JR |
39 | zestawów znaków). Wykrywa zestaw znaków i kodowanie plików tekstowych, |
40 | może także konwertować do innych kodowań przy użyciu wbudowanego | |
41 | konwertera lub zewnętrznych bibliotek i narzędzi takich jak libiconv, | |
c5a29f4c JB |
42 | librecode czy cstocs. |
43 | ||
f7439809 JR |
44 | Aktualnie obsługiwane są znaki białoruskie, bułgarskie, chorwackie, |
45 | czeskie, estońskie, litewskie, łotewskie, polskie, rosyjskie, | |
46 | słowackie, słoweńskie i ukraińskie oraz niektóre kodowania | |
47 | wielobajtowe (głównie warianty unikodu) niezależnie od języka. | |
c5a29f4c | 48 | |
1229a396 ER |
49 | %package libs |
50 | Summary: Shared Enca library | |
1b834328 | 51 | Summary(pl.UTF-8): Biblioteka współdzielona Enca |
1229a396 ER |
52 | Group: Libraries |
53 | ||
54 | %description libs | |
55 | This package contains shared Enca library other programs can make use | |
56 | of. | |
57 | ||
f7439809 JR |
58 | %description libs -l pl.UTF-8 |
59 | Ten pakiet zawiera bibliotekę współdzieloną Enca, która może być | |
c5a29f4c JB |
60 | wykorzystywana przez inne programy. |
61 | ||
62 | %package devel | |
63 | Summary: Header files for ENCA library | |
1b834328 | 64 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki ENCA |
c5a29f4c | 65 | Group: Development/Libraries |
b0601e99 | 66 | Requires: %{name}-libs = %{version}-%{release} |
c5a29f4c JB |
67 | |
68 | %description devel | |
69 | Header files for ENCA library. | |
70 | ||
f7439809 JR |
71 | %description devel -l pl.UTF-8 |
72 | Pliki nagłówkowe biblioteki ENCA. | |
c5a29f4c JB |
73 | |
74 | %package static | |
75 | Summary: Static ENCA library | |
1b834328 | 76 | Summary(pl.UTF-8): Statyczna biblioteka ENCA |
c5a29f4c | 77 | Group: Development/Libraries |
e0f2de6f | 78 | Requires: %{name}-devel = %{version}-%{release} |
c5a29f4c JB |
79 | |
80 | %description static | |
81 | Static ENCA library. | |
82 | ||
f7439809 | 83 | %description static -l pl.UTF-8 |
c5a29f4c JB |
84 | Statyczna biblioteka ENCA. |
85 | ||
a8f0a392 MB |
86 | %package apidocs |
87 | Summary: ENCA library API documentation | |
88 | Summary(pl.UTF-8): Dokumentacja API biblioteki ENCA | |
89 | Group: Documentation | |
90 | Requires: gtk-doc-common | |
91 | ||
92 | %description apidocs | |
93 | ENCA library API documentation. | |
94 | ||
95 | %description apidocs -l pl.UTF-8 | |
96 | Dokumentacja API biblioteki ENCA. | |
97 | ||
c5a29f4c JB |
98 | %prep |
99 | %setup -q | |
282d380f | 100 | %patch0 -p1 |
c5a29f4c JB |
101 | |
102 | %build | |
9636619a | 103 | cp -f /usr/share/automake/config.sub . |
e685884d | 104 | %{__autoconf} |
c5a29f4c JB |
105 | %configure \ |
106 | MKTEMP_PROG=/bin/mktemp \ | |
a8f0a392 | 107 | --%{?with_apidocs:en}%{!?with_apidocs:dis}able-gtk-doc \ |
c5a29f4c JB |
108 | --with-html-dir=%{_gtkdocdir} |
109 | ||
110 | %{__make} | |
111 | ||
112 | %install | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
115 | %{__make} install \ | |
116 | DESTDIR=$RPM_BUILD_ROOT | |
117 | ||
118 | rm -f $RPM_BUILD_ROOT%{_mandir}/man1/enconv.1 | |
119 | echo '.so enca.1' > $RPM_BUILD_ROOT%{_mandir}/man1/enconv.1 | |
120 | ||
a8f0a392 MB |
121 | %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}} |
122 | ||
c5a29f4c JB |
123 | %clean |
124 | rm -rf $RPM_BUILD_ROOT | |
125 | ||
d0537325 ER |
126 | %post libs -p /sbin/ldconfig |
127 | %postun libs -p /sbin/ldconfig | |
c5a29f4c JB |
128 | |
129 | %files | |
130 | %defattr(644,root,root,755) | |
131 | %doc AUTHORS ChangeLog FAQ NEWS README THANKS TODO | |
132 | %attr(755,root,root) %{_bindir}/* | |
467ec642 | 133 | %attr(755,root,root) %{_libexecdir}/enca |
c5a29f4c JB |
134 | %{_mandir}/man1/* |
135 | ||
d0537325 ER |
136 | %files libs |
137 | %defattr(644,root,root,755) | |
138 | %attr(755,root,root) %{_libdir}/lib*.so.*.*.* | |
139 | ||
c5a29f4c JB |
140 | %files devel |
141 | %defattr(644,root,root,755) | |
142 | %doc README.devel | |
143 | %attr(755,root,root) %{_libdir}/lib*.so | |
144 | %{_libdir}/lib*.la | |
145 | %{_includedir}/*.h | |
146 | %{_pkgconfigdir}/*.pc | |
c5a29f4c JB |
147 | |
148 | %files static | |
149 | %defattr(644,root,root,755) | |
150 | %{_libdir}/lib*.a | |
a8f0a392 MB |
151 | |
152 | %if %{with apidocs} | |
153 | %files apidocs | |
154 | %defattr(644,root,root,755) | |
155 | %{_gtkdocdir}/libenca | |
156 | %endif |