xterm.spec revision e0a2b6df
1# $XTermId: xterm.spec,v 1.66 2014/03/04 22:46:25 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: 303 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-sco-fkeys \ 127 --enable-sixel-graphics \ 128 --enable-tcap-fkeys \ 129 --enable-tcap-query \ 130 --enable-toolbar \ 131 --enable-wide-chars \ 132 --enable-xmc-glitch \ 133 --with-app-defaults=%{_xresdir} \ 134 --with-pixmapdir=%{_pixmapsdir} \ 135 --with-own-terminfo=%{_datadir}/terminfo \ 136 --with-terminal-type=xterm-new \ 137 --with-utempter \ 138 --with-icon-name=mini.xterm \ 139 --with-xpm 140 copy config.status /tmp/ 141make 142 143chmod u+w XTerm.ad 144cat >>XTerm.ad <<EOF 145*backarrowKeyIsErase: true 146*ptyInitialErase: true 147EOF 148ls -l *.ad 149 150%install 151rm -rf $RPM_BUILD_ROOT 152 153# Usually do not use install-ti, since that will conflict with ncurses. 154make install-bin install-man install-app install-icon \ 155%if "%{install_ti}" == "yes" 156 install-ti \ 157%endif 158 DESTDIR=$RPM_BUILD_ROOT \ 159 TERMINFO=%{_datadir}/terminfo 160 161 mkdir -p $RPM_BUILD_ROOT%{my_docdir} 162 cp \ 163 ctlseqs.txt \ 164 README.i18n \ 165 THANKS \ 166 xterm.log.html \ 167 $RPM_BUILD_ROOT%{my_docdir}/ 168 169 cp -r vttests \ 170 $RPM_BUILD_ROOT%{my_docdir}/ 171 172 # The scripts are readable, but not executable, to let find-requires 173 # know that they do not depend on Perl packages. 174 chmod 644 $RPM_BUILD_ROOT%{my_docdir}/vttests/*.pl 175 176%if "%{desktop_utils}" 177make install-desktop \ 178 DESKTOP_FLAGS="--vendor='%{desktop_vendor}' --dir $RPM_BUILD_ROOT%{_datadir}/applications" 179 180test -n "%{my_suffix}" && \ 181( cd $RPM_BUILD_ROOT%{_datadir}/applications 182 for p in *.desktop 183 do 184 mv $p `basename $p .desktop`%{my_suffix}.desktop 185 done 186) 187%endif 188 189%post 190%if "%{icon_theme}" 191touch --no-create %{_iconsdir}/hicolor 192if [ -x %{_bindir}/gtk-update-icon-cache ]; then 193 %{_bindir}/gtk-update-icon-cache %{_iconsdir}/hicolor || : 194fi 195%endif 196# find-requires does not care about at this point 197chmod +x %{my_docdir}/vttests/*.* 198 199%postun 200%if "%{icon_theme}" 201touch --no-create %{_iconsdir}/hicolor 202if [ -x %{_bindir}/gtk-update-icon-cache ]; then 203 %{_bindir}/gtk-update-icon-cache %{_iconsdir}/hicolor || : 204fi 205%endif 206 207%clean 208rm -rf $RPM_BUILD_ROOT 209 210%files 211%defattr(-,root,root,-) 212%{_bindir}/koi8r%{fullname} 213%{_bindir}/%{fullname} 214%{_bindir}/u%{fullname} 215%{_bindir}/resize%{my_suffix} 216%{_mandir}/*/* 217%{my_docdir}/* 218%{_xresdir}/*XTerm* 219 220%if "%{install_ti}" == "yes" 221%{_datadir}/terminfo/* 222%endif 223 224%if "%{desktop_utils}" 225%config(missingok) %{_datadir}/applications/%{desktop_vendor}-%{fullname}.desktop 226%config(missingok) %{_datadir}/applications/%{desktop_vendor}-u%{fullname}.desktop 227%endif 228 229%if "%{icon_theme}" 230%{_iconsdir}/hicolor/48x48/apps/%{fullname}*.png 231%{_iconsdir}/hicolor/scalable/apps/%{fullname}*.svg 232%endif 233%{_pixmapsdir}/*%{fullname}*.xpm 234 235# files added by --with-icon-symlink 236%if "%{icon_theme}" 237%{_iconsdir}/hicolor/xterm.png 238%{_iconsdir}/hicolor/xterm.svg 239%endif 240%{_pixmapsdir}/xterm.xpm 241 242%changelog 243 244* Mon May 27 2013 Thomas E. Dickey 245- use --with-icon-symlink 246 247* Mon Oct 08 2012 Thomas E. Dickey 248- added to pixmapsdir 249 250* Fri Jun 15 2012 Thomas E. Dickey 251- modify to support icon theme 252 253* Fri Oct 22 2010 Thomas E. Dickey 254- initial version. 255