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