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