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
|
|
|
#
|
2013-08-06 14:39:42 +02:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
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.
|
|
|
|
|
2006-12-19 00:18:00 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2008-06-24 01:29:45 +02:00
|
|
|
|
2006-12-19 00:18:00 +01:00
|
|
|
Name: tcsh
|
2007-03-29 12:10:42 +02:00
|
|
|
BuildRequires: ncurses-devel
|
2007-10-13 00:12:53 +02:00
|
|
|
Url: http://www.tcsh.org/
|
2012-05-10 10:01:23 +02:00
|
|
|
Requires: gawk
|
|
|
|
Requires: textutils
|
2011-11-17 11:34:10 +01:00
|
|
|
%if %suse_version > 1020
|
2012-01-16 14:43:34 +01:00
|
|
|
Recommends: tcsh-lang = 6.18.00
|
2011-11-17 11:34:10 +01:00
|
|
|
%endif
|
2013-08-06 14:39:42 +02:00
|
|
|
Version: 6.18.01
|
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
|
2013-08-06 14:39:42 +02:00
|
|
|
Source: ftp.astron.com:/pub/tcsh/tcsh-6.18.01.tar.gz
|
2007-07-16 17:55:24 +02:00
|
|
|
Source2: bindkey.tcsh
|
|
|
|
Source3: complete.tcsh
|
2012-01-16 14:43:34 +01:00
|
|
|
Patch: tcsh-6.18.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
|
|
|
|
Patch3: tcsh-6.15.00-blanks.dif
|
|
|
|
Patch4: tcsh-6.17.03-colorls.dif
|
|
|
|
Patch5: tcsh-6.17.06-dspmbyte.dif
|
2012-01-10 18:37:30 +01:00
|
|
|
Patch6: tcsh-6.17.10-catalogs.dif
|
2012-05-10 10:01:23 +02:00
|
|
|
Patch7: tcsh-6.18.01-blk_buf.patch
|
2013-08-06 14:39:42 +02:00
|
|
|
Patch8: tcsh-6.18.01-metakey.patch
|
2013-10-15 19:08:10 +02:00
|
|
|
Patch9: tcsh-6.18.01-history-merge.dif
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Christos Zoulas <christos@deshaw.com>
|
|
|
|
Scott Krotz <krotz@mot.com>
|
|
|
|
|
2011-11-17 11:34:10 +01:00
|
|
|
%package -n tcsh-lang
|
|
|
|
Summary: Languages for package tcsh
|
|
|
|
Group: System/Localization
|
|
|
|
Provides: tcsh-lang = %{version}
|
|
|
|
Requires: tcsh = %{version}
|
|
|
|
|
|
|
|
%description -n tcsh-lang
|
|
|
|
Provides translations to the package tcsh
|
|
|
|
|
2006-12-19 00:18:00 +01:00
|
|
|
%prep
|
|
|
|
%setup
|
2011-11-17 11:34:10 +01:00
|
|
|
%patch1 -p0 -b .pipe
|
|
|
|
%patch2 -p0 -b .normcmd
|
2008-11-07 15:50:46 +01:00
|
|
|
### disabled for know, should work on os11.1 without
|
2011-11-17 11:34:10 +01:00
|
|
|
### %patch3 -p0 -b .blanks
|
|
|
|
%patch4 -p0 -b .colorls
|
|
|
|
%patch5 -p0 -b .dspmbyte
|
|
|
|
%patch6 -p0 -b .catalogs
|
2012-05-10 10:01:23 +02:00
|
|
|
%patch7 -p0 -b .blk_buf
|
2013-08-06 14:39:42 +02:00
|
|
|
%patch8 -p0 -b .metakey
|
2013-10-15 19:08:10 +02:00
|
|
|
%patch9 -p0 -b .history
|
2011-11-17 11:34:10 +01:00
|
|
|
%patch -b .0
|
2006-12-19 00:18:00 +01:00
|
|
|
|
|
|
|
%build
|
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
|
2010-02-18 16:59:51 +01:00
|
|
|
CFLAGS="$RPM_OPT_FLAGS -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
|
|
|
|
cflags -Wl,--hash-size=16699 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 \
|
|
|
|
--bindir=/bin \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
2007-07-16 17:55:24 +02:00
|
|
|
--sharedstatedir=%_datadir \
|
|
|
|
--infodir=%_infodir \
|
|
|
|
--mandir=%_mandir \
|
|
|
|
--libexecdir=/usr/%{_lib}/tcsh \
|
|
|
|
--disable-rpath \
|
|
|
|
--with-gnu-ld
|
2012-01-10 18:37:30 +01:00
|
|
|
make
|
2007-07-23 21:31:32 +02:00
|
|
|
#
|
|
|
|
# requires a working terminal on stdin
|
|
|
|
# make check
|
2006-12-19 00:18:00 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
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
|
2010-12-14 18:25:40 +01:00
|
|
|
dir=$RPM_BUILD_ROOT/usr/share/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
|
|
|
|
install -m 0444 ${msg} ${dir}/tcsh
|
2006-12-19 00:18:00 +01:00
|
|
|
done
|
2011-11-17 11:34:10 +01:00
|
|
|
make DESTDIR=$RPM_BUILD_ROOT GENCAT='/usr/bin/gencat --new' install
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT GENCAT='/usr/bin/gencat --new' install.man
|
2006-12-19 00:18:00 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_docdir}/tcsh
|
|
|
|
install -m 0444 FAQ $RPM_BUILD_ROOT%{_docdir}/tcsh/FAQ.tcsh
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/profile.d/
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/bin
|
2007-07-16 17:55:24 +02:00
|
|
|
install -m 644 $RPM_SOURCE_DIR/bindkey.tcsh $RPM_BUILD_ROOT/etc/profile.d/
|
|
|
|
install -m 644 $RPM_SOURCE_DIR/complete.tcsh $RPM_BUILD_ROOT/etc/profile.d/
|
2011-11-17 11:34:10 +01:00
|
|
|
rm -f $RPM_BUILD_ROOT/bin/csh
|
|
|
|
rm -f $RPM_BUILD_ROOT/usr/bin/csh
|
|
|
|
rm -f $RPM_BUILD_ROOT/usr/bin/tcsh
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/csh.*
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/C
|
2006-12-19 00:18:00 +01:00
|
|
|
ln -sf tcsh $RPM_BUILD_ROOT/bin/csh
|
2007-07-16 17:55:24 +02:00
|
|
|
ln -sf tcsh.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/csh.1.gz
|
2006-12-19 00:18:00 +01:00
|
|
|
ln -sf ../../bin/tcsh $RPM_BUILD_ROOT/usr/bin/csh
|
|
|
|
ln -sf ../../bin/tcsh $RPM_BUILD_ROOT/usr/bin/tcsh
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_docdir}/tcsh
|
|
|
|
/bin/csh
|
|
|
|
/bin/tcsh
|
|
|
|
%config /etc/profile.d/bindkey.tcsh
|
|
|
|
%config /etc/profile.d/complete.tcsh
|
|
|
|
/usr/bin/csh
|
|
|
|
/usr/bin/tcsh
|
|
|
|
%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
|
|
|
|
|
|
|
%files -n tcsh-lang
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_datadir}/locale/*/LC_MESSAGES/tcsh*
|
2007-12-20 16:45:44 +01:00
|
|
|
|
2007-02-26 19:05:29 +01:00
|
|
|
%changelog
|