]> git.pld-linux.org Git - packages/enca.git/blob - enca.spec
noarch apidocs
[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.15
10 Release:        2
11 License:        GPL v2
12 Group:          Libraries
13 Source0:        http://dl.cihar.com/enca/%{name}-%{version}.tar.bz2
14 # Source0-md5:  fef132969d26e649719eae08297a4a52
15 Patch0:         %{name}-libdir.patch
16 URL:            http://cihar.com/software/enca/
17 BuildRequires:  autoconf >= 2.52
18 BuildRequires:  automake >= 1:1.8
19 %{?with_apidocs:BuildRequires:  gtk-doc >= 1.0}
20 BuildRequires:  iconv
21 %{?with_recode:BuildRequires:   recode-devel}
22 Requires:       %{name}-libs = %{version}-%{release}
23 Requires:       /bin/mktemp
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
37 %description -l pl.UTF-8
38 Enca to Extremely Naive Charset Analyser (skrajnie naiwny analizator
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,
42 librecode czy cstocs.
43
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.
48
49 %package libs
50 Summary:        Shared Enca library
51 Summary(pl.UTF-8):      Biblioteka współdzielona Enca
52 Group:          Libraries
53
54 %description libs
55 This package contains shared Enca library other programs can make use
56 of.
57
58 %description libs -l pl.UTF-8
59 Ten pakiet zawiera bibliotekę współdzieloną Enca, która może być
60 wykorzystywana przez inne programy.
61
62 %package devel
63 Summary:        Header files for ENCA library
64 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki ENCA
65 Group:          Development/Libraries
66 Requires:       %{name}-libs = %{version}-%{release}
67
68 %description devel
69 Header files for ENCA library.
70
71 %description devel -l pl.UTF-8
72 Pliki nagłówkowe biblioteki ENCA.
73
74 %package static
75 Summary:        Static ENCA library
76 Summary(pl.UTF-8):      Statyczna biblioteka ENCA
77 Group:          Development/Libraries
78 Requires:       %{name}-devel = %{version}-%{release}
79
80 %description static
81 Static ENCA library.
82
83 %description static -l pl.UTF-8
84 Statyczna biblioteka ENCA.
85
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 %if "%{_rpmversion}" >= "5"
92 BuildArch:      noarch
93 %endif
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 %patch0 -p1
104
105 %build
106 cp -f /usr/share/automake/config.sub .
107 %{__autoconf}
108 %configure \
109         MKTEMP_PROG=/bin/mktemp \
110         --%{?with_apidocs:en}%{!?with_apidocs:dis}able-gtk-doc \
111         --with-html-dir=%{_gtkdocdir}
112
113 %{__make}
114
115 %install
116 rm -rf $RPM_BUILD_ROOT
117
118 %{__make} install \
119         DESTDIR=$RPM_BUILD_ROOT
120
121 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/enconv.1
122 echo '.so enca.1' > $RPM_BUILD_ROOT%{_mandir}/man1/enconv.1
123
124 %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}}
125
126 %clean
127 rm -rf $RPM_BUILD_ROOT
128
129 %post   libs -p /sbin/ldconfig
130 %postun libs -p /sbin/ldconfig
131
132 %files
133 %defattr(644,root,root,755)
134 %doc AUTHORS ChangeLog FAQ NEWS README THANKS TODO
135 %attr(755,root,root) %{_bindir}/enca
136 %attr(755,root,root) %{_bindir}/enconv
137 %attr(755,root,root) %{_libexecdir}/enca
138 %{_mandir}/man1/enca.1*
139 %{_mandir}/man1/enconv.1*
140
141 %files libs
142 %defattr(644,root,root,755)
143 %attr(755,root,root) %{_libdir}/libenca.so.*.*.*
144 %attr(755,root,root) %ghost %{_libdir}/libenca.so.0
145
146 %files devel
147 %defattr(644,root,root,755)
148 %doc README.devel
149 %attr(755,root,root) %{_libdir}/libenca.so
150 %{_libdir}/libenca.la
151 %{_includedir}/enca.h
152 %{_pkgconfigdir}/enca.pc
153
154 %files static
155 %defattr(644,root,root,755)
156 %{_libdir}/libenca.a
157
158 %if %{with apidocs}
159 %files apidocs
160 %defattr(644,root,root,755)
161 %{_gtkdocdir}/libenca
162 %endif
This page took 0.154977 seconds and 3 git commands to generate.