803afe4991d4bb8e4de494d96e98abddac0f8298
[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:        ftp://sunsite.unc.edu/pub/Linux/utils/text/%{name}-%{version}.tar.gz
9 Patch0:         %{name}-makefile.patch
10 Patch1:         %{name}-known_charsets_no_tcs.patch
11 URL:            http://x-lt.richard.eu.org/me/rch/ll.html
12 #URL:           http://www.angelfire.com/me/rch/ll.html#2UTF
13 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
14
15 %define         _sysconfdir     /etc
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 %{__make} GZIPDOCS=no \
54         PREFIX=$RPM_BUILD_ROOT%{_prefix} \
55         sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} \
56         var_prefix=$RPM_BUILD_ROOT/var \
57         ALIASES=$RPM_BUILD_ROOT%{aliasdir}/2UTF.aliases \
58         docsdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} \
59         charmaps_localdatadir=$RPM_BUILD_ROOT%{_datadir}/i18n/charmaps \
60         TERMINFO=$RPM_BUILD_ROOT%{_datadir}/terminfo \
61         man1dir=$RPM_BUILD_ROOT%{_mandir}/man1 \
62         tmpdir_install=yes \
63         owner=`id -ur` \
64         group=`id -gr` \
65         install
66
67 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{fromUTF.1,toUTF.1}
68 echo ".so 2UTF.1" > $RPM_BUILD_ROOT%{_mandir}/man1/toUTF.1
69 echo ".so 2UTF.1" > $RPM_BUILD_ROOT%{_mandir}/man1/fromUTF.1
70
71 ln -sf 2UTF $RPM_BUILD_ROOT%{_bindir}/toUTF
72
73 %post
74 if [ -f /var/lib/2UTF.aliases ]; then
75         mv -f /var/lib/2UTF.aliases %{aliasdir}/2UTF.aliases
76 fi
77 %{_bindir}/2UTF --create-aliases
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %files
83 %defattr(644,root,root,755)
84 %doc examples/* BSD_style_license TODO changelog copyright
85 %config %{_sysconfdir}/2UTF.config
86 %attr(755,root,root) %{_bindir}/*
87 %{_mandir}/man1/*
88 %{_datadir}/terminfo/l/*
89 %attr(644,root,root) %ghost %{aliasdir}/2UTF.aliases
This page took 0.030066 seconds and 2 git commands to generate.