File screen.spec of Package screen

# spec file for package screen
# Copyright (c) 2021 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%if 0%{?suse_version} > 1310
%define rundir /run
%define rundir %{_localstatedir}/run
Name:           screen
Version:        4.8.0
Release:        0
Summary:        A program to allow multiple screens on a VT100/ANSI Terminal
License:        GPL-3.0-or-later
Group:          System/Console
Source1:        screen.conf
Source4:        screen.pam
Patch0:         global_screenrc.patch
Patch6:         libtinfo.diff
Patch7:         combchar.diff
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  ncurses-devel
BuildRequires:  pam-devel
Requires(post): permissions
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1140
BuildRequires:  makeinfo
%if 0%{?suse_version} > 1130
BuildRequires:  utempter-devel
BuildRequires:  utempter
Requires:       terminfo-base

With this program you can take advantage of the multitasking abilities
of your Linux system by opening several sessions over one terminal. The
sessions can also be detached and resumed from another login terminal.

Documentation: man page

%setup -q
# global_screenrc.patch
# libtinfo.diff

sh ./

CFLAGS="-DMAXWIN=1000 %{optflags}" %configure --prefix=%{_prefix} --infodir=%{_infodir} \
				--mandir=%{_mandir} \
				--with-socket-dir='(eff_uid ? "%{rundir}/uscreens" : "%{rundir}/screens")' \
				--with-sys-screenrc=%{_sysconfdir}/screenrc \
				--with-pty-group=5 \
				--enable-use-locale \
				--enable-telnet \
				--enable-pam \
				--enable-colors256 \

# update Makefile so that make -j becomes reliable
:> osdef.h	# so that make depend has a chance
:> comm.h	# so that make depend has a chance
make %{?_smp_mflags} depend	# FIXME: this should be self sufficient.
rm osdef.h	# so that make will use
rm comm.h	# so that make will use

make %{?_smp_mflags}

rm -f %{buildroot}%{_bindir}/screen
mv %{buildroot}%{_bindir}/screen-%{version} %{buildroot}%{_bindir}/screen
chmod 755 %{buildroot}%{_bindir}/screen
mkdir -p %{buildroot}/etc
mkdir -p %{buildroot}/etc/pam.d
mkdir -p %{buildroot}%{_prefix}/lib
mkdir -p %{buildroot}%{_tmpfilesdir}
mkdir -p %{buildroot}%{rundir}/screens
chmod 755 %{buildroot}%{rundir}/screens
mkdir -p %{buildroot}%{rundir}/uscreens
install -m 644 screenrc %{buildroot}%{_sysconfdir}/screenrc
install -m 644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}
install -m 644 %{SOURCE4} %{buildroot}/etc/pam.d/screen

%config %{_sysconfdir}/screenrc
%config /etc/pam.d/screen
%attr(555,root,root) %{_bindir}/screen
%dir %{_datadir}/screen
%license COPYING

%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%tmpfiles_create %{_tmpfilesdir}/screen.conf

%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

openSUSE Build Service is sponsored by