4c06c1446ecc6a2ef14730c710cd5a176f9b7581
[packages/2UTF.git] / 2UTF.spec
1 Summary:        Translates char-sets and decodes MIME
2 Summary(pl):    Translator tablic znaków oraz dekoder MIME
3 Name:           2UTF
4 Version:        1.22
5 Release:        7
6 License:        BSD
7 Group:          Applications/Text
8 #Source0-md5:   883da4c858570d9d434d23e702304a5a
9 Source0:        ftp://sunsite.unc.edu/pub/Linux/utils/text/%{name}-%{version}.tar.gz
10 Patch0:         %{name}-makefile.patch
11 Patch1:         %{name}-known_charsets_no_tcs.patch
12 URL:            http://x-lt.richard.eu.org/me/rch/ll.html
13 #URL:           http://www.angelfire.com/me/rch/ll.html#2UTF
14 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15
16 %define         aliasdir        /var/lib/misc
17
18 %description
19 Filter for char-set translation to and from Unicode. Gets char-set
20 definitions from WG15 locales char-maps or similiar tables. Can decode
21 nested multi-part MIME messages and invoke external filters. Can
22 display char-maps and current console font.
23
24 %description -l pl
25 Translator tablic znaków do i z Unikodu. Pobiera definicje tablic
26 znaków z lokalnych WG15 tablic znaków lub podobnych. Mo¿e zdekodowaæ
27 wiadomo¶ci wieloczê¶ciowe MIME i uruchamiaæ zewnêtrzne filtry. Mo¿e
28 wy¶wietlaæ tablice znaków i aktualny font konsolowy.
29
30 %prep
31 %setup -q
32 %patch0 -p0
33 %patch1 -p1
34
35 %build
36 CCFLAGS="%{rpmcflags} -L/usr/lib/gconv"; export CCFLAGS
37 %{__make} config ICONV_DIR=%{_prefix}
38 LDFLAGS="%{rpmcflags} -L/usr/lib/gconv"; export LDFLAGS
39 %{__make} \
40         GZIPDOCS=no \
41         PREFIX=%{_prefix} \
42         sysconfdir=%{_sysconfdir} \
43         docsdir=%{_docdir}/%{name}-%{version} \
44         var_prefix=/var \
45         ALIASES=%{aliasdir}/2UTF.aliases \
46         charmaps_localdatadir=%{_datadir}/i18n/charmaps \
47         man1dir=%{_mandir}/man1 \
48         OPT="%{rpmcflags}"
49
50 %install
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT%{_datadir}/i18n/charmaps
53
54 %{__make} install \
55         GZIPDOCS=no \
56         PREFIX=$RPM_BUILD_ROOT%{_prefix} \
57         sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} \
58         var_prefix=$RPM_BUILD_ROOT/var \
59         ALIASES=$RPM_BUILD_ROOT%{aliasdir}/2UTF.aliases \
60         docsdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} \
61         charmaps_localdatadir=$RPM_BUILD_ROOT%{_datadir}/i18n/charmaps \
62         TERMINFO=$RPM_BUILD_ROOT%{_datadir}/terminfo \
63         man1dir=$RPM_BUILD_ROOT%{_mandir}/man1 \
64         tmpdir_install=yes \
65         owner=`id -ur` \
66         group=`id -gr`
67
68 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{fromUTF.1,toUTF.1}
69 echo ".so 2UTF.1" > $RPM_BUILD_ROOT%{_mandir}/man1/toUTF.1
70 echo ".so 2UTF.1" > $RPM_BUILD_ROOT%{_mandir}/man1/fromUTF.1
71
72 ln -sf 2UTF $RPM_BUILD_ROOT%{_bindir}/toUTF
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77 %post
78 if [ -f /var/lib/2UTF.aliases ]; then
79         mv -f /var/lib/2UTF.aliases %{aliasdir}/2UTF.aliases
80 fi
81 %{_bindir}/2UTF --create-aliases
82
83 %files
84 %defattr(644,root,root,755)
85 %doc examples/* BSD_style_license TODO changelog copyright
86 %config %{_sysconfdir}/2UTF.config
87 %attr(755,root,root) %{_bindir}/*
88 %{_mandir}/man1/*
89 %{_datadir}/terminfo/l/*
90 %attr(644,root,root) %ghost %{aliasdir}/2UTF.aliases
This page took 0.051289 seconds and 2 git commands to generate.