]>
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 |
ebd14a94 | 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 |
46d3f630 | 9 | Version: 1.19 |
dbd01306 | 10 | Release: 2 |
c5a29f4c JB |
11 | License: GPL v2 |
12 | Group: Libraries | |
db9e8739 | 13 | Source0: http://dl.cihar.com/enca/%{name}-%{version}.tar.xz |
46d3f630 | 14 | # Source0-md5: a7a0c152658e012db701a48ae8b79525 |
eb19b03a JB |
15 | URL: http://cihar.com/software/enca/ |
16 | BuildRequires: autoconf >= 2.52 | |
17 | BuildRequires: automake >= 1:1.8 | |
ebd14a94 | 18 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.0} |
e685884d | 19 | BuildRequires: iconv |
2d25707c | 20 | BuildRequires: libtool |
903fee6f | 21 | %{?with_recode:BuildRequires: recode-devel} |
db9e8739 JB |
22 | BuildRequires: tar >= 1:1.22 |
23 | BuildRequires: xz | |
1229a396 | 24 | Requires: %{name}-libs = %{version}-%{release} |
ebd14a94 | 25 | Requires: /bin/mktemp |
c5a29f4c JB |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
28 | %description | |
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. | |
33 | ||
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. | |
38 | ||
f7439809 | 39 | %description -l pl.UTF-8 |
c5a29f4c | 40 | Enca to Extremely Naive Charset Analyser (skrajnie naiwny analizator |
f7439809 JR |
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, | |
c5a29f4c JB |
44 | librecode czy cstocs. |
45 | ||
f7439809 JR |
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. | |
c5a29f4c | 50 | |
1229a396 ER |
51 | %package libs |
52 | Summary: Shared Enca library | |
1b834328 | 53 | Summary(pl.UTF-8): Biblioteka współdzielona Enca |
1229a396 ER |
54 | Group: Libraries |
55 | ||
56 | %description libs | |
57 | This package contains shared Enca library other programs can make use | |
58 | of. | |
59 | ||
f7439809 JR |
60 | %description libs -l pl.UTF-8 |
61 | Ten pakiet zawiera bibliotekę współdzieloną Enca, która może być | |
c5a29f4c JB |
62 | wykorzystywana przez inne programy. |
63 | ||
64 | %package devel | |
65 | Summary: Header files for ENCA library | |
1b834328 | 66 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki ENCA |
c5a29f4c | 67 | Group: Development/Libraries |
b0601e99 | 68 | Requires: %{name}-libs = %{version}-%{release} |
c5a29f4c JB |
69 | |
70 | %description devel | |
71 | Header files for ENCA library. | |
72 | ||
f7439809 JR |
73 | %description devel -l pl.UTF-8 |
74 | Pliki nagłówkowe biblioteki ENCA. | |
c5a29f4c JB |
75 | |
76 | %package static | |
77 | Summary: Static ENCA library | |
1b834328 | 78 | Summary(pl.UTF-8): Statyczna biblioteka ENCA |
c5a29f4c | 79 | Group: Development/Libraries |
e0f2de6f | 80 | Requires: %{name}-devel = %{version}-%{release} |
c5a29f4c JB |
81 | |
82 | %description static | |
83 | Static ENCA library. | |
84 | ||
f7439809 | 85 | %description static -l pl.UTF-8 |
c5a29f4c JB |
86 | Statyczna biblioteka ENCA. |
87 | ||
a8f0a392 MB |
88 | %package apidocs |
89 | Summary: ENCA library API documentation | |
90 | Summary(pl.UTF-8): Dokumentacja API biblioteki ENCA | |
91 | Group: Documentation | |
92 | Requires: gtk-doc-common | |
ebd14a94 | 93 | BuildArch: noarch |
a8f0a392 MB |
94 | |
95 | %description apidocs | |
96 | ENCA library API documentation. | |
97 | ||
98 | %description apidocs -l pl.UTF-8 | |
99 | Dokumentacja API biblioteki ENCA. | |
100 | ||
c5a29f4c JB |
101 | %prep |
102 | %setup -q | |
103 | ||
104 | %build | |
2d25707c JB |
105 | %{__libtoolize} |
106 | %{__aclocal} -I m4 | |
e685884d | 107 | %{__autoconf} |
2d25707c JB |
108 | %{__autoheader} |
109 | %{__automake} | |
c5a29f4c JB |
110 | %configure \ |
111 | MKTEMP_PROG=/bin/mktemp \ | |
db9e8739 | 112 | --enable-gtk-doc%{!?with_apidocs:=no} \ |
c5a29f4c JB |
113 | --with-html-dir=%{_gtkdocdir} |
114 | ||
115 | %{__make} | |
116 | ||
117 | %install | |
118 | rm -rf $RPM_BUILD_ROOT | |
119 | ||
120 | %{__make} install \ | |
121 | DESTDIR=$RPM_BUILD_ROOT | |
122 | ||
eb19b03a | 123 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/enconv.1 |
c5a29f4c JB |
124 | echo '.so enca.1' > $RPM_BUILD_ROOT%{_mandir}/man1/enconv.1 |
125 | ||
a8f0a392 MB |
126 | %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}} |
127 | ||
c5a29f4c JB |
128 | %clean |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | ||
d0537325 ER |
131 | %post libs -p /sbin/ldconfig |
132 | %postun libs -p /sbin/ldconfig | |
c5a29f4c JB |
133 | |
134 | %files | |
135 | %defattr(644,root,root,755) | |
136 | %doc AUTHORS ChangeLog FAQ NEWS README THANKS TODO | |
eb19b03a JB |
137 | %attr(755,root,root) %{_bindir}/enca |
138 | %attr(755,root,root) %{_bindir}/enconv | |
467ec642 | 139 | %attr(755,root,root) %{_libexecdir}/enca |
eb19b03a JB |
140 | %{_mandir}/man1/enca.1* |
141 | %{_mandir}/man1/enconv.1* | |
c5a29f4c | 142 | |
d0537325 ER |
143 | %files libs |
144 | %defattr(644,root,root,755) | |
eb19b03a JB |
145 | %attr(755,root,root) %{_libdir}/libenca.so.*.*.* |
146 | %attr(755,root,root) %ghost %{_libdir}/libenca.so.0 | |
d0537325 | 147 | |
c5a29f4c JB |
148 | %files devel |
149 | %defattr(644,root,root,755) | |
2d25707c | 150 | %doc DEVELOP.md |
eb19b03a JB |
151 | %attr(755,root,root) %{_libdir}/libenca.so |
152 | %{_libdir}/libenca.la | |
153 | %{_includedir}/enca.h | |
154 | %{_pkgconfigdir}/enca.pc | |
c5a29f4c JB |
155 | |
156 | %files static | |
157 | %defattr(644,root,root,755) | |
eb19b03a | 158 | %{_libdir}/libenca.a |
a8f0a392 MB |
159 | |
160 | %if %{with apidocs} | |
161 | %files apidocs | |
162 | %defattr(644,root,root,755) | |
163 | %{_gtkdocdir}/libenca | |
164 | %endif |