summaryrefslogtreecommitdiffstats
path: root/tcsh.spec
blob: f793b7902dde2f13e9ec9431c5f2469a96a43aab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
%define	_bindir	/bin

Summary: An enhanced version of csh, the C shell.
Name:		tcsh
Version:	6.12
Release:	1
License:	distributable
Group:		System Environment/Shells
Source:		ftp://ftp.astron.com/pub/tcsh/tcsh-%{version}.00.tar.gz
Patch0:		tcsh-6.10.00-utmp.patch
Patch1:		tcsh-6.09.00-termios.patch
Patch2:		tcsh-6.08.00-security.patch
Patch3:		tcsh-6.08.00-pathmax.patch
Patch4:		tcsh-6.09.00-strcoll.patch
Patch5:		tcsh-6.09.00-locale.patch
Patch6:		tcsh-6.10.00-glibc_compat.patch
Patch7:		tcsh-6.10.00-dspmbyte.patch
Patch8:		tcsh-6.11.00-termcap.patch
Provides:	csh = %{version}
Prereq:		fileutils, grep
URL:		http://www.primate.wisc.edu/software/csh-tcsh-book/
Buildroot:	%{_tmppath}/%{name}-%{version}-root

%description
Tcsh is an enhanced but completely compatible version of csh, the C
shell.  Tcsh is a command language interpreter which can be used both
as an interactive login shell and as a shell script command processor.
Tcsh includes a command line editor, programmable word completion,
spelling correction, a history mechanism, job control and a C language
like syntax.

%prep
%setup -q -n %{name}-%{version}.00
%patch0 -p1 -b .utmp
%patch1 -p1 -b .termios
# upstreamed in 6.10.00
#%patch2 -p1 -b .security
# XXX not applied
#%patch3 -p1 -b .pathmax
# upstreamed in 6.10.00
#%patch4 -p1 -b .strcoll
%patch5 -p1 -b .locale
%patch6 -p1 -b .glibc_compat
%patch7 -p1 -b .mbyte
%patch8 -p1 -b .termcap
nroff -me eight-bit.me > eight-bit.txt
autoreconf

cat > catalogs << _EOF
de ISO-8859-1 german
el ISO-8859-7 greek
en ISO-8859-1 C
es ISO-8859-1 spanish
et ISO-8859-1 et
fi ISO-8859-1 finnish
fr ISO-8859-1 french
it ISO-8859-1 italian
ja eucJP      ja
pl ISO-8859-2 pl
ru ISO-8859-5 russian
uk ISO-8859-1 ukrainian
_EOF

cat catalogs | while read lang charset language ; do
	if ! grep -q '^$ codeset=' nls/$language/set1 ; then
		echo '$ codeset='$charset	>  nls/$language/set1.codeset
		cat nls/$language/set1		>> nls/$language/set1.codeset
		cat nls/$language/set1.codeset	>  nls/$language/set1
		rm  nls/$language/set1.codeset
	fi
done

%build
cp /usr/share/libtool/config.{sub,guess} .
%configure
make all
%{__perl} tcsh.man2html
make -C nls catalogs

%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1 ${RPM_BUILD_ROOT}%{_bindir}
install -m 755 tcsh ${RPM_BUILD_ROOT}%{_bindir}/tcsh
install -m 644 tcsh.man ${RPM_BUILD_ROOT}%{_mandir}/man1/tcsh.1
ln -sf tcsh ${RPM_BUILD_ROOT}%{_bindir}/csh
cat catalogs | while read lang charset language ; do
	dest=${RPM_BUILD_ROOT}%{_datadir}/locale/$lang/LC_MESSAGES
	if test -f tcsh.$language.cat ; then
		mkdir -p $dest
		install -m644 tcsh.$language.cat $dest/tcsh
	fi
done

%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf ${RPM_BUILD_ROOT}

%post
if [ ! -f /etc/shells ]; then
	echo "%{_bindir}/tcsh" >> /etc/shells
	echo "%{_bindir}/csh"  >> /etc/shells
else
	grep -q '^%{_bindir}/tcsh$' /etc/shells || \
	echo "%{_bindir}/tcsh" >> /etc/shells
	grep -q '^%{_bindir}/csh$'  /etc/shells || \
	echo "%{_bindir}/csh"  >> /etc/shells
fi

