1 |
pterjan |
26629 |
%define Summary The standard terminal emulator for the X Window System |
2 |
|
|
|
3 |
|
|
Summary: %{Summary} |
4 |
|
|
Name: xterm |
5 |
|
|
Version: 267 |
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 |
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{version}-buildroot |
28 |
|
|
Conflicts: XFree86 < 3.3.6-13mdk |
29 |
|
|
Requires: luit |
30 |
|
|
Requires(post,postun): update-alternatives |
31 |
|
|
|
32 |
|
|
%description |
33 |
|
|
The XTerm program is the standard terminal emulator for the X Window System. It |
34 |
|
|
provides DEC VT102/VT220 and Tektronix 4014 compatible terminals for programs |
35 |
|
|
that can't use the window system directly. If the underlying operating system |
36 |
|
|
supports terminal resizing capabilities (for example, the SIGWINCH signal in |
37 |
|
|
systems derived from 4.3bsd), xterm will use the facilities to notify programs |
38 |
|
|
running in the window whenever it is resized. |
39 |
|
|
|
40 |
|
|
The xterm included in this package has support for 256 colors enabled. |
41 |
|
|
|
42 |
|
|
%prep |
43 |
|
|
%setup -q |
44 |
|
|
cp %{SOURCE20} . |
45 |
|
|
|
46 |
|
|
%build |
47 |
|
|
%configure2_5x \ |
48 |
|
|
--disable-full-tgetent \ |
49 |
|
|
--enable-wide-chars \ |
50 |
|
|
--x-includes=%{_includedir}/freetype2 \ |
51 |
|
|
--enable-luit \ |
52 |
|
|
--enable-256-color \ |
53 |
|
|
--with-app-defaults=%{_libdir}/X11/app-defaults |
54 |
|
|
|
55 |
|
|
%make |
56 |
|
|
|
57 |
|
|
%install |
58 |
|
|
rm -rf $RPM_BUILD_ROOT |
59 |
|
|
make DESTDIR=$RPM_BUILD_ROOT install |
60 |
|
|
|
61 |
|
|
# NOTE: encodingMode: locale means to follow the charset encoding of the |
62 |
|
|
# locale. A quite complete unicode font is set as the default (instead of the |
63 |
|
|
# very poor "fixed" one). a quick cat is used instead of patching the sources; |
64 |
|
|
# it shoulmd be made the default imho |
65 |
|
|
# locale: true means to use luit to convert locale encoding to unicode |
66 |
|
|
# for display. |
67 |
|
|
# luit support is needed for it to work -- pablo |
68 |
|
|
cat << EOF >> $RPM_BUILD_ROOT%{_libdir}/X11/app-defaults/XTerm |
69 |
|
|
|
70 |
|
|
*.vt100.font: -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1 |
71 |
|
|
*.vt100.encodingMode: locale |
72 |
|
|
*.locale: true |
73 |
|
|
*.PtyInitialErase: on |
74 |
|
|
*.backarrowKeyIsErase: on |
75 |
|
|
EOF |
76 |
|
|
|
77 |
|
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications |
78 |
|
|
cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-%{name}.desktop << EOF |
79 |
|
|
[Desktop Entry] |
80 |
|
|
Name=XTerm |
81 |
|
|
Comment=%Summary |
82 |
|
|
Exec=%{name} -name Terminal |
83 |
|
|
Icon=xterm-terminal |
84 |
|
|
Terminal=false |
85 |
|
|
Type=Application |
86 |
|
|
StartupNotify=true |
87 |
|
|
Categories=TerminalEmulator;System;Utility; |
88 |
|
|
EOF |
89 |
|
|
|
90 |
|
|
for xpm in xterm{-color_32x32,-color_48x48,_32x32,_48x48}.xpm; do |
91 |
|
|
rm -f $RPM_BUILD_ROOT%{_datadir}/pixmaps/$xpm |
92 |
|
|
done |
93 |
|
|
mkdir -p $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{16x16,32x32,48x48}/apps |
94 |
|
|
install -m 644 %{_sourcedir}/xterm-16x16.png \ |
95 |
|
|
$RPM_BUILD_ROOT%{_iconsdir}/hicolor/16x16/apps/xterm-terminal.png |
96 |
|
|
install -m 644 %{_sourcedir}/xterm-32x32.png \ |
97 |
|
|
$RPM_BUILD_ROOT%{_iconsdir}/hicolor/32x32/apps/xterm-terminal.png |
98 |
|
|
install -m 644 %{_sourcedir}/xterm-48x48.png \ |
99 |
|
|
$RPM_BUILD_ROOT%{_iconsdir}/hicolor/48x48/apps/xterm-terminal.png |
100 |
|
|
|
101 |
|
|
%if 0 |
102 |
|
|
## strange, if xterm isn't launched with -name xxxx parameter it doesn't |
103 |
|
|
## take in account the ressources --> wrong font in unicode mode --> segfault |
104 |
|
|
## there is not time to fix the sources; using a script to ensure there |
105 |
|
|
## is always a -nae xxxx used (pablo) |
106 |
|
|
mv $RPM_BUILD_ROOT%{_bindir}/xterm $RPM_BUILD_ROOT%{_bindir}/xterm.real |
107 |
|
|
cat << EOF >> $RPM_BUILD_ROOT%{_bindir}/xterm |
108 |
|
|
#!/bin/bash |
109 |
|
|
|
110 |
|
|
if echo "\$@" | grep -- '-name' >&/dev/null ; then |
111 |
|
|
exec %{_bindir}/xterm.real "\$@" |
112 |
|
|
else exec %{_bindir}/xterm.real -name Terminal "\$@" |
113 |
|
|
fi |
114 |
|
|
EOF |
115 |
|
|
chmod a+rx $r%{_bindir}/xterm |
116 |
|
|
%endif |
117 |
|
|
|
118 |
|
|
%clean |
119 |
|
|
rm -rf $RPM_BUILD_ROOT |
120 |
|
|
|
121 |
|
|
%post |
122 |
|
|
%if %mdkversion < 200900 |
123 |
|
|
%update_menus |
124 |
|
|
%update_icon_cache hicolor |
125 |
|
|
%endif |
126 |
|
|
update-alternatives --install %{_bindir}/xvt xvt %{_bindir}/xterm 18 || : |
127 |
|
|
|
128 |
|
|
%postun |
129 |
|
|
%if %mdkversion < 200900 |
130 |
|
|
%clean_menus |
131 |
|
|
%update_icon_cache hicolor |
132 |
|
|
%endif |
133 |
|
|
[[ "$1" = "0" ]] && update-alternatives --remove xvt %{_bindir}/xterm || : |
134 |
|
|
|
135 |
|
|
%files |
136 |
|
|
%defattr(-,root,root) |
137 |
|
|
%doc ctlseqs.txt colortest.pl |
138 |
|
|
%{_bindir}/* |
139 |
|
|
%{_mandir}/*/* |
140 |
|
|
%{_libdir}/X11/app-defaults/* |
141 |
|
|
%_datadir/applications/mandriva-* |
142 |
|
|
%{_iconsdir}/hicolor/*/apps/xterm-terminal.png |
143 |
|
|
|
144 |
|
|
|