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