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