"Fossies" - the Fresh Open Source Software Archive

Member "xterm-356/package/xterm.spec" (2 May 2020, 7764 Bytes) of package /linux/misc/xterm-356.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) RPM Spec source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "xterm.spec": 355_vs_356.

    1 # $XTermId: xterm.spec,v 1.130 2020/05/02 10:19:22 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: 356
    9 Release: 1
   10 License: X11
   11 Group: User Interface/X
   12 Source: xterm-%{version}.tgz
   13 URL: ftp://ftp.invisible-island.net/xterm/
   14 Provides: 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}
   27 BuildRequires: x11-docs
   28 %else
   29 %if %{is_redhat}
   30 BuildRequires: xorg-x11-docs
   31 %else
   32 %if %{is_suse}
   33 BuildRequires: xorg-docs
   34 %endif
   35 %endif
   36 %endif
   37 
   38 %endif
   39 
   40 %description
   41 xterm is the standard terminal emulator for the X Window System.
   42 It provides DEC VT102 and Tektronix 4014 compatible terminals for
   43 programs that cannot use the window system directly.  This version
   44 implements ISO/ANSI colors, Unicode, and most of the control sequences
   45 used by DEC VT220 terminals.
   46 
   47 This 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 
   56 A complete list of control sequences supported by the X terminal emulator
   57 is provided in /usr/share/doc/%{fullname}.
   58 
   59 The %{fullname} program uses bitmap images provided by the xbitmaps package.
   60 
   61 Those interested in using koi8r%{fullname} will likely want to install the
   62 xfonts-cyrillic package as well.
   63 
   64 This package is configured to use "%{fullname}" and "%{my_class}"
   65 for 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
   97 CPPFLAGS="-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-sixel-graphics \
  127         --enable-toolbar \
  128         --enable-xmc-glitch \
  129         --with-app-defaults=%{_xresdir} \
  130         --with-pixmapdir=%{_pixmapsdir} \
  131         --with-own-terminfo=%{_datadir}/terminfo \
  132         --with-terminal-type=xterm-new \
  133         --with-utempter \
  134         --with-icon-name=mini.xterm \
  135         --with-xpm
  136 make
  137 
  138 chmod u+w XTerm.ad
  139 cat >>XTerm.ad <<EOF
  140 *backarrowKeyIsErase: true
  141 *ptyInitialErase: true
  142 EOF
  143 ls -l *.ad
  144 
  145 %install
  146 rm -rf $RPM_BUILD_ROOT
  147 
  148 # Usually do not use install-ti, since that will conflict with ncurses.
  149 make install-bin install-man install-app install-icon \
  150 %if "%{install_ti}" == "yes"
  151         install-ti \
  152 %endif
  153         DESTDIR=$RPM_BUILD_ROOT \
  154         TERMINFO=%{_datadir}/terminfo
  155 
  156         mkdir -p $RPM_BUILD_ROOT%{my_docdir}
  157         cp \
  158                 ctlseqs.txt \
  159                 README.i18n \
  160                 THANKS \
  161                 xterm.log.html \
  162         $RPM_BUILD_ROOT%{my_docdir}/
  163 
  164         cp -r vttests \
  165         $RPM_BUILD_ROOT%{my_docdir}/
  166 
  167         # The scripts are readable, but not executable, to let find-requires
  168         # know that they do not depend on Perl packages.
  169         chmod 644 $RPM_BUILD_ROOT%{my_docdir}/vttests/*.pl
  170 
  171 %if "%{desktop_utils}"
  172 make install-desktop \
  173         DESKTOP_FLAGS="--dir $RPM_BUILD_ROOT%{_datadir}/applications"
  174 
  175 test -n "%{my_suffix}" && \
  176 ( cd $RPM_BUILD_ROOT%{_datadir}/applications
  177         for p in *.desktop
  178         do
  179                 mv $p `basename $p .desktop`%{my_suffix}.desktop
  180         done
  181 )
  182 
  183 mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata && \
  184 install -m 644 xterm.appdata.xml $RPM_BUILD_ROOT%{_datadir}/appdata/%{target_appdata} && \
  185 ( cd $RPM_BUILD_ROOT%{_datadir}/appdata
  186   sed -i \
  187       -e 's/>xterm\.desktop</>%{fullname}.desktop</' \
  188       -e 's/>XTerm</>%{my_class}</' \
  189       %{target_appdata}
  190 )
  191 diff -u xterm.appdata.xml $RPM_BUILD_ROOT%{_datadir}/appdata/%{target_appdata} && \
  192 %endif
  193 
  194 %post
  195 %if "%{icon_theme}"
  196 touch --no-create %{_iconsdir}/hicolor
  197 if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  198   %{_bindir}/gtk-update-icon-cache %{_iconsdir}/hicolor || :
  199 fi
  200 %endif
  201 # find-requires does not care about at this point
  202 chmod +x %{my_docdir}/vttests/*.*
  203 
  204 %postun
  205 %if "%{icon_theme}"
  206 touch --no-create %{_iconsdir}/hicolor
  207 if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  208   %{_bindir}/gtk-update-icon-cache %{_iconsdir}/hicolor || :
  209 fi
  210 %endif
  211 
  212 %clean
  213 if rm -rf $RPM_BUILD_ROOT; then
  214   echo OK
  215 else
  216   find $RPM_BUILD_ROOT -type f | grep -F -v /.nfs && exit 1
  217 fi
  218 exit 0
  219 
  220 %files
  221 %defattr(-,root,root,-)
  222 %{_bindir}/koi8r%{fullname}
  223 %{_bindir}/%{fullname}
  224 %{_bindir}/u%{fullname}
  225 %{_bindir}/resize%{my_suffix}
  226 %{_mandir}/*/*
  227 %{my_docdir}/*
  228 %{_xresdir}/*XTerm*
  229 
  230 %if "%{install_ti}" == "yes"
  231 %{_datadir}/terminfo/*
  232 %endif
  233 
  234 %if "%{desktop_utils}"
  235 %config(missingok) %{_datadir}/appdata/%{target_appdata}
  236 %config(missingok) %{_datadir}/applications/%{fullname}.desktop
  237 %config(missingok) %{_datadir}/applications/u%{fullname}.desktop
  238 %endif
  239 
  240 %if "%{icon_theme}"
  241 %{_iconsdir}/hicolor/*.png
  242 %{_iconsdir}/hicolor/*.svg
  243 %{_iconsdir}/hicolor/48x48/apps/*.png
  244 %{_iconsdir}/hicolor/scalable/apps/*.svg
  245 %endif
  246 %{_pixmapsdir}/*.xpm
  247 
  248 %changelog
  249 
  250 * Sun Mar 08 2020 Thomas E. Dickey
  251 - remove "--vendor" option from desktop-file-install
  252 
  253 * Sun Nov 17 2019 Thomas E. Dickey
  254 - install appdata.xml file
  255 
  256 * Wed May 02 2018 Thomas E. Dickey
  257 - install all icons
  258 
  259 * Fri Jan 29 2016 Thomas E. Dickey
  260 - use --enable-screen-dumps
  261 
  262 * Mon May 27 2013 Thomas E. Dickey
  263 - use --with-icon-symlink
  264 
  265 * Mon Oct 08 2012 Thomas E. Dickey
  266 - added to pixmapsdir
  267 
  268 * Fri Jun 15 2012 Thomas E. Dickey
  269 - modify to support icon theme
  270 
  271 * Fri Oct 22 2010 Thomas E. Dickey
  272 - initial version.