]>
Commit | Line | Data |
---|---|---|
df4910bf | 1 | # |
0f8067ae | 2 | # Conditional build: |
9bef067a | 3 | %bcond_with working_history # compiles tcsh with timestamps in |
72d1d050 PG |
4 | # ~/.history file so it serves any real purpose (which |
5 | # is not the case for default PLD tcsh) | |
18e22217 | 6 | %bcond_with static # don't build static version |
0f8067ae | 7 | # |
366b6df6 | 8 | Summary: Enhanced c-shell |
44776055 ER |
9 | Summary(de.UTF-8): Erweiterte C-Shell |
10 | Summary(es.UTF-8): C-shell mejorada | |
11 | Summary(fr.UTF-8): Shell C amélioré | |
12 | Summary(ko.UTF-8): csh의 향상된 버전 | |
13 | Summary(pl.UTF-8): Zaawansowany C-shell | |
14 | Summary(pt_BR.UTF-8): C-shell melhorada | |
15 | Summary(ru.UTF-8): Улучшеная версия csh | |
16 | Summary(tr.UTF-8): Gelişmiş c-kabuğu (c-shell) | |
17 | Summary(uk.UTF-8): Покращена верся csh | |
366b6df6 | 18 | Name: tcsh |
18e22217 | 19 | Version: 6.18.01 |
12f8b424 | 20 | Release: 4 |
0bea26fe | 21 | License: distributable |
6a3eb4fb | 22 | Group: Applications/Shells |
c486a896 | 23 | Source0: ftp://ftp.astron.com/pub/tcsh/%{name}-%{version}.tar.gz |
18e22217 | 24 | # Source0-md5: 6eed09dbd4223ab5b6955378450d228a |
366b6df6 | 25 | Source1: csh.cshrc |
71c6987d | 26 | Source2: csh.login |
27 | Source3: %{name}-skel-.login | |
cd37c0fb JR |
28 | Patch0: %{name}-misc.patch |
29 | Patch1: %{name}-termios.patch | |
30 | Patch2: %{name}-no-timestamp-history.patch | |
31 | Patch3: %{name}-time.patch | |
32 | Patch4: %{name}-rlimit_locks.patch | |
33 | Patch5: %{name}-no_TERMCAP.patch | |
df91bec4 | 34 | Patch6: %{name}-format-security.patch |
9ac38fcf | 35 | URL: http://www.tcsh.org/Home |
9bb0f4d1 | 36 | BuildRequires: autoconf >= 2.59 |
ad17217d | 37 | BuildRequires: automake |
37250147 | 38 | BuildRequires: groff |
654ca8ad JB |
39 | # for gencat |
40 | BuildRequires: iconv | |
0f8067ae | 41 | BuildRequires: ncurses-devel >= 5.0 |
411bfd85 | 42 | %if %{with static} |
5865fac9 | 43 | BuildRequires: glibc-static |
0f8067ae | 44 | BuildRequires: ncurses-static |
411bfd85 | 45 | %endif |
0f8067ae JB |
46 | Requires(post,preun): grep |
47 | Requires(preun): fileutils | |
48 | Provides: csh | |
17f34f29 | 49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
945c0ef7 | 50 | |
7957f4c8 | 51 | %define _bindir /bin |
52 | ||
945c0ef7 | 53 | %description |
51a10b24 | 54 | 'tcsh' is an enhanced version of csh (the C shell), with additional |
55 | features such as command history, filename completion, and fancier | |
56 | prompts. | |
945c0ef7 | 57 | |
db8b7afb | 58 | %description -l de.UTF-8 |
51a10b24 | 59 | 'tcsh' ist eine erweiterte Version von csh (der C-Shell) mit |
db8b7afb JR |
60 | zusätzlichen Funktionen wie Befehlsgeschichte, |
61 | Dateinamenvervollständigung und attraktiveren Prompts. | |
945c0ef7 | 62 | |
db8b7afb JR |
63 | %description -l es.UTF-8 |
64 | "tcsh" es una versión mejorada de la csh (C shell), con | |
65 | características adicionales como historia de los comandos, complemento | |
95b50800 | 66 | de nombre de archivo y prompts. |
67 | ||
db8b7afb JR |
68 | %description -l fr.UTF-8 |
69 | 'tcsh' est une version améliorée de csh (le shell C), avec des | |
70 | fonctionnalités supplémentaires comme un historique des commandes, la | |
71 | complétion des noms de fichiers, et des prompts sympas. | |
945c0ef7 | 72 | |
db8b7afb JR |
73 | %description -l pl.UTF-8 |
74 | Tcsh jest zaawansowaną wersją powłoki csh (C-shell), z różnorodnymi | |
1133eb89 | 75 | udogodnieniami takimi jak historia komend itp. |
76 | ||
db8b7afb JR |
77 | %description -l pt_BR.UTF-8 |
78 | "tcsh" é uma versão melhorada da csh (C shell), com características | |
95b50800 | 79 | adicionais como history dos comandos, complemento de nome de arquivo e |
80 | prompts. | |
81 | ||
db8b7afb JR |
82 | %description -l ru.UTF-8 |
83 | Это улучшенная версия csh (the C shell) с дополнительными | |
84 | возможностями, такими как история комманд, дополнение имен файлов и | |
85 | т.д. | |
95b50800 | 86 | |
db8b7afb JR |
87 | %description -l tr.UTF-8 |
88 | tcsh, csh'in (C kabuğu) gelişkin bir sürümüdür ve komut tarihçesi, | |
89 | dosya adı tamamlama ve şık komut imleri gibi özellikler sunar. | |
95b50800 | 90 | |
db8b7afb JR |
91 | %description -l uk.UTF-8 |
92 | Це покращена версія csh (the C shell) з додатковими можливостями, | |
93 | такими як історія команд, завершення імен файлів і т.і. | |
945c0ef7 | 94 | |
63346b4a | 95 | %package static |
5257cfc7 | 96 | Summary: Statically linked Enhanced c-shell |
44776055 | 97 | Summary(pl.UTF-8): Skonsolidowana statycznie zaawansowana powłoka C |
6a3eb4fb | 98 | Group: Applications/Shells |
0f8067ae JB |
99 | Requires(post,preun): grep |
100 | Requires(preun): fileutils | |
5865fac9 | 101 | Requires: %{name} = %{version}-%{release} |
63346b4a JR |
102 | |
103 | %description static | |
51a10b24 | 104 | 'tcsh' is an enhanced version of csh (the C shell), with additional |
105 | features such as command history, filename completion, and fancier | |
106 | prompts. | |
63346b4a | 107 | |
b583e8db | 108 | This packege contains statically linked version of tcsh. |
63346b4a | 109 | |
db8b7afb JR |
110 | %description static -l pl.UTF-8 |
111 | Tcsh jest zaawansowaną wersją powłoki csh (C-shell), z różnorodnymi | |
63346b4a JR |
112 | udogodnieniami takimi jak historia komend itp. |
113 | ||
33f2344a | 114 | W tym pakiecie jest statycznie skonsolidowany tcsh. |
63346b4a | 115 | |
945c0ef7 | 116 | %prep |
f01f4c8f | 117 | %setup -q |
cd37c0fb JR |
118 | %patch0 -p1 |
119 | %patch1 -p1 | |
120 | %{!?with_working_history:%patch2 -p1} | |
121 | %patch3 -p1 | |
122 | %patch4 -p1 | |
123 | %patch5 -p1 | |
df91bec4 | 124 | %patch6 -p1 |
945c0ef7 | 125 | |
126 | %build | |
df91bec4 | 127 | mkdir m4 |
e3afa17b | 128 | cp /usr/share/automake/config.sub . |
ad17217d | 129 | %{__aclocal} |
a7e280ec | 130 | %{__autoconf} |
674d7ca0 | 131 | %configure |
411bfd85 | 132 | %if %{with static} |
5865fac9 JB |
133 | %{__make} \ |
134 | LDFLAGS="-static %{rpmldflags}" \ | |
e436a48a | 135 | LIBES="-lncurses -lcrypt" |
73ed54b0 | 136 | mv -f tcsh tcsh.static |
411bfd85 | 137 | %endif |
5865fac9 JB |
138 | %{__make} \ |
139 | LDFLAGS="%{rpmldflags}" \ | |
e436a48a | 140 | LIBES="-lncurses -lcrypt" |
8843be5d | 141 | |
6f178a16 | 142 | %{__make} -C nls |
945c0ef7 | 143 | |
144 | %install | |
145 | rm -rf $RPM_BUILD_ROOT | |
18e22217 JR |
146 | install -d $RPM_BUILD_ROOT/etc/skel |
147 | ||
148 | %{__make} install \ | |
149 | DESTDIR=$RPM_BUILD_ROOT | |
945c0ef7 | 150 | |
12f8b424 | 151 | # fix lang code |
952034f5 | 152 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/locale/{gr,el} |
12f8b424 JB |
153 | # it's Ukrainian in UTF-8, not Russian in KOI8-U |
154 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/locale/{ru_UA.koi8u,uk} | |
952034f5 | 155 | |
411bfd85 MP |
156 | %if %{with static} |
157 | install tcsh.static $RPM_BUILD_ROOT%{_bindir} | |
158 | %endif | |
1deb40f6 JR |
159 | |
160 | nroff -me eight-bit.me > eight-bit.txt | |
945c0ef7 | 161 | |
784da6ca | 162 | echo .so tcsh.1 > $RPM_BUILD_ROOT%{_mandir}/man1/csh.1 |
945c0ef7 | 163 | |
a3a19f15 | 164 | ln -sf tcsh $RPM_BUILD_ROOT%{_bindir}/csh |
945c0ef7 | 165 | |
71c6987d | 166 | install %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir} |
167 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/skel/.login | |
945c0ef7 | 168 | |
09fea393 JB |
169 | %clean |
170 | rm -rf $RPM_BUILD_ROOT | |
171 | ||
945c0ef7 | 172 | %post |
0f8067ae | 173 | umask 022 |
945c0ef7 | 174 | if [ ! -f /etc/shells ]; then |
a3a19f15 | 175 | echo "%{_bindir}/tcsh" > /etc/shells |
176 | echo "%{_bindir}/csh" >> /etc/shells | |
945c0ef7 | 177 | else |
62f9ba61 JB |
178 | grep -q '^%{_bindir}/tcsh$' /etc/shells || echo "%{_bindir}/tcsh" >> /etc/shells |
179 | grep -q '^%{_bindir}/csh$' /etc/shells || echo "%{_bindir}/csh" >> /etc/shells | |
945c0ef7 | 180 | fi |
181 | ||
f01f4c8f JB |
182 | %preun |
183 | umask 022 | |
184 | if [ "$1" = "0" ]; then | |
185 | grep -v '^%{_bindir}/t\?csh$' /etc/shells > /etc/shells.new | |
186 | mv -f /etc/shells.new /etc/shells | |
187 | fi | |
188 | ||
63346b4a | 189 | %post static |
0f8067ae | 190 | umask 022 |
63346b4a | 191 | if [ ! -f /etc/shells ]; then |
a3a19f15 | 192 | echo "%{_bindir}/tcsh.static" > /etc/shells |
63346b4a | 193 | else |
62f9ba61 | 194 | grep -q '^%{_bindir}/tcsh\.static$' /etc/shells || echo "%{_bindir}/tcsh.static" >> /etc/shells |
63346b4a | 195 | fi |
945c0ef7 | 196 | |
62f9ba61 | 197 | %preun static |
0f8067ae | 198 | umask 022 |
62f9ba61 JB |
199 | if [ "$1" = "0" ]; then |
200 | grep -v '^%{_bindir}/tcsh\.static$' /etc/shells > /etc/shells.new | |
201 | mv -f /etc/shells.new /etc/shells | |
63346b4a JR |
202 | fi |
203 | ||
945c0ef7 | 204 | %files |
70bd5214 | 205 | %defattr(644,root,root,755) |
24a6af52 | 206 | %doc NewThings FAQ eight-bit.txt complete.tcsh |
366b6df6 | 207 | |
15fd3d93 ER |
208 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/csh.* |
209 | %config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.login | |
1133eb89 | 210 | |
a3a19f15 | 211 | %attr(755,root,root) %{_bindir}/csh |
212 | %attr(755,root,root) %{_bindir}/tcsh | |
952034f5 | 213 | #%{_datadir}/locale/C/LC_MESSAGES/tcsh.cat |
18e22217 | 214 | %lang(de) %{_datadir}/locale/de/LC_MESSAGES/tcsh.cat |
952034f5 | 215 | %lang(el) %{_datadir}/locale/el/LC_MESSAGES/tcsh.cat |
18e22217 JR |
216 | %lang(es) %{_datadir}/locale/es/LC_MESSAGES/tcsh.cat |
217 | %lang(et) %{_datadir}/locale/et/LC_MESSAGES/tcsh.cat | |
218 | %lang(fi) %{_datadir}/locale/fi/LC_MESSAGES/tcsh.cat | |
219 | %lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/tcsh.cat | |
18e22217 JR |
220 | %lang(it) %{_datadir}/locale/it/LC_MESSAGES/tcsh.cat |
221 | %lang(ja) %{_datadir}/locale/ja/LC_MESSAGES/tcsh.cat | |
222 | %lang(pl) %{_datadir}/locale/pl/LC_MESSAGES/tcsh.cat | |
223 | %lang(ru) %{_datadir}/locale/ru/LC_MESSAGES/tcsh.cat | |
12f8b424 JB |
224 | %lang(uk) %{_datadir}/locale/uk/LC_MESSAGES/tcsh.cat |
225 | %{_mandir}/man1/csh.1* | |
226 | %{_mandir}/man1/tcsh.1* | |
945c0ef7 | 227 | |
411bfd85 | 228 | %if %{with static} |
63346b4a JR |
229 | %files static |
230 | %defattr(644,root,root,755) | |
a3a19f15 | 231 | %attr(755,root,root) %{_bindir}/tcsh.static |
411bfd85 | 232 | %endif |