]>
Commit | Line | Data |
---|---|---|
7bbfdb65 | 1 | # |
36ebb9be | 2 | # TODO: package http://www.zsh.org/pub/zsh-%{version}-doc.tar.xz |
7088e905 | 3 | # Conditional build: |
7bbfdb65 | 4 | %bcond_with static # build static version |
e5e40e2e | 5 | %bcond_without tests # don't perform "make test" |
7088e905 | 6 | # |
a4d50a64 | 7 | Summary: Enhanced Bourne shell |
bf98a40a ER |
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é | |
b7786c06 | 11 | Summary(hu.UTF-8): Kiterjesztett Bourne Shell |
bf98a40a ER |
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, але з покращеннями | |
83278afd | 17 | Name: zsh |
e972d602 | 18 | Version: 5.8.1 |
bc1f6df3 | 19 | Release: 1 |
2d083759 | 20 | License: BSD-like |
651a9c1a | 21 | Group: Applications/Shells |
36ebb9be | 22 | Source0: http://downloads.sourceforge.net/zsh/%{name}-%{version}.tar.xz |
e972d602 | 23 | # Source0-md5: 063a98c256ee0584b3c115924e41a332 |
1a356495 | 24 | Source1: %{name}.1.pl |
5866c474 | 25 | Source2: http://zsh.sunsite.dk/Guide/%{name}guide.pdf |
6afe72d1 | 26 | # Source2-md5: 70cc3760dd8140f9aed693d484cd87dc |
e8d1aafb | 27 | Source3: zprofile |
5866c474 | 28 | Source4: %{name}rc |
dab1d121 | 29 | Patch0: %{name}-info.patch |
eace1f82 | 30 | Patch1: %{name}-addons.patch |
31 | Patch2: %{name}-paths.patch | |
7ca723e2 | 32 | Patch4: %{name}-nolibs.patch |
c9a36266 | 33 | URL: http://www.zsh.org/ |
dab1d121 | 34 | BuildRequires: autoconf >= 2.69 |
48b96dd9 | 35 | BuildRequires: automake |
7bbfdb65 | 36 | BuildRequires: gdbm-devel |
cfd57568 | 37 | %{?with_static:BuildRequires: glibc-static} |
6c76e97a | 38 | BuildRequires: libcap-devel |
b076b3fc | 39 | BuildRequires: ncurses-devel >= 5.1 |
cfd57568 | 40 | %{?with_static:BuildRequires: ncurses-static} |
6c76e97a | 41 | BuildRequires: pcre-devel |
2a00a59c | 42 | BuildRequires: rpmbuild(macros) >= 1.470 |
12734cd9 | 43 | BuildRequires: tar >= 1:1.22 |
b076b3fc | 44 | BuildRequires: texinfo |
12734cd9 | 45 | BuildRequires: xz |
48b96dd9 | 46 | BuildRequires: yodl |
3fa5f78f | 47 | Requires(post,preun): grep |
b076b3fc | 48 | Requires(preun): fileutils |
9046f083 | 49 | Requires: findutils |
de0cb3a3 | 50 | Obsoletes: zsh-doc-dvi |
5866c474 ER |
51 | Obsoletes: zsh-doc-html |
52 | Obsoletes: zsh-doc-ps | |
a6765b50 | 53 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
83278afd | 54 | |
587f5454 | 55 | %define _bindir /bin |
de0cb3a3 | 56 | %define specflags_ia32 -fomit-frame-pointer |
83278afd | 57 | |
58 | %description | |
c1897f93 | 59 | zsh is an enhanced version of the Bourne shell with csh additions and |
60 | most features of ksh, bash, and tcsh. | |
83278afd | 61 | |
b00e8d51 JR |
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, | |
cbb441dc | 67 | - 75 funciones empotradas, 89 opciones, 154 combinaciones de teclas, |
b00e8d51 JR |
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 | ||
51633cb1 | 79 | %description -l hu.UTF-8 |
b7786c06 ZU |
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 | ||
b00e8d51 JR |
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-функції (з автозавантаженням), історію команд та багато іншого. | |
d2f588c7 | 107 | |
b015e9ee | 108 | %package completions |
cbb441dc | 109 | Summary: Files needed for advanced TAB-completion |
b7786c06 | 110 | Summary(hu.UTF-8): A haladó TAB-kiegészítéshez szükséges fájlok |
bf98a40a | 111 | Summary(pl.UTF-8): Pliki potrzebne dla zaawansowanej TAB-completion |
cbb441dc | 112 | Group: Applications/Shells |
7ca723e2 | 113 | Requires: %{name} = %{version}-%{release} |
de0cb3a3 | 114 | Conflicts: kdesdk-completions-zsh <= 3:3.2.3-2 |
597c3874 | 115 | BuildArch: noarch |
b015e9ee | 116 | |
117 | %description completions | |
118 | This package contains files needed for advanced tab completion in zsh. | |
119 | ||
b7786c06 ZU |
120 | %description completions -l hu.UTF-8 |
121 | Ez a csomag tartalmazza a haladó TAB-kiegészítéshez szükséges fájlokat | |
122 | a zsh shell-hez. | |
123 | ||
b00e8d51 | 124 | %description completions -l pl.UTF-8 |
b015e9ee | 125 | Ten pakiet zawiera pliki wymagane przez zsh dla zaawansowanej |
126 | TAB-completion. | |
127 | ||
7088e905 | 128 | %package static |
a4d50a64 | 129 | Summary: Statically linked Enhanced Bourne shell |
b7786c06 | 130 | Summary(hu.UTF-8): A zsh statikus verziója |
bf98a40a | 131 | Summary(pl.UTF-8): Zaawansowana powłoka Bourne'a - skonsolidowana statycznie |
cbb441dc | 132 | Group: Applications/Shells |
3fa5f78f | 133 | Requires(post,preun): grep |
b076b3fc | 134 | Requires(preun): fileutils |
7ca723e2 | 135 | Requires: %{name} = %{version}-%{release} |
7088e905 | 136 | |
137 | %description static | |
138 | zsh is an enhanced version of the Bourne shell with csh additions and | |
139 | most features of ksh, bash, and tcsh. | |
140 | ||
b7786c06 ZU |
141 | %description static -l hu.UTF-8 |
142 | A zsh statikus verziója. | |
143 | ||
b00e8d51 JR |
144 | %description static -l pl.UTF-8 |
145 | zsh jest ulepszoną powłoką Bourne'a z elementami powłoki csh. Posiada | |
146 | większość cech ksh, bash i tcsh. W tym pakiecie jest wersja | |
a4d50a64 | 147 | skonsolidowana statycznie. |
7088e905 | 148 | |
4f664908 | 149 | %package guide |
150 | Summary: A User's Guide to the Z-Shell | |
b7786c06 | 151 | Summary(hu.UTF-8): Felhasználói útmutató a Z-Shell-hez |
bf98a40a | 152 | Summary(pl.UTF-8): Podręcznik Użytkownika Z-Shella |
51052d96 | 153 | Group: Documentation |
4f664908 | 154 | URL: http://zsh.sunsite.dk/Guide/ |
597c3874 | 155 | BuildArch: noarch |
4f664908 | 156 | |
157 | %description guide | |
158 | A User's Guide to the Z-Shell. | |
159 | ||
b7786c06 ZU |
160 | %description guide -l hu.UTF-8 |
161 | Felhasználói útmutató a Z-Shell-hez. | |
162 | ||
b00e8d51 JR |
163 | %description guide -l pl.UTF-8 |
164 | Podręcznik Użytkownika Z-Shella. | |
4f664908 | 165 | |
83278afd | 166 | %prep |
95b4ac0b | 167 | %setup -q |
dab1d121 | 168 | %patch0 -p1 |
cc534ac5 | 169 | %patch1 -p1 |
e317d501 | 170 | %patch2 -p1 |
7ca723e2 | 171 | %patch4 -p1 |
83278afd | 172 | |
4f664908 | 173 | install %{SOURCE2} . |
174 | ||
ad7f7390 | 175 | find Functions -type f -exec %{__sed} -i -e 's|#!.*/zsh|#!/bin/zsh|g' "{}" ";" |
42093e13 | 176 | |
83278afd | 177 | %build |
226d6ebd | 178 | cp -f /usr/share/automake/config.sub . |
c83d9cb8 | 179 | %{__autoconf} |
48b96dd9 AM |
180 | %{__autoheader} |
181 | echo > stamp-h.in | |
c9a36266 | 182 | CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses" |
cc534ac5 | 183 | |
cfd57568 | 184 | %if %{with static} |
7088e905 | 185 | LDFLAGS="%{rpmldflags} -static" |
424f1ac6 | 186 | %configure \ |
48b96dd9 AM |
187 | --enable-maildir-support \ |
188 | --enable-multibyte \ | |
189 | --with-tcsetpgrp \ | |
424f1ac6 AM |
190 | --disable-dynamic |
191 | %{__make} \ | |
192 | DLLDFLAGS="" | |
12734cd9 | 193 | %{__mv} Src/zsh Src/zsh.static |
424f1ac6 | 194 | %{__make} clean || : |
7088e905 | 195 | LDFLAGS="%{rpmldflags}" |
196 | %endif | |
197 | ||
3790abdd | 198 | %configure \ |
17f690bb | 199 | ac_cv_have_dev_ptmx=yes \ |
fec100a6 | 200 | --enable-maildir-support \ |
48b96dd9 | 201 | --enable-cap \ |
fec100a6 | 202 | --enable-pcre \ |
48b96dd9 | 203 | --enable-multibyte \ |
48b96dd9 | 204 | --with-tcsetpgrp |
ecc52887 | 205 | %{__make} |
83278afd | 206 | |
b076b3fc JB |
207 | cd Doc |
208 | makeinfo zsh.texi | |
9c4b843a AM |
209 | cd .. |
210 | ||
eb0ecde0 AM |
211 | %if %{with tests} |
212 | if ! tty; then | |
dcecff60 | 213 | %{__rm} Test/{C02cond,Y01completion,Y02compmatch,Y03arguments,V08zpty,W02jobs,X02zlevi,X03zlebindkey,X04zlehighlight}.ztst |
eb0ecde0 AM |
214 | fi |
215 | %{__make} test | |
216 | %endif | |
3790abdd | 217 | |
83278afd | 218 | %install |
219 | rm -rf $RPM_BUILD_ROOT | |
1a356495 | 220 | install -d $RPM_BUILD_ROOT{%{_infodir},%{_sysconfdir},%{_bindir},%{_mandir}/pl/man1} |
3790abdd | 221 | |
1256c9e6 JB |
222 | %{__make} install \ |
223 | DESTDIR=$RPM_BUILD_ROOT | |
cc534ac5 | 224 | |
cfd57568 | 225 | %{?with_static:install Src/zsh.static $RPM_BUILD_ROOT%{_bindir}} |
e8d1aafb TP |
226 | install Doc/zsh.info* $RPM_BUILD_ROOT%{_infodir} |
227 | ||
51b8d4e0 | 228 | touch $RPM_BUILD_ROOT%{_sysconfdir}/{zlogin,zlogout,zshenv} |
9fc47db4 | 229 | touch $RPM_BUILD_ROOT%{_sysconfdir}/{zlogin,zlogout,zprofile,zshenv,zshrc}.zwc |
e8d1aafb TP |
230 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir} |
231 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir} | |
45772ef5 | 232 | |
51633cb1 | 233 | %{__rm} -f Etc/Makefile* |
45772ef5 | 234 | find Functions Util StartupFiles -name .distfiles -o -name .cvsignore | xargs rm -f |
1a356495 | 235 | install %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/pl/man1/zsh.1 |
236 | ||
c13dab96 JB |
237 | # for kdesdk's completion |
238 | ln -sf %{version} $RPM_BUILD_ROOT%{_datadir}/zsh/latest | |
239 | ||
240 | %clean | |
241 | rm -rf $RPM_BUILD_ROOT | |
242 | ||
83278afd | 243 | %post |
b076b3fc | 244 | umask 022 |
9b9ba60d | 245 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1 |
83278afd | 246 | if [ ! -f /etc/shells ]; then |
062f7fe9 | 247 | echo "%{_bindir}/zsh" >> /etc/shells |
83278afd | 248 | else |
062f7fe9 | 249 | grep -q '^%{_bindir}/zsh$' /etc/shells || echo "%{_bindir}/zsh" >> /etc/shells |
83278afd | 250 | fi |
51b8d4e0 TP |
251 | for i in zlogin zlogout zprofile zshenv zshrc; do |
252 | [ -f /etc/$i ] && zsh -c "zcompile /etc/$i" | |
253 | done | |
8ef9a897 | 254 | |
6229d098 | 255 | %preun |
cc534ac5 | 256 | if [ "$1" = "0" ]; then |
b076b3fc | 257 | umask 022 |
062f7fe9 | 258 | grep -v '^%{_bindir}/zsh$' /etc/shells > /etc/shells.new |
651a9c1a | 259 | mv -f /etc/shells.new /etc/shells |
83278afd | 260 | fi |
062f7fe9 | 261 | |
9b9ba60d ER |
262 | %postun -p /sbin/postshell |
263 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
e317d501 | 264 | |
7088e905 | 265 | %post static |
b076b3fc | 266 | umask 022 |
7088e905 | 267 | if [ ! -f /etc/shells ]; then |
3fa5f78f | 268 | echo "%{_bindir}/zsh.static" >> /etc/shells |
7088e905 | 269 | else |
3fa5f78f | 270 | grep -q '^%{_bindir}/zsh\.static$' /etc/shells || echo "%{_bindir}/zsh.static" >> /etc/shells |
7088e905 | 271 | fi |
272 | ||
273 | %preun static | |
274 | if [ "$1" = "0" ]; then | |
b076b3fc | 275 | umask 022 |
3fa5f78f TP |
276 | grep -v '^%{_bindir}/zsh\.static$' /etc/shells > /etc/shells.new |
277 | mv -f /etc/shells.new /etc/shells | |
7088e905 | 278 | fi |
279 | ||
83278afd | 280 | %files |
281 | %defattr(644,root,root,755) | |
51633cb1 | 282 | %doc Etc/* ChangeLog FEATURES LICENCE META-FAQ README Misc StartupFiles Util |
0ef667b6 | 283 | %attr(755,root,root) %{_bindir}/zsh |
dab1d121 JB |
284 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zlogin |
285 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zlogout | |
286 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zprofile | |
287 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zshenv | |
288 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/zshrc | |
51633cb1 | 289 | %ghost %{_sysconfdir}/z*.zwc |
48b96dd9 | 290 | %dir %{_datadir}/zsh/%{version}* |
48b96dd9 AM |
291 | %dir %{_datadir}/zsh/%{version}*/functions |
292 | %{_datadir}/zsh/%{version}*/functions/[!_c]* | |
293 | %{_datadir}/zsh/%{version}*/functions/c[!o]* | |
294 | %{_datadir}/zsh/%{version}*/functions/co[!m]* | |
51633cb1 TP |
295 | %{_datadir}/zsh/%{version}*/help |
296 | %{_datadir}/zsh/%{version}*/scripts | |
297 | %{_datadir}/zsh/latest | |
51633cb1 TP |
298 | %dir %{_libdir}/zsh |
299 | %dir %{_libdir}/zsh/%{version}* | |
48b96dd9 | 300 | %attr(755,root,root) %{_libdir}/zsh/%{version}*/* |
4a8cc3b6 | 301 | %{_infodir}/zsh.info* |
302 | %{_mandir}/man1/zsh*.1* | |
1a356495 | 303 | %lang(pl) %{_mandir}/pl/man1/zsh*.1* |
b015e9ee | 304 | |
305 | %files completions | |
306 | %defattr(644,root,root,755) | |
48b96dd9 AM |
307 | %{_datadir}/zsh/%{version}*/functions/comp* |
308 | %{_datadir}/zsh/%{version}*/functions/_* | |
7088e905 | 309 | |
4f664908 | 310 | %files guide |
311 | %defattr(644,root,root,755) | |
312 | %doc zshguide.pdf | |
313 | ||
cfd57568 | 314 | %if %{with static} |
7088e905 | 315 | %files static |
cbb441dc | 316 | %defattr(644,root,root,755) |
7088e905 | 317 | %attr(755,root,root) %{_bindir}/zsh.static |
318 | %endif |