f7a5a9281adf38c437fc76f9a80698f84a2ff580
[packages/2UTF.git] / 2UTF.spec
1 Summary:        Translates char-sets and decodes MIME
2 Summary(pl.UTF-8):   Translator tablic znaków oraz dekoder MIME
3 Name:           2UTF
4 Version:        1.22
5 Release:        10
6 License:        BSD
7 Group:          Applications/Text
8 Source0:        ftp://sunsite.unc.edu/pub/Linux/utils/text/%{name}-%{version}.tar.gz
9 #Source0-md5:   883da4c858570d9d434d23e702304a5a
10 Patch0:         %{name}-makefile.patch
11 Patch1:         %{name}-known_charsets_no_tcs.patch
12 URL:            http://unicode.strangled.net/me/rch/ll.html
13 Requires:       localedb-src
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.UTF-8
25 Translator tablic znaków do i z Unikodu. Pobiera definicje tablic
26 znaków z lokalnych tablic znaków typu WG15 lub podobnych. Może
27 zdekodować wiadomości wieloczęściowe MIME i uruchamiać zewnętrzne
28 filtry. Pozwala też wyświetlać tablice znaków i aktualny font
29 konsolowy.
30
31 %prep
32 %setup -q
33 %patch0 -p0
34 %patch1 -p1
35
36 %build
37 CCFLAGS="%{rpmcflags} -L/usr/lib/gconv"; export CCFLAGS
38 %{__make} config ICONV_DIR=%{_prefix}
39 LDFLAGS="%{rpmcflags} -L/usr/lib/gconv"; export LDFLAGS
40 %{__make} \
41         GZIPDOCS=no \
42         PREFIX=%{_prefix} \
43         sysconfdir=%{_sysconfdir} \
44         docsdir=%{_docdir}/%{name}-%{version} \
45         var_prefix=/var \
46         ALIASES=%{aliasdir}/2UTF.aliases \
47         charmaps_localdatadir=%{_datadir}/i18n/charmaps \
48         man1dir=%{_mandir}/man1 \
49         OPT="%{rpmcflags}"
50
51 %install
52 rm -rf $RPM_BUILD_ROOT
53 install -d $RPM_BUILD_ROOT%{_datadir}/i18n/charmaps
54
55 %{__make} install \
56         GZIPDOCS=no \
57         PREFIX=$RPM_BUILD_ROOT%{_prefix} \
58         sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} \
59         var_prefix=$RPM_BUILD_ROOT/var \
60         ALIASES=$RPM_BUILD_ROOT%{aliasdir}/2UTF.aliases \
61         docsdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} \
62         charmaps_localdatadir=$RPM_BUILD_ROOT%{_datadir}/i18n/charmaps \
63         TERMINFO=$RPM_BUILD_ROOT%{_datadir}/terminfo \
64         man1dir=$RPM_BUILD_ROOT%{_mandir}/man1 \
65         tmpdir_install=yes \
66         owner=`id -ur` \
67         group=`id -gr`
68
69 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/{fromUTF.1,toUTF.1}
70 echo ".so 2UTF.1" > $RPM_BUILD_ROOT%{_mandir}/man1/toUTF.1
71 echo ".so 2UTF.1" > $RPM_BUILD_ROOT%{_mandir}/man1/fromUTF.1
72
73 ln -sf 2UTF $RPM_BUILD_ROOT%{_bindir}/toUTF
74
75 %clean
76 rm -rf $RPM_BUILD_ROOT
77
78 %post
79 if [ -f /var/lib/2UTF.aliases ]; then
80         mv -f /var/lib/2UTF.aliases %{aliasdir}/2UTF.aliases
81 fi
82 %{_bindir}/2UTF --create-aliases
83
84 %files
85 %defattr(644,root,root,755)
86 %doc examples/* BSD_style_license TODO changelog copyright
87 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/2UTF.config
88 %attr(755,root,root) %{_bindir}/*
89 %{_mandir}/man1/*
90 %{_datadir}/terminfo/l/*
91 %ghost %{aliasdir}/2UTF.aliases
This page took 0.038864 seconds and 2 git commands to generate.