xterm.spec revision f2e35a3a
1# $XTermId: xterm.spec,v 1.141 2021/02/08 20:30:49 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: 366 9Release: 1 10License: X11 11Group: User Interface/X 12Source: xterm-%{version}.tgz 13URL: ftp://ftp.invisible-island.net/xterm/ 14Provides: x-terminal-emulator >= %{version} 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 target_appdata %{fullname}.appdata.xml 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=%{fullname} \ 110 --with-icon-theme \ 111 --with-icondir=%{_iconsdir} \ 112%endif 113 --with-app-class=%{my_class} \ 114 --disable-imake \ 115 --enable-dabbrev \ 116 --enable-dec-locator \ 117 --enable-double-buffer \ 118 --enable-exec-xterm \ 119 --enable-hp-fkeys \ 120 --enable-load-vt-fonts \ 121 --enable-logfile-exec \ 122 --enable-logging \ 123 --enable-mini-luit \ 124 --enable-regis-graphics \ 125 --enable-sco-fkeys \ 126 --enable-toolbar \ 127 --enable-xmc-glitch \ 128 --with-app-defaults=%{_xresdir} \ 129 --with-pixmapdir=%{_pixmapsdir} \ 130 --with-own-terminfo=%{_datadir}/terminfo \ 131 --with-terminal-type=xterm-new \ 132 --with-utempter \ 133 --with-icon-name=mini.xterm \ 134 --with-xpm 135make 136 137chmod u+w XTerm.ad 138cat >>XTerm.ad <<EOF 139*backarrowKeyIsErase: true 140*ptyInitialErase: true 141EOF 142ls -l *.ad 143 144%install 145rm -rf $RPM_BUILD_ROOT 146 147# Usually do not use install-ti, since that will conflict with ncurses. 148make install-bin install-man install-app install-icon \ 149%if "%{install_ti}" == "yes" 150 install-ti \ 151%endif 152 DESTDIR=$RPM_BUILD_ROOT \ 153 TERMINFO=%{_datadir}/terminfo 154 155 mkdir -p $RPM_BUILD_ROOT%{my_docdir} 156 cp \ 157 ctlseqs.txt \ 158 README.i18n \ 159 THANKS \ 160 xterm.log.html \ 161 $RPM_BUILD_ROOT%{my_docdir}/ 162 163 cp -r vttests \ 164 $RPM_BUILD_ROOT%{my_docdir}/ 165 166 # The scripts are readable, but not executable, to let find-requires 167 # know that they do not depend on Perl packages. 168 chmod 644 $RPM_BUILD_ROOT%{my_docdir}/vttests/*.pl 169 170%if "%{desktop_utils}" 171make install-desktop \ 172 DESKTOP_FLAGS="--dir $RPM_BUILD_ROOT%{_datadir}/applications" 173 174test -n "%{my_suffix}" && \ 175( cd $RPM_BUILD_ROOT%{_datadir}/applications 176 for p in *.desktop 177 do 178 mv $p `basename $p .desktop`%{my_suffix}.desktop 179 done 180) 181 182mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata && \ 183install -m 644 xterm.appdata.xml $RPM_BUILD_ROOT%{_datadir}/appdata/%{target_appdata} && \ 184( cd $RPM_BUILD_ROOT%{_datadir}/appdata 185 sed -i \ 186 -e 's/>xterm\.desktop</>%{fullname}.desktop</' \ 187 -e 's/>XTerm</>%{my_class}</' \ 188 %{target_appdata} 189) 190diff -u xterm.appdata.xml $RPM_BUILD_ROOT%{_datadir}/appdata/%{target_appdata} && \ 191%endif 192 193%post 194%if "%{icon_theme}" 195touch --no-create %{_iconsdir}/hicolor 196if [ -x %{_bindir}/gtk-update-icon-cache ]; then 197 %{_bindir}/gtk-update-icon-cache %{_iconsdir}/hicolor || : 198fi 199%endif 200# find-requires does not care about at this point 201chmod +x %{my_docdir}/vttests/*.* 202 203%postun 204%if "%{icon_theme}" 205touch --no-create %{_iconsdir}/hicolor 206if [ -x %{_bindir}/gtk-update-icon-cache ]; then 207 %{_bindir}/gtk-update-icon-cache %{_iconsdir}/hicolor || : 208fi 209%endif 210 211%clean 212if rm -rf $RPM_BUILD_ROOT; then 213 echo OK 214else 215 find $RPM_BUILD_ROOT -type f | grep -F -v /.nfs && exit 1 216fi 217exit 0 218 219%files 220%defattr(-,root,root,-) 221%{_bindir}/koi8r%{fullname} 222%{_bindir}/%{fullname} 223%{_bindir}/u%{fullname} 224%{_bindir}/resize%{my_suffix} 225%{_mandir}/*/* 226%{my_docdir}/* 227%{_xresdir}/*XTerm* 228 229%if "%{install_ti}" == "yes" 230%{_datadir}/terminfo/* 231%endif 232 233%if "%{desktop_utils}" 234%config(missingok) %{_datadir}/appdata/%{target_appdata} 235%config(missingok) %{_datadir}/applications/%{fullname}.desktop 236%config(missingok) %{_datadir}/applications/u%{fullname}.desktop 237%endif 238 239%if "%{icon_theme}" 240%{_iconsdir}/hicolor/*.png 241%{_iconsdir}/hicolor/*.svg 242%{_iconsdir}/hicolor/48x48/apps/*.png 243%{_iconsdir}/hicolor/scalable/apps/*.svg 244%endif 245%{_pixmapsdir}/*.xpm 246 247%changelog 248 249* Sat Jul 25 2020 Thomas E. Dickey 250- sixels are enabled by default 251 252* Sun Mar 08 2020 Thomas E. Dickey 253- remove "--vendor" option from desktop-file-install 254 255* Sun Nov 17 2019 Thomas E. Dickey 256- install appdata.xml file 257 258* Wed May 02 2018 Thomas E. Dickey 259- install all icons 260 261* Fri Jan 29 2016 Thomas E. Dickey 262- use --enable-screen-dumps 263 264* Mon May 27 2013 Thomas E. Dickey 265- use --with-icon-symlink 266 267* Mon Oct 08 2012 Thomas E. Dickey 268- added to pixmapsdir 269 270* Fri Jun 15 2012 Thomas E. Dickey 271- modify to support icon theme 272 273* Fri Oct 22 2010 Thomas E. Dickey 274- initial version. 275