-
Notifications
You must be signed in to change notification settings - Fork 47
/
enca.spec.in
208 lines (180 loc) · 6.88 KB
/
enca.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# RPM package for Enca, an Extremely Naive Charset Analyser.
#
# This RPM package suports conditional builds. Components can be
# enabled/disabled in rpmbuild via --with/--without. Default is:
#
# rpmbuild -ba --without htmldocs --with static
#
# Check http://www.rpm.org/wiki/PackagerDocs/ConditionalBuilds for more info.
# add --with htmldocs option, i.e. disable generation of HTML documentation by
# default
%bcond_with htmldocs
# add --without static, i.e. enable generation of static libraries by
# default
%bcond_without static
Summary: Detect encoding of text files and convert to other encodings.
Name: @PACKAGE_TARNAME@
Version: @PACKAGE_VERSION@
Release: @RELEASE@%{?dist}
License: GPLv2
Group: Applications/Text
Source: http://dl.cihar.com/enca/@PACKAGE_TARNAME@-@[email protected]
URL: https://github.com/nijel/@PACKAGE_TARNAME@
Prefix: %{_prefix}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
Enca is an Extremely Naive Charset Analyser.
It detects character set and encoding of text files and can also convert them
to other encodings using either a built-in converter or external libraries and
tools like GNU recode (librecode), UNIX98 iconv (libiconv), perl Unicode::Map
and cstocs.
Currently, it has support for Belarusian, Bulgarian, Croatian, Czech,
Estonian, Latvian, Lithuanian, Polish, Russian, Slovak, Slovene, Ukrainian,
Chinese, and some multibyte encodings (mostly variants of Unicode) independent
on the language.
This package contains enca, a command line frontend, as well as the shared
Enca libraries other programs can make use of.
Install enca if you need to cope with text files of dubious origin and unknown
encoding and convert them to some reasonable encoding.
%package devel
Summary: Header files and libraries for Enca development.
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
%description devel
The %{name}-devel package contains the static libraries, header files and
documentation for writing programs using Enca, the Extremely Naive Charset
Analyser.
Install %{name}-devel if you are going to create applications using the Enca
library.
%prep
%setup -q
%build
%configure \
--disable-dependency-tracking \
--without-librecode \
%{?_without_htmldocs:--disable-gtk-doc} \
%{?_without_static:--disable-static}
%__make %{?_smp_mflags}
%check
#make check
%install
[ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot}
%make_install
%__mv %{buildroot}/%{_datadir}/gtk-doc/ gtk-doc
%if %{without static}
%__rm -f %{buildroot}/%{_libdir}/libenca.a
%__rm -f %{buildroot}/%{_libdir}/libenca.la
%endif
%clean
[ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot}
%files
%defattr(755,root,root)
%{_bindir}/enca
%{_bindir}/enconv
%{_libdir}/libenca.so*
# external converters
%{_libexecdir}/%{name}/extconv/*
%dir %{_libexecdir}/%{name}/extconv
%dir %{_libexecdir}/%{name}
# docs and man pages
%defattr(644,root,root)
%doc AUTHORS ChangeLog COPYING FAQ README THANKS TODO
%doc %{_mandir}/man1/enca.1*
%doc %{_mandir}/man1/enconv.1*
%files devel
%defattr(-,root,root)
%{_includedir}/enca.h
%{_libdir}/pkgconfig/enca.pc
# static libs
%if %{with static}
%{_libdir}/libenca.a
%{_libdir}/libenca.la
%endif
# README and HTML docs
%doc DEVELOP.md
%if %{with htmldocs}
%doc gtk-doc/html
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%changelog
* Sat Jan 10 2015 Victor Foitzik (vifo) <[email protected]>
- updated spec to match information on Github and
align with recent packaging guidelines from Fedora
- added conditional builds for HTML documentation and
static libraries
* Sun Dec 18 2005 David Necas (Yeti) <[email protected]>
- fixed 0644 permissions on doc directory
* Mon May 17 2004 David Necas (Yeti) <[email protected]>
- doubled percents in changelog
* Mon Dec 22 2003 David Necas (Yeti) <[email protected]>
- moved wrappers to libexec
* Thu Nov 6 2003 David Necas (Yeti) <[email protected]>
- added b-piconv
- fixed HTML doc install paths
* Tue Oct 14 2003 David Necas (Yeti) <[email protected]>
- testing whether $RPM_BUILD_ROOT is not /
- updated for new HTML doc location
- changed make -> %%__make, rm -> %%__rm
* Sat Aug 2 2003 David Necas (Yeti) <[email protected]>
- cleaning $RPM_BUILD_ROOT in %%install
* Sat Jun 28 2003 David Necas (Yeti) <[email protected]>
- removed --disable-gtk-doc, no longer needed
* Fri Jun 20 2003 David Necas (Yeti) <[email protected]>
- added enca.pc to devel package
* Sat Jun 14 2003 David Necas (Yeti) <[email protected]>
- updated description
- added --disable-gtk-doc
* Mon Dec 23 2002 David Necas (Yeti) <[email protected]>
- added libenca.so
* Fri Dec 20 2002 David Necas (Yeti) <[email protected]>
- fixed URL and Source to trific.ath.cx
* Mon Oct 21 2002 David Necas (Yeti) <[email protected]>
- added FAQ to docs
* Thu Oct 10 2002 David Necas (Yeti) <[email protected]>
- removed twice-listed %%{docdir}/html
* Sat Sep 21 2002 David Necas (Yeti) <[email protected]>
- added b-umap
* Sun Sep 15 2002 David Necas (Yeti) <[email protected]>
- added enconv
* Thu Aug 29 2002 David Necas (Yeti) <[email protected]>
- removed bzip2-devel buildprereq
* Sat Aug 24 2002 David Necas (Yeti) <[email protected]>
- added postinstall and postuninstall scriptlets
* Wed Aug 21 2002 David Necas (Yeti) <[email protected]>
- updated to enca-0.10.0-pre2
- added libenca
- split into enca and enca-devel
- removed cache
- fixed HTML_DIR
* Tue Jul 10 2001 David Necas (Yeti) <[email protected]>
- changed rpm macros in Source and URL to autoconf macros to ease debian/
stuff generation
* Sun May 20 2001 David Necas (Yeti) <[email protected]>
- added BuildPrereq: bzip2-devel
* Wed May 2 2001 David Necas (Yeti) <[email protected]>
- changed group to standard (but much less appropriate) Applications/Text
- rpm macros are used instead of autoconf macros (after the first definition)
* Sun Mar 11 2001 David Necas (Yeti) <[email protected]>
- added defattr, doc attributes
- uses global configure cache
- heavy use of predefined directories
- configure moved to build section as is usual
* Sun Feb 25 2001 David Necas (Yeti) <[email protected]>
- updated to enca-0.9.0pre4 (including files and descriptions)
- added sed dependency
* Sun Oct 25 2000 David Necas (Yeti) <[email protected]>
- updated to enca-0.7.5
* Sun Oct 11 2000 David Necas (Yeti) <[email protected]>
- removed redundant Provides: enca
* Sun Oct 1 2000 David Necas (Yeti) <[email protected]>
- updated to enca-0.7.1
- man page forced to be intstalled to ${prefix}/share/man
* Tue Sep 26 2000 David Necas (Yeti) <[email protected]>
- updated to enca-0.7.0
- spec autogenerated by configure
* Tue Sep 19 2000 David Necas (Yeti) <[email protected]>
- fixed not installing bcstocs
* Wed Sep 13 2000 David Necas (Yeti) <[email protected]>
- first packaged (0.6.2)