]>
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 |
15534fdf | 18 | Version: 5.7 |
dcecff60 | 19 | Release: 2 |
2d083759 | 20 | License: BSD-like |
651a9c1a | 21 | Group: Applications/Shells |
36ebb9be | 22 | Source0: http://downloads.sourceforge.net/zsh/%{name}-%{version}.tar.xz |
15534fdf | 23 | # Source0-md5: 4f855abd9be566bcb204e407cf571d09 |
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 |
eace1f82 | 29 | Patch1: %{name}-addons.patch |
30 | Patch2: %{name}-paths.patch | |
31 | Patch3: %{name}-completions.patch | |
7ca723e2 | 32 | Patch4: %{name}-nolibs.patch |
c9a36266 | 33 | URL: http://www.zsh.org/ |
7bbfdb65 | 34 | BuildRequires: autoconf >= 2.60 |
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 |
b015e9ee | 115 | |
116 | %description completions | |
117 | This package contains files needed for advanced tab completion in zsh. | |
118 | ||
b7786c06 ZU |
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 | ||
b00e8d51 | 123 | %description completions -l pl.UTF-8 |
b015e9ee | 124 | Ten pakiet zawiera pliki wymagane przez zsh dla zaawansowanej |
125 | TAB-completion. | |
126 | ||
7088e905 | 127 | %package static |
a4d50a64 | 128 | Summary: Statically linked Enhanced Bourne shell |
b7786c06 | 129 | Summary(hu.UTF-8): A zsh statikus verziója |
bf98a40a | 130 | Summary(pl.UTF-8): Zaawansowana powłoka Bourne'a - skonsolidowana statycznie |
cbb441dc | 131 | Group: Applications/Shells |
3fa5f78f | 132 | Requires(post,preun): grep |
b076b3fc | 133 | Requires(preun): fileutils |
7ca723e2 | 134 | Requires: %{name} = %{version}-%{release} |
7088e905 | 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 | ||
b7786c06 ZU |
140 | %description static -l hu.UTF-8 |
141 | A zsh statikus verziója. | |
142 | ||
b00e8d51 JR |
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 | |
a4d50a64 | 146 | skonsolidowana statycznie. |
7088e905 | 147 | |
4f664908 | 148 | %package guide |
149 | Summary: A User's Guide to the Z-Shell | |
b7786c06 | 150 | Summary(hu.UTF-8): Felhasználói útmutató a Z-Shell-hez |
bf98a40a | 151 | Summary(pl.UTF-8): Podręcznik Użytkownika Z-Shella |
51052d96 | 152 | Group: Documentation |
4f664908 | 153 | URL: http://zsh.sunsite.dk/Guide/ |
154 | ||
155 | %description guide | |
156 | A User's Guide to the Z-Shell. | |
157 | ||
b7786c06 ZU |
158 | %description guide -l hu.UTF-8 |
159 | Felhasználói útmutató a Z-Shell-hez. | |
160 | ||
b00e8d51 JR |
161 | %description guide -l pl.UTF-8 |
162 | Podręcznik Użytkownika Z-Shella. | |
4f664908 | 163 | |
83278afd | 164 | %prep |
95b4ac0b | 165 | %setup -q |
cc534ac5 | 166 | %patch1 -p1 |
e317d501 | 167 | %patch2 -p1 |
168 | %patch3 -p1 | |
7ca723e2 | 169 | %patch4 -p1 |
83278afd | 170 | |
4f664908 | 171 | install %{SOURCE2} . |
172 | ||
ad7f7390 | 173 | find Functions -type f -exec %{__sed} -i -e 's|#!.*/zsh|#!/bin/zsh|g' "{}" ";" |
42093e13 | 174 | |
83278afd | 175 | %build |
226d6ebd | 176 | cp -f /usr/share/automake/config.sub . |
c83d9cb8 | 177 | %{__autoconf} |
48b96dd9 AM |
178 | %{__autoheader} |
179 | echo > stamp-h.in | |
c9a36266 | 180 | CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses" |
cc534ac5 | 181 | |
cfd57568 | 182 | %if %{with static} |
7088e905 | 183 | LDFLAGS="%{rpmldflags} -static" |
424f1ac6 | 184 | %configure \ |
48b96dd9 AM |
185 | --enable-maildir-support \ |
186 | --enable-multibyte \ | |
187 | --with-tcsetpgrp \ | |
424f1ac6 AM |
188 | --disable-dynamic |
189 | %{__make} \ | |
190 | DLLDFLAGS="" | |
12734cd9 | 191 | %{__mv} Src/zsh Src/zsh.static |
424f1ac6 | 192 | %{__make} clean || : |
7088e905 | 193 | LDFLAGS="%{rpmldflags}" |
194 | %endif | |
195 | ||
3790abdd | 196 | %configure \ |
17f690bb | 197 | ac_cv_have_dev_ptmx=yes \ |
fec100a6 | 198 | --enable-maildir-support \ |
48b96dd9 | 199 | --enable-cap \ |
fec100a6 | 200 | --enable-pcre \ |
48b96dd9 | 201 | --enable-multibyte \ |
48b96dd9 | 202 | --with-tcsetpgrp |
ecc52887 | 203 | %{__make} |
83278afd | 204 | |
b076b3fc JB |
205 | cd Doc |
206 | makeinfo zsh.texi | |
9c4b843a AM |
207 | cd .. |
208 | ||
eb0ecde0 AM |
209 | %if %{with tests} |
210 | if ! tty; then | |
dcecff60 | 211 | %{__rm} Test/{C02cond,Y01completion,Y02compmatch,Y03arguments,V08zpty,W02jobs,X02zlevi,X03zlebindkey,X04zlehighlight}.ztst |
eb0ecde0 AM |
212 | fi |
213 | %{__make} test | |
214 | %endif | |
3790abdd | 215 | |
83278afd | 216 | %install |
217 | rm -rf $RPM_BUILD_ROOT | |
1a356495 | 218 | install -d $RPM_BUILD_ROOT{%{_infodir},%{_sysconfdir},%{_bindir},%{_mandir}/pl/man1} |
3790abdd | 219 | |
1256c9e6 JB |
220 | %{__make} install \ |
221 | DESTDIR=$RPM_BUILD_ROOT | |
cc534ac5 | 222 | |
cfd57568 | 223 | %{?with_static:install Src/zsh.static $RPM_BUILD_ROOT%{_bindir}} |
e8d1aafb TP |
224 | install Doc/zsh.info* $RPM_BUILD_ROOT%{_infodir} |
225 | ||
51b8d4e0 | 226 | touch $RPM_BUILD_ROOT%{_sysconfdir}/{zlogin,zlogout,zshenv} |
9fc47db4 | 227 | touch $RPM_BUILD_ROOT%{_sysconfdir}/{zlogin,zlogout,zprofile,zshenv,zshrc}.zwc |
e8d1aafb TP |
228 | install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir} |
229 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir} | |
45772ef5 | 230 | |
51633cb1 | 231 | %{__rm} -f Etc/Makefile* |
45772ef5 | 232 | find Functions Util StartupFiles -name .distfiles -o -name .cvsignore | xargs rm -f |
1a356495 | 233 | install %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/pl/man1/zsh.1 |
234 | ||
c13dab96 JB |
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 | ||
83278afd | 241 | %post |
b076b3fc | 242 | umask 022 |
9b9ba60d | 243 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1 |
83278afd | 244 | if [ ! -f /etc/shells ]; then |
062f7fe9 | 245 | echo "%{_bindir}/zsh" >> /etc/shells |
83278afd | 246 | else |
062f7fe9 | 247 | grep -q '^%{_bindir}/zsh$' /etc/shells || echo "%{_bindir}/zsh" >> /etc/shells |
83278afd | 248 | fi |
51b8d4e0 TP |
249 | for i in zlogin zlogout zprofile zshenv zshrc; do |
250 | [ -f /etc/$i ] && zsh -c "zcompile /etc/$i" | |
251 | done | |
8ef9a897 | 252 | |
6229d098 | 253 | %preun |
cc534ac5 | 254 | if [ "$1" = "0" ]; then |
b076b3fc | 255 | umask 022 |
062f7fe9 | 256 | grep -v '^%{_bindir}/zsh$' /etc/shells > /etc/shells.new |
651a9c1a | 257 | mv -f /etc/shells.new /etc/shells |
83278afd | 258 | fi |
062f7fe9 | 259 | |
9b9ba60d ER |
260 | %postun -p /sbin/postshell |
261 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
e317d501 | 262 | |
7088e905 | 263 | %post static |
b076b3fc | 264 | umask 022 |
7088e905 | 265 | if [ ! -f /etc/shells ]; then |
3fa5f78f | 266 | echo "%{_bindir}/zsh.static" >> /etc/shells |
7088e905 | 267 | else |
3fa5f78f | 268 | grep -q '^%{_bindir}/zsh\.static$' /etc/shells || echo "%{_bindir}/zsh.static" >> /etc/shells |
7088e905 | 269 | fi |
270 | ||
271 | %preun static | |
272 | if [ "$1" = "0" ]; then | |
b076b3fc | 273 | umask 022 |
3fa5f78f TP |
274 | grep -v '^%{_bindir}/zsh\.static$' /etc/shells > /etc/shells.new |
275 | mv -f /etc/shells.new /etc/shells | |
7088e905 | 276 | fi |
277 | ||
83278afd | 278 | %files |
279 | %defattr(644,root,root,755) | |
51633cb1 | 280 | %doc Etc/* ChangeLog FEATURES LICENCE META-FAQ README Misc StartupFiles Util |
0ef667b6 | 281 | %attr(755,root,root) %{_bindir}/zsh |
e23746f9 | 282 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/*[!w]? |
51633cb1 | 283 | %ghost %{_sysconfdir}/z*.zwc |
48b96dd9 | 284 | %dir %{_datadir}/zsh/%{version}* |
48b96dd9 AM |
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]* | |
51633cb1 TP |
289 | %{_datadir}/zsh/%{version}*/help |
290 | %{_datadir}/zsh/%{version}*/scripts | |
291 | %{_datadir}/zsh/latest | |
51633cb1 TP |
292 | %dir %{_libdir}/zsh |
293 | %dir %{_libdir}/zsh/%{version}* | |
48b96dd9 | 294 | %attr(755,root,root) %{_libdir}/zsh/%{version}*/* |
4a8cc3b6 | 295 | %{_infodir}/zsh.info* |
296 | %{_mandir}/man1/zsh*.1* | |
1a356495 | 297 | %lang(pl) %{_mandir}/pl/man1/zsh*.1* |
b015e9ee | 298 | |
299 | %files completions | |
300 | %defattr(644,root,root,755) | |
48b96dd9 AM |
301 | %{_datadir}/zsh/%{version}*/functions/comp* |
302 | %{_datadir}/zsh/%{version}*/functions/_* | |
7088e905 | 303 | |
4f664908 | 304 | %files guide |
305 | %defattr(644,root,root,755) | |
306 | %doc zshguide.pdf | |
307 | ||
cfd57568 | 308 | %if %{with static} |
7088e905 | 309 | %files static |
cbb441dc | 310 | %defattr(644,root,root,755) |
7088e905 | 311 | %attr(755,root,root) %{_bindir}/zsh.static |
312 | %endif |