]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # TODO: package http://www.zsh.org/pub/zsh-%{version}-doc.tar.xz | |
3 | # Conditional build: | |
4 | %bcond_with static # build static version | |
5 | %bcond_without tests # don't perform "make test" | |
6 | # | |
7 | Summary: Enhanced Bourne shell | |
8 | Summary(de.UTF-8): Enhanced Bourne Shell | |
9 | Summary(es.UTF-8): Shell bourne mejorada | |
10 | Summary(fr.UTF-8): Bourne shell amélioré | |
11 | Summary(hu.UTF-8): Kiterjesztett Bourne Shell | |
12 | Summary(pl.UTF-8): Ulepszona powłoka Bourne'a | |
13 | Summary(pt_BR.UTF-8): Shell bourne melhorada | |
14 | Summary(ru.UTF-8): Командный процессор (shell) похожый на ksh, но с улучшениями | |
15 | Summary(tr.UTF-8): Gelişmiş bir BASH sürümü | |
16 | Summary(uk.UTF-8): Командний процесор (shell) схожий на ksh, але з покращеннями | |
17 | Name: zsh | |
18 | Version: 5.9 | |
19 | Release: 3 | |
20 | License: BSD-like | |
21 | Group: Applications/Shells | |
22 | Source0: https://downloads.sourceforge.net/zsh/%{name}-%{version}.tar.xz | |
23 | # Source0-md5: 182e37ca3fe3fa6a44f69ad462c5c30e | |
24 | Source1: %{name}.1.pl | |
25 | Source2: https://zsh.sourceforge.io/Guide/zshguide.pdf | |
26 | # Source2-md5: 409cbf8cbabb2c6bee88aac5c8279718 | |
27 | Source3: zprofile | |
28 | Source4: %{name}rc | |
29 | Patch0: %{name}-info.patch | |
30 | Patch1: %{name}-addons.patch | |
31 | Patch2: %{name}-paths.patch | |
32 | Patch3: %{name}-nolibs.patch | |
33 | Patch4: comp-all-ssh-hosts.patch | |
34 | URL: http://www.zsh.org/ | |
35 | BuildRequires: autoconf >= 2.69 | |
36 | BuildRequires: automake | |
37 | BuildRequires: gdbm-devel | |
38 | %{?with_static:BuildRequires: glibc-static} | |
39 | BuildRequires: libcap-devel | |
40 | BuildRequires: ncurses-devel >= 5.1 | |
41 | %{?with_static:BuildRequires: ncurses-static} | |
42 | BuildRequires: pcre-devel | |
43 | BuildRequires: rpm-build >= 4.6 | |
44 | BuildRequires: rpmbuild(macros) >= 1.470 | |
45 | BuildRequires: tar >= 1:1.22 | |
46 | BuildRequires: texinfo | |
47 | BuildRequires: xz | |
48 | BuildRequires: yodl | |
49 | Requires(post,preun): grep | |
50 | Requires(preun): fileutils | |
51 | Requires: findutils | |
52 | Obsoletes: zsh-doc-dvi | |
53 | Obsoletes: zsh-doc-html | |
54 | Obsoletes: zsh-doc-ps | |
55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
56 | ||
57 | %define _bindir /bin | |
58 | %define specflags_ia32 -fomit-frame-pointer | |
59 | ||
60 | %description | |
61 | zsh is an enhanced version of the Bourne shell with csh additions and | |
62 | most features of ksh, bash, and tcsh. | |
63 | ||
64 | %description -l es.UTF-8 | |
65 | zsh es una versión mejorada del bourne shell con estas | |
66 | características: | |
67 | - muy próximo de la gramática del ksh/sh, con adiciones csh, | |
68 | - varias características del ksh, bash y tcsh, | |
69 | - 75 funciones empotradas, 89 opciones, 154 combinaciones de teclas, | |
70 | - selección, | |
71 | - funciones shell ...y mucho más. | |
72 | ||
73 | %description -l ja.UTF-8 | |
74 | zsh シェルは対話的なログインシェルとして利用可能なコマンドインタリタ | |
75 | であり、シェルスクリプトコマンドも処理できます. zsh は ksh(the Korn | |
76 | shell) に似ていますが,かなり拡張されています. zsh | |
77 | はコマンドラインでの編集機能, 組み込まれたスペル修正機能, プログラミン | |
78 | グ可能なコマンド補完機能, (動的ロードされる)シェル機能, ヒストリ機構 | |
79 | などを持ちます. | |
80 | ||
81 | %description -l hu.UTF-8 | |
82 | zsh a Bourne shell egy kiterjesztett verziója csh kiegészítésekkel és | |
83 | a ksh, bash és csh legtöbb lehetőségével felvértezve. | |
84 | ||
85 | %description -l pl.UTF-8 | |
86 | zsh jest ulepszoną powłoką Bourne'a z elementami powłoki csh. Posiada | |
87 | większość cech ksh, bash i tcsh. | |
88 | ||
89 | %description -l pt_BR.UTF-8 | |
90 | zsh é uma versão melhorada do bourne shell com essas características: | |
91 | - muito próximo da gramática do ksh/sh, com adições csh, | |
92 | - várias características do ksh, bash e tcsh, | |
93 | - 75 funções embutidas, 89 opções, 154 combinações de teclas, | |
94 | - seleção, | |
95 | - funções shell ...e muito mais. | |
96 | ||
97 | %description -l ru.UTF-8 | |
98 | zsh - это командный процессор напоминающий ksh (Korn shell), но | |
99 | включающий много улучшений. zsh поддерживает редактирование командной | |
100 | строки, встроенную коррекцию написания, программируемое завершение | |
101 | команд, shell-функции (с автозагрузкой), историю команд и многое | |
102 | другое. | |
103 | ||
104 | %description -l uk.UTF-8 | |
105 | zsh - це командний процесор, що нагадує ksh (Korn shell), але включає | |
106 | багато покращень. zsh підтримує редагування командного рядка, | |
107 | вбудовану корекцію написання, програмоване завершення команд, | |
108 | shell-функції (з автозавантаженням), історію команд та багато іншого. | |
109 | ||
110 | %package completions | |
111 | Summary: Files needed for advanced TAB-completion | |
112 | Summary(hu.UTF-8): A haladó TAB-kiegészítéshez szükséges fájlok | |
113 | Summary(pl.UTF-8): Pliki potrzebne dla zaawansowanej TAB-completion | |
114 | Group: Applications/Shells | |
115 | Requires: %{name} = %{version}-%{release} | |
116 | Conflicts: kdesdk-completions-zsh <= 3:3.2.3-2 | |
117 | BuildArch: noarch | |
118 | ||
119 | %description completions | |
120 | This package contains files needed for advanced tab completion in zsh. | |
121 | ||
122 | %description completions -l hu.UTF-8 | |
123 | Ez a csomag tartalmazza a haladó TAB-kiegészítéshez szükséges fájlokat | |
124 | a zsh shell-hez. | |
125 | ||
126 | %description completions -l pl.UTF-8 | |
127 | Ten pakiet zawiera pliki wymagane przez zsh dla zaawansowanej | |
128 | TAB-completion. | |
129 | ||
130 | %package static | |
131 | Summary: Statically linked Enhanced Bourne shell | |
132 | Summary(hu.UTF-8): A zsh statikus verziója | |
133 | Summary(pl.UTF-8): Zaawansowana powłoka Bourne'a - skonsolidowana statycznie | |
134 | Group: Applications/Shells | |
135 | Requires(post,preun): grep | |
136 | Requires(preun): fileutils | |
137 | Requires: %{name} = %{version}-%{release} | |
138 | ||
139 | %description static | |
140 | zsh is an enhanced version of the Bourne shell with csh additions and | |
141 | most features of ksh, bash, and tcsh. | |
142 | ||
143 | %description static -l hu.UTF-8 | |
144 | A zsh statikus verziója. | |
145 | ||
146 | %description static -l pl.UTF-8 | |
147 | zsh jest ulepszoną powłoką Bourne'a z elementami powłoki csh. Posiada | |
148 | większość cech ksh, bash i tcsh. W tym pakiecie jest wersja | |
149 | skonsolidowana statycznie. | |
150 | ||
151 | %package guide | |
152 | Summary: A User's Guide to the Z-Shell | |
153 | Summary(hu.UTF-8): Felhasználói útmutató a Z-Shell-hez | |
154 | Summary(pl.UTF-8): Podręcznik Użytkownika Z-Shella | |
155 | Group: Documentation | |
156 | URL: http://zsh.sunsite.dk/Guide/ | |
157 | BuildArch: noarch | |
158 | ||
159 | %description guide | |
160 | A User's Guide to the Z-Shell. | |
161 | ||
162 | %description guide -l hu.UTF-8 | |
163 | Felhasználói útmutató a Z-Shell-hez. | |
164 | ||
165 | %description guide -l pl.UTF-8 | |
166 | Podręcznik Użytkownika Z-Shella. | |
167 | ||
168 | %prep | |
169 | %setup -q | |
170 | %patch0 -p1 | |
171 | %patch1 -p1 | |
172 | %patch2 -p1 | |
173 | %patch3 -p1 | |
174 | %patch4 -p1 | |
175 | ||
176 | install %{SOURCE2} . | |
177 | ||
178 | find Functions -type f -exec %{__sed} -i -e 's|#!.*/zsh|#!/bin/zsh|g' "{}" ";" | |
179 | ||
180 | %build | |
181 | %{__autoconf} | |
182 | %{__autoheader} | |
183 | echo > stamp-h.in | |
184 | CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses" | |
185 | ||
186 | %if %{with static} | |
187 | LDFLAGS="%{rpmldflags} -static" | |
188 | %configure \ | |
189 | --enable-maildir-support \ | |
190 | --enable-multibyte \ | |
191 | --with-tcsetpgrp \ | |
192 | --disable-dynamic | |
193 | %{__make} \ | |
194 | DLLDFLAGS="" | |
195 | %{__mv} Src/zsh Src/zsh.static | |
196 | %{__make} clean || : | |
197 | LDFLAGS="%{rpmldflags}" | |
198 | %endif | |
199 | ||
200 | %configure \ | |
201 | ac_cv_have_dev_ptmx=yes \ | |
202 | --enable-maildir-support \ | |
203 | --enable-cap \ | |
204 | --enable-gdbm \ | |
205 | --enable-pcre \ | |
206 | --enable-multibyte \ | |
207 | --with-tcsetpgrp | |
208 | %{__make} | |
209 | ||
210 | cd Doc | |
211 | makeinfo zsh.texi | |
212 | cd .. | |
213 | ||
214 | %if %{with tests} | |
215 | if ! tty; then | |
216 | %{__rm} Test/{C02cond,E01options,Y01completion,Y02compmatch,Y03arguments,V08zpty,W02jobs,W03jobparameters,X02zlevi,X03zlebindkey,X04zlehighlight}.ztst | |
217 | fi | |
218 | %{__make} test | |
219 | %endif | |
220 | ||
221 | %install | |
222 | rm -rf $RPM_BUILD_ROOT | |
223 | install -d $RPM_BUILD_ROOT{%{_infodir},%{_sysconfdir},%{_bindir},%{_mandir}/pl/man1} | |
224 | ||
225 | %{__make} install \ | |
226 | DESTDIR=$RPM_BUILD_ROOT | |
227 | ||
228 | %{?with_static:install Src/zsh.static $RPM_BUILD_ROOT%{_bindir}} | |
229 | install Doc/zsh.info* $RPM_BUILD_ROOT%{_infodir} | |
230 | ||
231 | touch $RPM_BUILD_ROOT%{_sysconfdir}/{zlogin,zlogout,zshenv} | |
232 | touch $RPM_BUILD_ROOT%{_sysconfdir}/{zlogin,zlogout,zprofile,zshenv,zshrc}.zwc | |
233 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir} | |
234 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir} | |
235 | ||
236 | %{__rm} -f Etc/Makefile* | |
237 | find Functions Util StartupFiles -name .distfiles -o -name .cvsignore | xargs rm -f | |
238 | install %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/pl/man1/zsh.1 | |
239 | ||
240 | # for kdesdk's completion | |
241 | ln -sf %{version} $RPM_BUILD_ROOT%{_datadir}/zsh/latest | |
242 | ||
243 | %clean | |
244 | rm -rf $RPM_BUILD_ROOT | |
245 | ||
246 | %post | |
247 | umask 022 | |
248 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1 | |
249 | if [ ! -f /etc/shells ]; then | |
250 | echo "%{_bindir}/zsh" >> /etc/shells | |
251 | else | |
252 | grep -q '^%{_bindir}/zsh$' /etc/shells || echo "%{_bindir}/zsh" >> /etc/shells | |
253 | fi | |
254 | for i in zlogin zlogout zprofile zshenv zshrc; do | |
255 | [ -f /etc/$i ] && zsh -c "zcompile /etc/$i" | |
256 | done | |
257 | ||
258 | %preun | |
259 | if [ "$1" = "0" ]; then | |
260 | umask 022 | |
261 | grep -v '^%{_bindir}/zsh$' /etc/shells > /etc/shells.new | |
262 | mv -f /etc/shells.new /etc/shells | |
263 | fi | |
264 | ||
265 | %postun -p /sbin/postshell | |
266 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
267 | ||
268 | %post static | |
269 | umask 022 | |
270 | if [ ! -f /etc/shells ]; then | |
271 | echo "%{_bindir}/zsh.static" >> /etc/shells | |
272 | else | |
273 | grep -q '^%{_bindir}/zsh\.static$' /etc/shells || echo "%{_bindir}/zsh.static" >> /etc/shells | |
274 | fi | |
275 | ||
276 | %preun static | |
277 | if [ "$1" = "0" ]; then | |
278 | umask 022 | |
279 | grep -v '^%{_bindir}/zsh\.static$' /etc/shells > /etc/shells.new | |
280 | mv -f /etc/shells.new /etc/shells | |
281 | fi | |
282 | ||
283 | %files | |
284 | %defattr(644,root,root,755) | |
285 | %doc Etc/* ChangeLog FEATURES LICENCE META-FAQ README Misc StartupFiles Util | |
286 | %attr(755,root,root) %{_bindir}/zsh | |
287 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zlogin | |
288 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zlogout | |
289 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zprofile | |
290 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zshenv | |
291 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zshrc | |
292 | %ghost %{_sysconfdir}/z*.zwc | |
293 | %dir %{_datadir}/zsh/%{version}* | |
294 | %dir %{_datadir}/zsh/%{version}*/functions | |
295 | %{_datadir}/zsh/%{version}*/functions/[!_c]* | |
296 | %{_datadir}/zsh/%{version}*/functions/c[!o]* | |
297 | %{_datadir}/zsh/%{version}*/functions/co[!m]* | |
298 | %{_datadir}/zsh/%{version}*/help | |
299 | %{_datadir}/zsh/%{version}*/scripts | |
300 | %{_datadir}/zsh/latest | |
301 | %dir %{_libdir}/zsh | |
302 | %dir %{_libdir}/zsh/%{version}* | |
303 | %attr(755,root,root) %{_libdir}/zsh/%{version}*/* | |
304 | %{_infodir}/zsh.info* | |
305 | %{_mandir}/man1/zsh*.1* | |
306 | %lang(pl) %{_mandir}/pl/man1/zsh*.1* | |
307 | ||
308 | %files completions | |
309 | %defattr(644,root,root,755) | |
310 | %{_datadir}/zsh/%{version}*/functions/comp* | |
311 | %{_datadir}/zsh/%{version}*/functions/_* | |
312 | ||
313 | %files guide | |
314 | %defattr(644,root,root,755) | |
315 | %doc zshguide.pdf | |
316 | ||
317 | %if %{with static} | |
318 | %files static | |
319 | %defattr(644,root,root,755) | |
320 | %attr(755,root,root) %{_bindir}/zsh.static | |
321 | %endif |