]> git.pld-linux.org Git - packages/enca.git/blob - enca.spec
Release 2 (by relup.sh)
[packages/enca.git] / enca.spec
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:        1
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 %if "%{_rpmversion}" >= "5"
94 BuildArch:      noarch
95 %endif
96
97 %description apidocs
98 ENCA library API documentation.
99
100 %description apidocs -l pl.UTF-8
101 Dokumentacja API biblioteki ENCA.
102
103 %prep
104 %setup -q
105
106 %build
107 %{__libtoolize}
108 %{__aclocal} -I m4
109 %{__autoconf}
110 %{__autoheader}
111 %{__automake}
112 %configure \
113         MKTEMP_PROG=/bin/mktemp \
114         --enable-gtk-doc%{!?with_apidocs:=no} \
115         --with-html-dir=%{_gtkdocdir}
116
117 %{__make}
118
119 %install
120 rm -rf $RPM_BUILD_ROOT
121
122 %{__make} install \
123         DESTDIR=$RPM_BUILD_ROOT
124
125 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/enconv.1
126 echo '.so enca.1' > $RPM_BUILD_ROOT%{_mandir}/man1/enconv.1
127
128 %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}}
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %post   libs -p /sbin/ldconfig
134 %postun libs -p /sbin/ldconfig
135
136 %files
137 %defattr(644,root,root,755)
138 %doc AUTHORS ChangeLog FAQ NEWS README THANKS TODO
139 %attr(755,root,root) %{_bindir}/enca
140 %attr(755,root,root) %{_bindir}/enconv
141 %attr(755,root,root) %{_libexecdir}/enca
142 %{_mandir}/man1/enca.1*
143 %{_mandir}/man1/enconv.1*
144
145 %files libs
146 %defattr(644,root,root,755)
147 %attr(755,root,root) %{_libdir}/libenca.so.*.*.*
148 %attr(755,root,root) %ghost %{_libdir}/libenca.so.0
149
150 %files devel
151 %defattr(644,root,root,755)
152 %doc DEVELOP.md
153 %attr(755,root,root) %{_libdir}/libenca.so
154 %{_libdir}/libenca.la
155 %{_includedir}/enca.h
156 %{_pkgconfigdir}/enca.pc
157
158 %files static
159 %defattr(644,root,root,755)
160 %{_libdir}/libenca.a
161
162 %if %{with apidocs}
163 %files apidocs
164 %defattr(644,root,root,755)
165 %{_gtkdocdir}/libenca
166 %endif
This page took 0.102467 seconds and 3 git commands to generate.