Debian Codegraph @

package/xterm.spec

raw
1 # $XTermId: xterm.spec,v 1.219 2026/04/19 09:42:14 tom Exp $
2 Summary: X terminal emulator (development version)
3 %global my_middle xterm
4 %global my_suffix -dev
5 %global fullname %{my_middle}%{my_suffix}
6 %global my_class XTermDev
7 Name: %{fullname}
8 Version: 410
9 Release: 1
10 License: X11
11 Group: User Interface/X
12 Source: https://invisible-island.net/archives/xterm/xterm-%{version}.tgz
13 URL: https://invisible-island.net/xterm/
14 Provides: x-terminal-emulator >= %{version}
15
16 # Using "find-xterm-fonts" gives these package names:
17 #
18 # fedora:
19 # xorg-x11-fonts-misc
20 # mageia:
21 # x11-font-adobe-75dpi
22 # x11-font-misc-misc
23 # opensuse:
24 # efont-unicode-bitmap-fonts
25 # xorg-x11-fonts-core
26 # xorg-x11-fonts-legacy
27
28 # Library dependencies (chiefly Xft and Xpm) are similar across my test
29 # machines for mageia/fedora/opensuse, but package names vary:
30 #
31 # fedora:
32 # libXft libXft-devel
33 # libXpm libXpm-devel
34 # libutempter libutempter-devel
35 # ncurses-libs ncurses-devel
36 # mageia
37 # lib64xft2 lib64xft-devel
38 # lib64xpm4 lib64xpm-devel
39 # lib64utempter0 lib64utempter-devel
40 # lib64ncurses6 lib64ncurses-devel
41 # opensuse
42 # libXft2 libXft-devel
43 # libXpm4 libXpm-devel
44 # libutempter0 utempter-devel
45 # libncurses6 ncurses-devel
46
47 # This part (the build-requires) would be useful if the various distributions
48 # had provided stable package-naming, or virtual packages to cover transitions.
49 # However, they have not done this in the past.
50 %define use_x_manpage %(test "x$_use_x_manpage" = xyes && echo 1 || echo 0)
51 %if "%{use_x_manpage}"
52
53 %global is_mandriva %(test -f /etc/mandriva-release && echo %{use_x_manpage} || echo 0)
54 %global is_redhat %(test -f /etc/redhat-release && echo %{use_x_manpage} || echo 0)
55 %global is_suse %(test -f /etc/SuSE-release && echo %{use_x_manpage} || echo 0)
56
57 %if %{is_mandriva}
58 BuildRequires: x11-docs
59 %else
60 %if %{is_redhat}
61 # missing in Fedora 37:
62 ## BuildRequires: xorg-x11-docs
63 BuildRequires: ncurses-devel
64 %else
65 %if %{is_suse}
66 BuildRequires: xorg-docs
67 %endif
68 %endif
69 %endif
70
71 %endif
72
73 %description
74 xterm is the standard terminal emulator for the X Window System.
75 It provides DEC VT102 and Tektronix 4014 compatible terminals for
76 programs that cannot use the window system directly. This version
77 implements ISO/ANSI colors, Unicode, and most of the control sequences
78 used by DEC VT220 terminals.
79
80 This package provides four commands:
81 a) %{fullname}, which is the actual terminal emulator
82 b) u%{fullname}, which is a wrapper around %{fullname}
83 which sets %{fullname} to use UTF-8 encoding when
84 the user's locale supports this,
85 c) koi8r%{fullname}, a wrapper similar to u%{fullname}
86 for locales that use the KOI8-R character set, and
87 d) resize%{my_suffix}.
88
89 A complete list of control sequences supported by the X terminal emulator
90 is provided in /usr/share/doc/%{fullname}.
91
92 The %{fullname} program uses bitmap images provided by the xbitmaps package.
93
94 Those interested in using koi8r%{fullname} will likely want to install the
95 xfonts-cyrillic package as well.
96
97 This package is configured to use "%{fullname}" and "%{my_class}"
98 for the program and its resource class, to avoid conflict with other packages.
99
100 %prep
101
102 %global target_appdata %{fullname}.appdata.xml
103
104 %define desktop_utils %(if which desktop-file-install 2>&1 >/dev/null ; then echo 1 || echo 0 ; fi)
105 %define icon_theme %(test -d /usr/share/icons/hicolor && echo 1 || echo 0)
106 %define apps_x11r6 %(test -d /usr/X11R6/lib/X11/app-defaults && echo 1 || echo 0)
107 %define apps_shared %(test -d /usr/share/X11/app-defaults && echo 1 || echo 0)
108 %define apps_syscnf %(test -d /etc/X11/app-defaults && echo 1 || echo 0)
109
110 %if %{apps_x11r6}
111 %define _xresdir %{_prefix}/X11R6/lib/X11/app-defaults
112 %else
113 %if %{apps_shared}
114 %define _xresdir %{_datadir}/X11/app-defaults
115 %else
116 %define _xresdir %{_sysconfdir}/X11/app-defaults
117 %endif
118 %endif
119
120 %define _iconsdir %{_datadir}/icons
121 %define _pixmapsdir %{_datadir}/pixmaps
122 %define my_docdir %{_datadir}/doc/%{fullname}
123
124 # no need for debugging symbols...
125 %define debug_package %{nil}
126
127 %setup -q -n xterm-%{version}
128
129 %build
130 %configure \
131 --target %{_target_platform} \
132 --prefix=%{_prefix} \
133 --bindir=%{_bindir} \
134 --datadir=%{_datadir} \
135 --mandir=%{_mandir} \
136 %if "%{my_suffix}" != ""
137 --program-suffix=%{my_suffix} \
138 --without-xterm-symlink \
139 %endif
140 %if "%{icon_theme}"
141 --with-icon-symlink=%{fullname} \
142 --with-icon-theme \
143 --with-icondir=%{_iconsdir} \
144 %endif
145 --with-app-class=%{my_class} \
146 --disable-imake \
147 --enable-dabbrev \
148 --enable-dec-locator \
149 --enable-exec-xterm \
150 --enable-hp-fkeys \
151 --enable-load-vt-fonts \
152 --enable-logfile-exec \
153 --enable-logging \
154 --enable-mini-luit \
155 --enable-regis-graphics \
156 --enable-sco-fkeys \
157 --enable-toolbar \
158 --enable-xmc-glitch \
159 --with-app-defaults=%{_xresdir} \
160 --with-pixmapdir=%{_pixmapsdir} \
161 --with-own-terminfo=%{_datadir}/terminfo \
162 --with-terminal-type=xterm-new \
163 --with-utempter \
164 --with-icon-name=mini.xterm \
165 --with-xpm
166 make
167
168 chmod u+w XTerm.ad
169 cat >>XTerm.ad <<EOF
170 *backarrowKeyIsErase: true
171 *ptyInitialErase: true
172 EOF
173 ls -l *.ad
174
175 %install
176 rm -rf $RPM_BUILD_ROOT
177
178 # Usually do not use install-ti, since that will conflict with ncurses.
179 make install-bin install-man install-app install-icon \
180 %if "%{install_ti}" == "yes"
181 install-ti \
182 %endif
183 DESTDIR=$RPM_BUILD_ROOT \
184 TERMINFO=%{_datadir}/terminfo
185
186 mkdir -p $RPM_BUILD_ROOT%{my_docdir}
187 cp \
188 ctlseqs.txt \
189 README.i18n \
190 THANKS \
191 xterm.log.html \
192 $RPM_BUILD_ROOT%{my_docdir}/
193
194 cp -r vttests \
195 $RPM_BUILD_ROOT%{my_docdir}/
196
197 # The scripts are readable, but not executable, to let find-requires
198 # know that they do not depend on Perl packages.
199 chmod 644 $RPM_BUILD_ROOT%{my_docdir}/vttests/*.pl
200
201 %if "%{desktop_utils}"
202 make install-desktop \
203 DESKTOP_FLAGS="--dir $RPM_BUILD_ROOT%{_datadir}/applications"
204
205 test -n "%{my_suffix}" && \
206 ( cd $RPM_BUILD_ROOT%{_datadir}/applications
207 for p in *.desktop
208 do
209 mv $p `basename $p .desktop`%{my_suffix}.desktop
210 done
211 )
212
213 mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata && \
214 install -m 644 xterm.appdata.xml $RPM_BUILD_ROOT%{_datadir}/appdata/%{target_appdata} && \
215 ( cd $RPM_BUILD_ROOT%{_datadir}/appdata
216 sed -i \
217 -e 's/>xterm\.desktop</>%{fullname}.desktop</' \
218 -e 's/>XTerm</>%{my_class}</' \
219 %{target_appdata}
220 )
221 diff -u xterm.appdata.xml $RPM_BUILD_ROOT%{_datadir}/appdata/%{target_appdata} && \
222 %endif
223
224 %post
225 %if "%{icon_theme}"
226 touch --no-create %{_iconsdir}/hicolor
227 if [ -x %{_bindir}/gtk-update-icon-cache ]; then
228 %{_bindir}/gtk-update-icon-cache %{_iconsdir}/hicolor || :
229 fi
230 %endif
231 # find-requires does not care about at this point
232 chmod +x %{my_docdir}/vttests/*.*
233
234 %postun
235 %if "%{icon_theme}"
236 touch --no-create %{_iconsdir}/hicolor
237 if [ -x %{_bindir}/gtk-update-icon-cache ]; then
238 %{_bindir}/gtk-update-icon-cache %{_iconsdir}/hicolor || :
239 fi
240 %endif
241
242 %files
243 %defattr(-,root,root,-)
244 %{_bindir}/koi8r%{fullname}
245 %{_bindir}/%{fullname}
246 %{_bindir}/u%{fullname}
247 %{_bindir}/resize%{my_suffix}
248 %{_mandir}/*/*
249 %{my_docdir}/*
250 %{_xresdir}/*XTerm*
251
252 %if "%{install_ti}" == "yes"
253 %{_datadir}/terminfo/*
254 %endif
255
256 %if "%{desktop_utils}"
257 %config(missingok) %{_datadir}/appdata/%{target_appdata}
258 %config(missingok) %{_datadir}/applications/%{fullname}.desktop
259 %config(missingok) %{_datadir}/applications/u%{fullname}.desktop
260 %endif
261
262 %if "%{icon_theme}"
263 %{_iconsdir}/hicolor/*.png
264 %{_iconsdir}/hicolor/*.svg
265 %{_iconsdir}/hicolor/48x48/apps/*.png
266 %{_iconsdir}/hicolor/scalable/apps/*.svg
267 %endif
268 %{_pixmapsdir}/*.xpm
269
270 %changelog
271
272 * Sun Apr 19 2026 Thomas E. Dickey
273 - testing xterm-dev 410-1
274
275 * Fri Nov 25 2022 Thomas E. Dickey
276 - Fedora 37 has no xorg-x11-docs
277
278 * Thu Feb 24 2022 Thomas E. Dickey
279 - double-buffer is not enabled by default
280
281 * Sat Jul 25 2020 Thomas E. Dickey
282 - sixels are enabled by default
283
284 * Sun Mar 08 2020 Thomas E. Dickey
285 - remove "--vendor" option from desktop-file-install
286
287 * Sun Nov 17 2019 Thomas E. Dickey
288 - install appdata.xml file
289
290 * Wed May 02 2018 Thomas E. Dickey
291 - install all icons
292
293 * Fri Jan 29 2016 Thomas E. Dickey
294 - use --enable-screen-dumps
295
296 * Mon May 27 2013 Thomas E. Dickey
297 - use --with-icon-symlink
298
299 * Mon Oct 08 2012 Thomas E. Dickey
300 - added to pixmapsdir
301
302 * Fri Jun 15 2012 Thomas E. Dickey
303 - modify to support icon theme
304
305 * Fri Oct 22 2010 Thomas E. Dickey
306 - initial version.