2006-12-19 00:18:00 +01:00
|
|
|
#
|
2012-05-10 10:01:23 +02:00
|
|
|
# spec file for package tcsh
|
2006-12-19 00:18:00 +01:00
|
|
|
#
|
2022-01-11 16:23:18 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2006-12-19 00:18:00 +01:00
|
|
|
#
|
2008-10-06 19:09:46 +02:00
|
|
|
# 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.
|
|
|
|
|
2019-04-09 09:59:09 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-19 00:18:00 +01:00
|
|
|
#
|
|
|
|
|
2008-06-24 01:29:45 +02:00
|
|
|
|
2006-12-19 00:18:00 +01:00
|
|
|
Name: tcsh
|
2022-01-11 16:23:18 +01:00
|
|
|
Version: 6.23.02
|
2012-05-10 10:01:23 +02:00
|
|
|
Release: 0
|
2006-12-19 00:18:00 +01:00
|
|
|
Summary: The C SHell
|
2012-05-10 10:01:23 +02:00
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: System/Shells
|
2019-12-02 09:28:24 +01:00
|
|
|
URL: http://www.tcsh.org/
|
2021-04-27 10:05:03 +02:00
|
|
|
Source0: ftp.astron.com:/pub/%{name}/%{name}-%{version}.tar.gz
|
2021-11-12 08:29:52 +01:00
|
|
|
Source1: ftp.astron.com:/pub/%{name}/%{name}-%{version}.tar.gz.asc
|
2007-07-16 17:55:24 +02:00
|
|
|
Source2: bindkey.tcsh
|
|
|
|
Source3: complete.tcsh
|
2021-04-27 10:05:03 +02:00
|
|
|
Source4: tcsh.keyring
|
2019-05-09 10:55:54 +02:00
|
|
|
Patch0: tcsh-6.21.00.dif
|
2011-11-17 11:34:10 +01:00
|
|
|
Patch1: tcsh-6.15.00-pipe.dif
|
|
|
|
Patch2: tcsh-6.16.00-norm-cmd.dif
|
2015-05-05 12:23:49 +02:00
|
|
|
Patch4: tcsh-6.18.03-colorls.dif
|
2011-11-17 11:34:10 +01:00
|
|
|
Patch5: tcsh-6.17.06-dspmbyte.dif
|
2015-05-05 12:23:49 +02:00
|
|
|
Patch6: tcsh-6.18.03-catalogs.dif
|
2020-02-17 12:23:13 +01:00
|
|
|
Patch8: tcsh-6.22.02-local-dotlock.dif
|
2015-01-30 14:16:56 +01:00
|
|
|
BuildRequires: autoconf
|
2016-11-25 10:48:06 +01:00
|
|
|
BuildRequires: fdupes
|
2015-01-30 13:43:05 +01:00
|
|
|
BuildRequires: ncurses-devel
|
2015-01-30 14:16:56 +01:00
|
|
|
BuildRequires: screen
|
2015-01-30 13:43:05 +01:00
|
|
|
Requires: gawk
|
|
|
|
Requires: textutils
|
|
|
|
Recommends: tcsh-lang = %{version}
|
2006-12-19 00:18:00 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
Tcsh is an enhanced, but completely compatible, version of the Berkeley
|
|
|
|
UNIX C shell, csh(1). It is a command language interpreter usable as an
|
|
|
|
interactive login shell and a shell script command processor. It
|
|
|
|
includes a command-line editor, programmable word completion, spelling
|
|
|
|
correction, a history mechanism, job control, and a C-like syntax.
|
|
|
|
|
2015-01-30 13:43:05 +01:00
|
|
|
%lang_package
|
2011-11-17 11:34:10 +01:00
|
|
|
|
2006-12-19 00:18:00 +01:00
|
|
|
%prep
|
2015-01-30 13:43:05 +01:00
|
|
|
%setup -q
|
2019-05-09 10:55:54 +02:00
|
|
|
%patch1 -b .pipe
|
|
|
|
%patch2 -b .normcmd
|
|
|
|
%patch4 -b .colorls
|
|
|
|
%patch5 -b .dspmbyte
|
|
|
|
%patch6 -b .catalogs
|
2020-02-17 12:23:13 +01:00
|
|
|
%patch8 -p 0 -b .dotlock
|
2019-05-09 10:55:54 +02:00
|
|
|
%patch0 -b .0
|
2006-12-19 00:18:00 +01:00
|
|
|
|
|
|
|
%build
|
2015-05-05 12:23:49 +02:00
|
|
|
|
2011-11-18 14:37:49 +01:00
|
|
|
cflags ()
|
|
|
|
{
|
|
|
|
local flag=$1; shift
|
|
|
|
local var=$1; shift
|
|
|
|
test -n "${flag}" -a -n "${var}" || return
|
|
|
|
case "${!var}" in
|
|
|
|
*${flag}*) return
|
|
|
|
esac
|
|
|
|
set -o noclobber
|
|
|
|
case "$flag" in
|
|
|
|
-Wl,*)
|
|
|
|
if echo 'int main () { return 0; }' | \
|
|
|
|
${CC:-gcc} -Werror $flag -o /dev/null -xc - > /dev/null 2>&1 ; then
|
|
|
|
eval $var=\${$var:+\$$var\ }$flag
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if ${CC:-gcc} -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
|
|
|
|
eval $var=\${$var:+\$$var\ }$flag
|
|
|
|
fi
|
|
|
|
if ${CXX:-g++} -Werror $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then
|
|
|
|
eval $var=\${$var:+\$$var\ }$flag
|
|
|
|
fi
|
|
|
|
esac
|
|
|
|
set +o noclobber
|
|
|
|
}
|
2006-12-19 00:18:00 +01:00
|
|
|
CC=gcc
|
2015-01-30 13:43:05 +01:00
|
|
|
CFLAGS="%{optflags} -D_GNU_SOURCE -DBUFSIZE=8192 -pipe"
|
2011-11-18 14:37:49 +01:00
|
|
|
cflags -ftree-loop-linear CFLAGS
|
|
|
|
cflags -Wl,-O2 LDFLAGS
|
|
|
|
cflags -Wl,--as-needed LDFLAGS
|
|
|
|
export CC CFLAGS LDFLAGS
|
2006-12-19 00:18:00 +01:00
|
|
|
%ifarch %ix86
|
|
|
|
CPU=i586
|
|
|
|
%else
|
|
|
|
CPU=${RPM_ARCH}
|
|
|
|
%endif
|
|
|
|
./configure --build=${CPU}-suse-linux \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
2015-01-30 13:43:05 +01:00
|
|
|
--sharedstatedir=%{_datadir} \
|
|
|
|
--infodir=%{_infodir} \
|
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--libexecdir=%{_libdir}/tcsh \
|
2007-07-16 17:55:24 +02:00
|
|
|
--disable-rpath \
|
|
|
|
--with-gnu-ld
|
2016-11-25 10:48:06 +01:00
|
|
|
make %{?_smp_mflags} CC_FOR_GETHOST="$CC $CFLAGS"
|
2015-01-30 13:43:05 +01:00
|
|
|
|
|
|
|
%check
|
2015-01-30 14:16:56 +01:00
|
|
|
SCREENDIR=$(mktemp -d ${PWD}/screen.XXXXXXXXXX) || exit 1
|
|
|
|
SCREENRC=${SCREENDIR}/tcsh
|
|
|
|
TMPDIR=$(mktemp -d /tmp/tcsh.XXXXXXXXXX) || exit 1
|
|
|
|
export SCREENRC SCREENDIR TMPDIR
|
|
|
|
exec 0< /dev/null
|
|
|
|
SCREENLOG=${SCREENDIR}/log
|
|
|
|
cat > $SCREENRC<<-EOF
|
|
|
|
deflogin off
|
2017-01-19 13:38:40 +01:00
|
|
|
deflog on
|
2015-01-30 14:16:56 +01:00
|
|
|
logfile $SCREENLOG
|
|
|
|
logfile flush 1
|
|
|
|
logtstamp off
|
|
|
|
log on
|
|
|
|
setsid on
|
|
|
|
scrollback 0
|
|
|
|
silence on
|
|
|
|
utf8 on
|
|
|
|
EOF
|
|
|
|
> $SCREENLOG
|
|
|
|
tail -q -s 0.5 -f $SCREENLOG & pid=$!
|
2020-11-20 15:52:13 +01:00
|
|
|
env -i HOME=$HOME TERM=$TERM TMPDIR=$TMPDIR PATH=$PATH \
|
2015-01-30 14:16:56 +01:00
|
|
|
SCREENRC=$SCREENRC SCREENDIR=$SCREENDIR \
|
2017-01-19 13:38:40 +01:00
|
|
|
screen -D -m make check
|
2015-01-30 14:16:56 +01:00
|
|
|
sleep 1
|
|
|
|
kill -TERM $pid
|
|
|
|
rm -rf $SCREENDIR $TMPDIR
|
2019-04-09 10:11:22 +02:00
|
|
|
if grep -iq failed testsuite.log
|
|
|
|
then
|
|
|
|
echo FAILED
|
|
|
|
exit 127
|
|
|
|
fi
|
2006-12-19 00:18:00 +01:00
|
|
|
|
|
|
|
%install
|
2010-12-14 18:25:40 +01:00
|
|
|
for nls in nls/*.cat ; do
|
2006-12-19 00:18:00 +01:00
|
|
|
msg=$nls
|
2010-12-14 18:25:40 +01:00
|
|
|
nls=${nls##*/}
|
|
|
|
nls=${nls%%.*}
|
|
|
|
case "${nls}" in
|
2011-11-17 11:34:10 +01:00
|
|
|
fi*) nls=fi ;;
|
|
|
|
fr*) nls=fr ;;
|
|
|
|
ge*) nls=de ;;
|
|
|
|
gr*) nls=el ;;
|
|
|
|
it*) nls=it ;;
|
|
|
|
ru*) nls=ru_RU ;;
|
|
|
|
sp*) nls=es ;;
|
|
|
|
uk*) nls=uk_UA ;;
|
|
|
|
C) continue ;;
|
2006-12-19 00:18:00 +01:00
|
|
|
esac
|
2015-01-30 13:43:05 +01:00
|
|
|
dir=%{buildroot}%{_datadir}/locale/${nls}/LC_MESSAGES
|
2011-11-17 11:34:10 +01:00
|
|
|
test ! -e ${dir}/tcsh || continue
|
2010-12-14 18:25:40 +01:00
|
|
|
mkdir -p -m 0755 $dir
|
2016-11-25 10:48:06 +01:00
|
|
|
install -m 0644 ${msg} ${dir}/tcsh
|
2006-12-19 00:18:00 +01:00
|
|
|
done
|
2015-01-30 13:43:05 +01:00
|
|
|
make DESTDIR=%{buildroot} GENCAT='%{_bindir}/gencat --new' install
|
|
|
|
make DESTDIR=%{buildroot} GENCAT='%{_bindir}/gencat --new' install.man
|
2016-11-25 10:48:06 +01:00
|
|
|
find %{buildroot}%{_datadir}/locale -name tcsh | xargs chmod 0644
|
|
|
|
%fdupes -s %{buildroot}%{_datadir}/locale
|
2015-01-30 13:43:05 +01:00
|
|
|
mkdir -p %{buildroot}%{_docdir}/tcsh
|
2017-08-09 09:52:27 +02:00
|
|
|
install -m 0644 FAQ %{buildroot}%{_docdir}/tcsh/FAQ.tcsh
|
|
|
|
install -m 0644 Copyright %{buildroot}%{_docdir}/tcsh/Copyright
|
2015-01-30 13:43:05 +01:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/profile.d/
|
|
|
|
mkdir -p %{buildroot}%{_prefix}/bin
|
|
|
|
install -m 644 $RPM_SOURCE_DIR/bindkey.tcsh %{buildroot}%{_sysconfdir}/profile.d/
|
|
|
|
install -m 644 $RPM_SOURCE_DIR/complete.tcsh %{buildroot}%{_sysconfdir}/profile.d/
|
|
|
|
rm -f %{buildroot}%{_mandir}/man1/csh.*
|
|
|
|
rm -rf %{buildroot}%{_datadir}/locale/C
|
2020-11-20 15:46:09 +01:00
|
|
|
ln -sf tcsh %{buildroot}/%{_bindir}/csh
|
2015-01-30 13:43:05 +01:00
|
|
|
ln -sf tcsh.1.gz %{buildroot}%{_mandir}/man1/csh.1.gz
|
2020-11-20 15:46:09 +01:00
|
|
|
%if !0%{?usrmerged}
|
|
|
|
mkdir -p %{buildroot}/bin
|
2021-04-22 12:33:38 +02:00
|
|
|
ln -s %{_bindir}/tcsh %{buildroot}/bin/tcsh
|
|
|
|
ln -s %{_bindir}/tcsh %{buildroot}/bin/csh
|
2020-11-20 15:46:09 +01:00
|
|
|
%endif
|
2006-12-19 00:18:00 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_docdir}/tcsh
|
2020-11-20 15:46:09 +01:00
|
|
|
%if !0%{?usrmerged}
|
2006-12-19 00:18:00 +01:00
|
|
|
/bin/csh
|
|
|
|
/bin/tcsh
|
2020-11-20 15:46:09 +01:00
|
|
|
%endif
|
2015-01-30 13:43:05 +01:00
|
|
|
%config %{_sysconfdir}/profile.d/bindkey.tcsh
|
|
|
|
%config %{_sysconfdir}/profile.d/complete.tcsh
|
|
|
|
%{_bindir}/csh
|
|
|
|
%{_bindir}/tcsh
|
2017-08-09 09:52:27 +02:00
|
|
|
%doc %{_docdir}/tcsh/Copyright
|
2006-12-19 00:18:00 +01:00
|
|
|
%doc %{_docdir}/tcsh/FAQ.tcsh
|
2007-07-16 17:55:24 +02:00
|
|
|
%doc %{_mandir}/man1/csh.1.gz
|
|
|
|
%doc %{_mandir}/man1/tcsh.1.gz
|
2011-11-17 11:34:10 +01:00
|
|
|
|
2021-05-17 09:16:34 +02:00
|
|
|
%files lang
|
2016-11-25 10:48:06 +01:00
|
|
|
%defattr(0644,root,root)
|
2011-11-17 11:34:10 +01:00
|
|
|
%{_datadir}/locale/*/LC_MESSAGES/tcsh*
|
2007-12-20 16:45:44 +01:00
|
|
|
|
2007-02-26 19:05:29 +01:00
|
|
|
%changelog
|