1 |
%define Summary The standard terminal emulator for the X Window System |
2 |
|
3 |
Summary: %{Summary} |
4 |
Name: xterm |
5 |
Version: 282 |
6 |
Release: %mkrel 1 |
7 |
Source0: ftp://invisible-island.net/xterm/%{name}-%{version}.tgz |
8 |
Source1: ftp://invisible-island.net/xterm/%{name}-%{version}.tgz.asc |
9 |
Source11: %{name}-16x16.png |
10 |
Source12: %{name}-32x32.png |
11 |
Source13: %{name}-48x48.png |
12 |
|
13 |
# from http://www.vim.org/scripts/script.php?script_id=1349, public domain |
14 |
Source20: colortest.pl |
15 |
|
16 |
Url: http://invisible-island.net/xterm/ |
17 |
License: MIT |
18 |
Group: Terminals |
19 |
BuildRequires: libx11-devel |
20 |
BuildRequires: libxaw-devel |
21 |
BuildRequires: libxft-devel |
22 |
BuildRequires: libxmu-devel |
23 |
BuildRequires: libxt-devel |
24 |
BuildRequires: fontconfig-devel |
25 |
BuildRequires: libncurses-devel |
26 |
BuildRequires: luit |
27 |
Requires: luit |
28 |
Requires(post,postun): update-alternatives |
29 |
|
30 |
%description |
31 |
The XTerm program is the standard terminal emulator for the X Window System. It |
32 |
provides DEC VT102/VT220 and Tektronix 4014 compatible terminals for programs |
33 |
that can't use the window system directly. If the underlying operating system |
34 |
supports terminal resizing capabilities (for example, the SIGWINCH signal in |
35 |
systems derived from 4.3bsd), xterm will use the facilities to notify programs |
36 |
running in the window whenever it is resized. |
37 |
|
38 |
The xterm included in this package has support for 256 colors enabled. |
39 |
|
40 |
%prep |
41 |
%setup -q |
42 |
cp %{SOURCE20} . |
43 |
|
44 |
%build |
45 |
%configure2_5x \ |
46 |
--disable-full-tgetent \ |
47 |
--enable-wide-chars \ |
48 |
--x-includes=%{_includedir}/freetype2 \ |
49 |
--enable-luit \ |
50 |
--enable-256-color \ |
51 |
--with-app-defaults=%{_libdir}/X11/app-defaults |
52 |
|
53 |
%make |
54 |
|
55 |
%install |
56 |
make DESTDIR=%{buildroot} install |
57 |
|
58 |
# NOTE: encodingMode: locale means to follow the charset encoding of the |
59 |
# locale. A quite complete unicode font is set as the default (instead of the |
60 |
# very poor "fixed" one). a quick cat is used instead of patching the sources; |
61 |
# it shoulmd be made the default imho |
62 |
# locale: true means to use luit to convert locale encoding to unicode |
63 |
# for display. |
64 |
# luit support is needed for it to work -- pablo |
65 |
cat << EOF >> %{buildroot}%{_libdir}/X11/app-defaults/XTerm |
66 |
|
67 |
*.vt100.font: -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1 |
68 |
*.vt100.encodingMode: locale |
69 |
*.locale: true |
70 |
*.PtyInitialErase: on |
71 |
*.backarrowKeyIsErase: on |
72 |
EOF |
73 |
|
74 |
mkdir -p %{buildroot}%{_datadir}/applications |
75 |
cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop << EOF |
76 |
[Desktop Entry] |
77 |
Name=XTerm |
78 |
Comment=%{Summary} |
79 |
Exec=%{name} -name Terminal |
80 |
Icon=xterm-terminal |
81 |
Terminal=false |
82 |
Type=Application |
83 |
StartupNotify=true |
84 |
Categories=TerminalEmulator;System;Utility; |
85 |
EOF |
86 |
|
87 |
for xpm in xterm{-color_32x32,-color_48x48,_32x32,_48x48}.xpm; do |
88 |
rm -f %{buildroot}%{_datadir}/pixmaps/$xpm |
89 |
done |
90 |
mkdir -p %{buildroot}%{_iconsdir}/hicolor/{16x16,32x32,48x48}/apps |
91 |
install -m 644 %{_sourcedir}/xterm-16x16.png \ |
92 |
%{buildroot}%{_iconsdir}/hicolor/16x16/apps/xterm-terminal.png |
93 |
install -m 644 %{_sourcedir}/xterm-32x32.png \ |
94 |
%{buildroot}%{_iconsdir}/hicolor/32x32/apps/xterm-terminal.png |
95 |
install -m 644 %{_sourcedir}/xterm-48x48.png \ |
96 |
%{buildroot}%{_iconsdir}/hicolor/48x48/apps/xterm-terminal.png |
97 |
|
98 |
%post |
99 |
update-alternatives --install %{_bindir}/xvt xvt %{_bindir}/xterm 18 || : |
100 |
|
101 |
%postun |
102 |
[[ "$1" = "0" ]] && update-alternatives --remove xvt %{_bindir}/xterm || : |
103 |
|
104 |
%files |
105 |
%doc ctlseqs.txt colortest.pl |
106 |
%{_bindir}/* |
107 |
%{_mandir}/*/* |
108 |
%{_libdir}/X11/app-defaults/* |
109 |
%{_datadir}/applications/%{_real_vendor}-%{name}.desktop |
110 |
%{_iconsdir}/hicolor/*/apps/xterm-terminal.png |