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