xterm.spec revision 492d43a5
1# $XTermId: xterm.spec,v 1.5 2010/10/24 21:20:10 tom Exp $ 2Summary: A text-based Web browser 3Name: xterm 4Version: dev 5Release: 266 6License: X11 7Group: Applications/Internet 8Source: xterm-%{release}.tgz 9# URL: http://invisible-island.net/xterm/ 10Provides: x-terminal-emulator 11 12%description 13xterm is the standard terminal emulator for the X Window System. 14It provides DEC VT102 and Tektronix 4014 compatible terminals for 15programs that cannot use the window system directly. This version 16implements ISO/ANSI colors, Unicode, and most of the control sequences 17used by DEC VT220 terminals. 18 19This package provides four commands: 20 a) xterm, which is the actual terminal emulator 21 b) uxterm, which is a wrapper around xterm which sets xterm to use UTF-8 22 encoding when the user's locale supports this, 23 c) koi8rxterm, a wrapper similar to uxterm for locales that use the 24 KOI8-R character set, and 25 d) resize. 26 27A complete list of control sequences supported by the X terminal emulator 28is provided in /usr/share/doc/xterm. 29 30The xterm program uses bitmap images provided by the xbitmaps package. 31 32Those interested in using koi8rxterm will likely want to install the 33xfonts-cyrillic package as well. 34 35%prep 36 37%define my_suffix -dev 38 39%define desktop_vendor dickey 40%define desktop_utils %(if which desktop-file-install 2>&1 >/dev/null ; then echo "yes" ; fi) 41 42%define apps_shared %(test -d /usr/share/X11/app-defaults && echo 1 || echo 0) 43%define apps_syscnf %(test -d /etc/X11/app-defaults && echo 1 || echo 0) 44 45%if %{apps_shared} 46%define _xresdir %{_datadir}/X11/app-defaults 47%else 48%define _xresdir %{_sysconfdir}/X11/app-defaults 49%endif 50 51%define _iconsdir %{_datadir}/icons 52%define _pixmapsdir %{_datadir}/pixmaps 53%define my_docdir %{_datadir}/doc/xterm%{my_suffix} 54 55%setup -q -n xterm-%{release} 56 57%build 58CPPFLAGS="-DMISC_EXP -DEXP_HTTP_HEADERS" \ 59%configure \ 60 --target %{_target_platform} \ 61 --prefix=%{_prefix} \ 62 --bindir=%{_bindir} \ 63 --datadir=%{_datadir} \ 64 --mandir=%{_mandir} \ 65%if "%{my_suffix}" != "" 66 --program-suffix=%{my_suffix} \ 67 --without-xterm-symlink \ 68%endif 69 --enable-256-color \ 70 --enable-88-color \ 71 --enable-dabbrev \ 72 --enable-dec-locator \ 73 --enable-exec-xterm \ 74 --enable-hp-fkeys \ 75 --enable-load-vt-fonts \ 76 --enable-logfile-exec \ 77 --enable-logging \ 78 --enable-mini-luit \ 79 --enable-paste64 \ 80 --enable-rectangles \ 81 --enable-sco-fkeys \ 82 --enable-tcap-fkeys \ 83 --enable-tcap-query \ 84 --enable-toolbar \ 85 --enable-wide-chars \ 86 --enable-xmc-glitch \ 87 --with-app-defaults=%{_xresdir} \ 88 --with-icondir=%{_pixmapsdir} \ 89 --with-own-terminfo=%{_datadir}/terminfo \ 90 --with-terminal-type=xterm-new \ 91 --with-utempter 92make 93 94chmod u+w XTerm.ad 95cat >>XTerm.ad <<EOF 96*backarrowKeyIsErase: true 97*ptyInitialErase: true 98EOF 99ls -l *.ad 100 101%install 102rm -rf $RPM_BUILD_ROOT 103 104# Usually do not use install-ti, since that will conflict with ncurses. 105make install-bin install-man install-app install-icon \ 106%if "%{install_ti}" == "yes" 107 install-ti \ 108%endif 109 DESTDIR=$RPM_BUILD_ROOT \ 110 TERMINFO=%{_datadir}/terminfo 111 112 mkdir -p $RPM_BUILD_ROOT%{my_docdir} 113 cp \ 114 ctlseqs.txt \ 115 README.i18n \ 116 THANKS \ 117 xterm.log.html \ 118 $RPM_BUILD_ROOT%{my_docdir}/ 119 120 cp -r vttests \ 121 $RPM_BUILD_ROOT%{my_docdir}/ 122 123 # The scripts are readable, but not executable, to let find-requires 124 # know that they do not depend on Perl packages. 125 chmod 644 $RPM_BUILD_ROOT%{my_docdir}/vttests/* 126 127%if "%{desktop_utils}" == "yes" 128for p in *.desktop 129do 130 sed -i \ 131 -e 's/Categories=System;/Categories=Application;Utility;/' \ 132 -e 's/^\\(Name=.*\\)/\\1%{my_suffix}/' \ 133 -e 's/^\\(Exec=.*\\)/\\1%{my_suffix}/' \ 134 $p 135done 136 137make install-desktop \ 138 DESKTOP_FLAGS="--vendor='%{desktop_vendor}' --dir $RPM_BUILD_ROOT%{_datadir}/applications" 139 140test -n "%{my_suffix}" && \ 141( cd $RPM_BUILD_ROOT%{_datadir}/applications 142 for p in *.desktop 143 do 144 mv $p `basename $p .desktop`%{my_suffix}.desktop 145 done 146) 147%endif 148 149%clean 150rm -rf $RPM_BUILD_ROOT 151 152%files 153%defattr(-,root,root,-) 154%{_bindir}/koi8rxterm%{my_suffix} 155%{_bindir}/xterm%{my_suffix} 156%{_bindir}/uxterm%{my_suffix} 157%{_bindir}/resize%{my_suffix} 158%{_mandir}/*/* 159%{my_docdir}/* 160%{_pixmapsdir}/xterm*.xpm 161%{_xresdir}/*XTerm* 162 163%if "%{install_ti}" == "yes" 164%{_datadir}/terminfo/* 165%endif 166 167%if "%{desktop_utils}" == "yes" 168%config(missingok) %{_datadir}/applications/%{desktop_vendor}-xterm%{my_suffix}.desktop 169%config(missingok) %{_datadir}/applications/%{desktop_vendor}-uxterm%{my_suffix}.desktop 170%endif 171 172%changelog 173 174* Fri Oct 22 2010 Thomas E. Dickey 175- initial version. 176