]> git.pld-linux.org Git - packages/tcsh.git/blob - tcsh.spec
87d573dc2263496c04343d301f33575343427776
[packages/tcsh.git] / tcsh.spec
1 #
2 # Conditional build:
3 %bcond_with     working_history # compiles tcsh with timestamps in
4                                 # ~/.history file so it serves any real purpose (which
5                                 # is not the case for default PLD tcsh)
6 %bcond_with     static          # don't build static version
7 #
8 Summary:        Enhanced c-shell
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
18 Name:           tcsh
19 Version:        6.20.00
20 Release:        1
21 License:        distributable
22 Group:          Applications/Shells
23 Source0:        ftp://ftp.astron.com/pub/tcsh/%{name}-%{version}.tar.gz
24 # Source0-md5:  59d40ef40a68e790d95e182069431834
25 Source1:        csh.cshrc
26 Source2:        csh.login
27 Source3:        %{name}-skel-.login
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
34 Patch6:         %{name}-format-security.patch
35 URL:            http://www.tcsh.org/Home
36 BuildRequires:  autoconf >= 2.59
37 BuildRequires:  automake
38 BuildRequires:  groff
39 # for gencat
40 BuildRequires:  iconv
41 BuildRequires:  ncurses-devel >= 5.0
42 %if %{with static}
43 BuildRequires:  glibc-static
44 BuildRequires:  ncurses-static
45 %endif
46 Requires(post,preun):   grep
47 Requires(preun):        fileutils
48 Provides:       csh
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %define         _bindir         /bin
52
53 %description
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.
57
58 %description -l de.UTF-8
59 'tcsh' ist eine erweiterte Version von csh (der C-Shell) mit
60 zusätzlichen Funktionen wie Befehlsgeschichte,
61 Dateinamenvervollständigung und attraktiveren Prompts.
62
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
66 de nombre de archivo y prompts.
67
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.
72
73 %description -l pl.UTF-8
74 Tcsh jest zaawansowaną wersją powłoki csh (C-shell), z różnorodnymi
75 udogodnieniami takimi jak historia komend itp.
76
77 %description -l pt_BR.UTF-8
78 "tcsh" é uma versão melhorada da csh (C shell), com características
79 adicionais como history dos comandos, complemento de nome de arquivo e
80 prompts.
81
82 %description -l ru.UTF-8
83 Это улучшенная версия csh (the C shell) с дополнительными
84 возможностями, такими как история комманд, дополнение имен файлов и
85 т.д.
86
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.
90
91 %description -l uk.UTF-8
92 Це покращена версія csh (the C shell) з додатковими можливостями,
93 такими як історія команд, завершення імен файлів і т.і.
94
95 %package static
96 Summary:        Statically linked Enhanced c-shell
97 Summary(pl.UTF-8):      Skonsolidowana statycznie zaawansowana powłoka C
98 Group:          Applications/Shells
99 Requires(post,preun):   grep
100 Requires(preun):        fileutils
101 Requires:       %{name} = %{version}-%{release}
102
103 %description static
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.
107
108 This packege contains statically linked version of tcsh.
109
110 %description static -l pl.UTF-8
111 Tcsh jest zaawansowaną wersją powłoki csh (C-shell), z różnorodnymi
112 udogodnieniami takimi jak historia komend itp.
113
114 W tym pakiecie jest statycznie skonsolidowany tcsh.
115
116 %prep
117 %setup -q
118 %patch0 -p1
119 %patch1 -p1
120 %{!?with_working_history:%patch2 -p1}
121 %patch3 -p1
122 %patch4 -p1
123 %patch5 -p1
124 %patch6 -p1
125
126 %build
127 cp /usr/share/automake/config.sub .
128 %{__aclocal}
129 %{__autoconf}
130 %configure
131 %if %{with static}
132 %{__make} \
133         LDFLAGS="-static %{rpmldflags}" \
134         LIBES="-lncurses -lcrypt"
135 mv -f tcsh tcsh.static
136 %endif
137 %{__make} \
138         LDFLAGS="%{rpmldflags}" \
139         LIBES="-lncurses -lcrypt"
140
141 %{__make} -C nls
142
143 %install
144 rm -rf $RPM_BUILD_ROOT
145 install -d $RPM_BUILD_ROOT/etc/skel 
146
147 %{__make} install \
148         DESTDIR=$RPM_BUILD_ROOT
149
150 # fix lang code
151 %{__mv} $RPM_BUILD_ROOT%{_datadir}/locale/{gr,el}
152 # it's Ukrainian in UTF-8, not Russian in KOI8-U
153 %{__mv} $RPM_BUILD_ROOT%{_datadir}/locale/{ru_UA,uk}
154
155 %if %{with static}
156 install tcsh.static $RPM_BUILD_ROOT%{_bindir}
157 %endif
158
159 nroff -me eight-bit.me > eight-bit.txt
160
161 echo .so tcsh.1 > $RPM_BUILD_ROOT%{_mandir}/man1/csh.1
162
163 ln -sf tcsh $RPM_BUILD_ROOT%{_bindir}/csh
164
165 install %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}
166 install %{SOURCE3} $RPM_BUILD_ROOT/etc/skel/.login
167
168 %clean
169 rm -rf $RPM_BUILD_ROOT
170
171 %post
172 umask 022
173 if [ ! -f /etc/shells ]; then
174         echo "%{_bindir}/tcsh" > /etc/shells
175         echo "%{_bindir}/csh" >> /etc/shells
176 else
177         grep -q '^%{_bindir}/tcsh$' /etc/shells || echo "%{_bindir}/tcsh" >> /etc/shells
178         grep -q '^%{_bindir}/csh$' /etc/shells || echo "%{_bindir}/csh" >> /etc/shells
179 fi
180
181 %preun
182 umask 022
183 if [ "$1" = "0" ]; then
184         grep -v '^%{_bindir}/t\?csh$' /etc/shells > /etc/shells.new
185         mv -f /etc/shells.new /etc/shells
186 fi
187
188 %post static
189 umask 022
190 if [ ! -f /etc/shells ]; then
191         echo "%{_bindir}/tcsh.static" > /etc/shells
192 else
193         grep -q '^%{_bindir}/tcsh\.static$' /etc/shells || echo "%{_bindir}/tcsh.static" >> /etc/shells
194 fi
195
196 %preun static
197 umask 022
198 if [ "$1" = "0" ]; then
199         grep -v '^%{_bindir}/tcsh\.static$' /etc/shells > /etc/shells.new
200         mv -f /etc/shells.new /etc/shells
201 fi
202
203 %files
204 %defattr(644,root,root,755)
205 %doc NewThings FAQ eight-bit.txt complete.tcsh
206
207 %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/csh.*
208 %config(noreplace,missingok) %verify(not md5 mtime size) /etc/skel/.login
209
210 %attr(755,root,root) %{_bindir}/csh
211 %attr(755,root,root) %{_bindir}/tcsh
212 #%{_datadir}/locale/C/LC_MESSAGES/tcsh.cat
213 %lang(de) %{_datadir}/locale/de/LC_MESSAGES/tcsh.cat
214 %lang(el) %{_datadir}/locale/el/LC_MESSAGES/tcsh.cat
215 %lang(es) %{_datadir}/locale/es/LC_MESSAGES/tcsh.cat
216 %lang(et) %{_datadir}/locale/et/LC_MESSAGES/tcsh.cat
217 %lang(fi) %{_datadir}/locale/fi/LC_MESSAGES/tcsh.cat
218 %lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/tcsh.cat
219 %lang(it) %{_datadir}/locale/it/LC_MESSAGES/tcsh.cat
220 %lang(ja) %{_datadir}/locale/ja/LC_MESSAGES/tcsh.cat
221 %lang(pl) %{_datadir}/locale/pl/LC_MESSAGES/tcsh.cat
222 %lang(ru) %{_datadir}/locale/ru/LC_MESSAGES/tcsh.cat
223 %lang(uk) %{_datadir}/locale/uk/LC_MESSAGES/tcsh.cat
224 %{_mandir}/man1/csh.1*
225 %{_mandir}/man1/tcsh.1*
226
227 %if %{with static}
228 %files static
229 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_bindir}/tcsh.static
231 %endif
This page took 0.080984 seconds and 2 git commands to generate.