]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs # disable gtk-doc | |
4 | %bcond_without recode # build without recode support | |
5 | ||
6 | Summary: Extremely Naive Charset Analyser | |
7 | Summary(pl.UTF-8): Skrajnie naiwny analizator zestawów znaków | |
8 | Name: enca | |
9 | Version: 1.19 | |
10 | Release: 2 | |
11 | License: GPL v2 | |
12 | Group: Libraries | |
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} | |
19 | BuildRequires: iconv | |
20 | BuildRequires: libtool | |
21 | %{?with_recode:BuildRequires: recode-devel} | |
22 | BuildRequires: tar >= 1:1.22 | |
23 | BuildRequires: xz | |
24 | Requires: %{name}-libs = %{version}-%{release} | |
25 | Requires: /bin/mktemp | |
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 | ||
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, | |
44 | librecode czy cstocs. | |
45 | ||
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. | |
50 | ||
51 | %package libs | |
52 | Summary: Shared Enca library | |
53 | Summary(pl.UTF-8): Biblioteka współdzielona Enca | |
54 | Group: Libraries | |
55 | ||
56 | %description libs | |
57 | This package contains shared Enca library other programs can make use | |
58 | of. | |
59 | ||
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. | |
63 | ||
64 | %package devel | |
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} | |
69 | ||
70 | %description devel | |
71 | Header files for ENCA library. | |
72 | ||
73 | %description devel -l pl.UTF-8 | |
74 | Pliki nagłówkowe biblioteki ENCA. | |
75 | ||
76 | %package static | |
77 | Summary: Static ENCA library | |
78 | Summary(pl.UTF-8): Statyczna biblioteka ENCA | |
79 | Group: Development/Libraries | |
80 | Requires: %{name}-devel = %{version}-%{release} | |
81 | ||
82 | %description static | |
83 | Static ENCA library. | |
84 | ||
85 | %description static -l pl.UTF-8 | |
86 | Statyczna biblioteka ENCA. | |
87 | ||
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 | |
93 | BuildArch: noarch | |
94 | ||
95 | %description apidocs | |
96 | ENCA library API documentation. | |
97 | ||
98 | %description apidocs -l pl.UTF-8 | |
99 | Dokumentacja API biblioteki ENCA. | |
100 | ||
101 | %prep | |
102 | %setup -q | |
103 | ||
104 | %build | |
105 | %{__libtoolize} | |
106 | %{__aclocal} -I m4 | |
107 | %{__autoconf} | |
108 | %{__autoheader} | |
109 | %{__automake} | |
110 | %configure \ | |
111 | MKTEMP_PROG=/bin/mktemp \ | |
112 | --enable-gtk-doc%{!?with_apidocs:=no} \ | |
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 | ||
123 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/enconv.1 | |
124 | echo '.so enca.1' > $RPM_BUILD_ROOT%{_mandir}/man1/enconv.1 | |
125 | ||
126 | %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}} | |
127 | ||
128 | %clean | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | ||
131 | %post libs -p /sbin/ldconfig | |
132 | %postun libs -p /sbin/ldconfig | |
133 | ||
134 | %files | |
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* | |
142 | ||
143 | %files libs | |
144 | %defattr(644,root,root,755) | |
145 | %attr(755,root,root) %{_libdir}/libenca.so.*.*.* | |
146 | %attr(755,root,root) %ghost %{_libdir}/libenca.so.0 | |
147 | ||
148 | %files devel | |
149 | %defattr(644,root,root,755) | |
150 | %doc DEVELOP.md | |
151 | %attr(755,root,root) %{_libdir}/libenca.so | |
152 | %{_libdir}/libenca.la | |
153 | %{_includedir}/enca.h | |
154 | %{_pkgconfigdir}/enca.pc | |
155 | ||
156 | %files static | |
157 | %defattr(644,root,root,755) | |
158 | %{_libdir}/libenca.a | |
159 | ||
160 | %if %{with apidocs} | |
161 | %files apidocs | |
162 | %defattr(644,root,root,755) | |
163 | %{_gtkdocdir}/libenca | |
164 | %endif |