%postun
if [ ! -x %{_bindir}/tcsh ]; then
	grep -v '^%{_bindir}/tcsh$'  /etc/shells | \
	grep -v '^%{_bindir}/csh$' > /etc/shells.rpm
	cat /etc/shells.rpm > /etc/shells && rm /etc/shells.rpm
fi

%files
%defattr(-,root,root)
%doc FAQ Fixes NewThings complete.tcsh eight-bit.txt tcsh.html
%{_bindir}/tcsh
%{_bindir}/csh
%{_mandir}/*/*
%lang(de)	%{_datadir}/locale/de/LC_MESSAGES/tcsh*
%lang(el)	%{_datadir}/locale/el/LC_MESSAGES/tcsh*
%lang(en)	%{_datadir}/locale/en/LC_MESSAGES/tcsh*
%lang(es)	%{_datadir}/locale/es/LC_MESSAGES/tcsh*
%lang(et)	%{_datadir}/locale/et/LC_MESSAGES/tcsh*
%lang(fi)	%{_datadir}/locale/fi/LC_MESSAGES/tcsh*
%lang(fr)	%{_datadir}/locale/fr/LC_MESSAGES/tcsh*
%lang(it)	%{_datadir}/locale/it/LC_MESSAGES/tcsh*
%lang(ja)	%{_datadir}/locale/ja/LC_MESSAGES/tcsh*
%lang(pl)	%{_datadir}/locale/pl/LC_MESSAGES/tcsh*
%lang(ru)	%{_datadir}/locale/ru/LC_MESSAGES/tcsh*
%lang(uk)	%{_datadir}/locale/uk/LC_MESSAGES/tcsh*

%changelog
* Tue Jun  4 2002 Nalin Dahyabhai <nalin@redhat.com> 6.11-1
- update to 6.11

* Thu May 23 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu Jan 31 2002 Bill Nottingham <notting@redhat.com>
- rebuild in new env

* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
- Bump release + rebuild.

* Wed Mar 28 2001 Akira TAGOH <tagoh@redhat.com> 6.10-5
- Fixed check locale.

* Tue Feb  6 2001 Adrian Havill <havill@redhat.com>
- use <time.h> instead of <sys/time.h> for pickier lib (#25935)
- allow arguments for login shells (#19926)

* Thu Nov 30 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 6.10.00 to fix here-script vulnerability

* Wed Sep 18 2000 Adrian Havill <havill@redhat.com>
- fix catalog locale dirname for Japanese

* Thu Jun 15 2000 Jeff Johnson <jbj@redhat.com>
- FHS packaging.
- add locale support (#10345).

* Tue Mar  7 2000 Jeff Johnson <jbj@redhat.com>
- rebuild for sparc baud rates > 38400.

* Mon Jan 31 2000 Cristian Gafton <gafton@redhat.com>
- rebuild to fix dependencies

* Thu Jan 27 2000 Jeff Johnson <jbj@redhat.com>
- append entries to spanking new /etc/shells.

* Mon Jan 10 2000 Jeff Johnson <jbj@redhat.com>
- update to 6.09.
- fix strcoll oddness (#6000, #6244, #6398).

* Sat Sep 25 1999 Michael K. Johnson <johnsonm@redhat.com>
- fix $shell by using --bindir

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 5)

* Wed Feb 24 1999 Cristian Gafton <gafton@redhat.com>
- patch for using PATH_MAX instead of some silly internal #defines for
  variables that handle filenames.

* Fri Nov  6 1998 Jeff Johnson <jbj@redhat.com>
- update to 6.08.00.

* Fri Oct 02 1998 Cristian Gafton <gafton@redhat.com>
- upgraded to 6.07.09 from the freebsd
- security fix

* Wed Aug  5 1998 Jeff Johnson <jbj@redhat.com>
- use -ltermcap so that /bin/tcsh can be used in single user mode w/o /usr.
- update url's

* Mon Apr 27 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Thu Oct 21 1997 Cristian Gafton <gafton@redhat.com>
- updated to 6.07; added BuildRoot
- cleaned up the spec file; fixed source url

* Wed Sep 03 1997 Erik Troan <ewt@redhat.com>
- added termios hacks for new glibc
- added /bin/csh to file list

* Fri Jun 13 1997 Erik Troan <ewt@redhat.com>
- built against glibc

* Fri Feb 07 1997 Erik Troan <ewt@redhat.com>
 - Provides csh, adds and removes /bin/csh from /etc/shells if csh package
isn't installed.