]> git.pld-linux.org Git - packages/zsh.git/blob - zsh.spec
85a2763133384368d80544307c3ae1fd112c6f7a
[packages/zsh.git] / zsh.spec
1 #
2 # Conditional build:
3 # _without_static       - without static version
4 #
5 Summary:        Enhanced bourne shell
6 Summary(de):    Enhanced Bourne Shell
7 Summary(es):    Shell bourne mejorada
8 Summary(fr):    Bourne shell amélioré
9 Summary(pl):    Ulepszona pow³oka Bourne'a
10 Summary(pt_BR): Shell bourne melhorada
11 Summary(ru):    ëÏÍÁÎÄÎÙÊ ÐÒÏÃÅÓÓÏÒ (shell) ÐÏÈÏÖÙÊ ÎÁ ksh, ÎÏ Ó ÕÌÕÞÛÅÎÉÑÍÉ
12 Summary(tr):    Geliþmiþ bir BASH sürümü
13 Summary(uk):    ëÏÍÁÎÄÎÉÊ ÐÒÏÃÅÓÏÒ (shell) ÓÈÏÖÉÊ ÎÁ ksh, ÁÌÅ Ú ÐÏËÒÁÝÅÎÎÑÍÉ
14 Name:           zsh
15 Version:        4.0.6
16 Release:        4
17 License:        BSD-like
18 Group:          Applications/Shells
19 URL:            http://www.zsh.org/
20 Source0:        ftp://ftp.zsh.org/pub/zsh/%{name}-%{version}.tar.bz2
21 # Source0-md5:  ec841e1c92a44879c503ffb32a3e5326
22 Source1:        %{name}.1.pl
23 Source2:        http://zsh.sunsite.dk/Guide/zshguide.pdf
24 # Source2-md5:  0d80ba1ef39052c512cfabf368f3bf20
25 Patch0:         %{name}-info.patch
26 Patch1:         %{name}-tinfo.patch
27 Patch2:         %{name}-addons.patch
28 Patch3:         %{name}-paths.patch
29 Patch4:         %{name}-no_nis.patch
30 Patch5:         %{name}-completions.patch
31 PreReq:         grep
32 PreReq:         fileutils
33 BuildRequires:  autoconf
34 %{!?_without_static:BuildRequires:      glibc-static}
35 BuildRequires:  ncurses-devel >= 5.1
36 %{!?_without_static:BuildRequires:      ncurses-static}
37 BuildRequires:  texinfo
38 Requires(post,preun):   grep
39 Requires(preun):        fileutils
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 Obsoletes:      zsh-doc-html, zsh-doc-ps, zsh-doc-dvi
42
43 %define         _bindir         /bin
44
45 %description
46 zsh is an enhanced version of the Bourne shell with csh additions and
47 most features of ksh, bash, and tcsh.
48
49 %description -l es
50 zsh es una versión mejorada del bourne shell con estas
51 características:
52 - muy próximo de la gramática del ksh/sh, con adiciones csh,
53 - varias características del ksh, bash y tcsh,
54 - 75 funciones empotradas, 89 opciones, 154 combinaciones de teclas,
55 - selección,
56 - funciones shell ...y mucho más.
57
58 %description -l ja
59 zsh ¥·¥§¥ë¤ÏÂÐÏÃŪ¤Ê¥í¥°¥¤¥ó¥·¥§¥ë¤È¤·¤ÆÍøÍѲÄǽ¤Ê¥³¥Þ¥ó¥É¥¤¥ó¥¿¥ê¥¿
60 ¤Ç¤¢¤ê¡¢¥·¥§¥ë¥¹¥¯¥ê¥×¥È¥³¥Þ¥ó¥É¤â½èÍý¤Ç¤­¤Þ¤¹. zsh ¤Ï ksh(the Korn
61 shell) ¤Ë»÷¤Æ¤¤¤Þ¤¹¤¬,¤«¤Ê¤ê³ÈÄ¥¤µ¤ì¤Æ¤¤¤Þ¤¹. zsh
62 ¤Ï¥³¥Þ¥ó¥É¥é¥¤¥ó¤Ç¤ÎÊÔ½¸µ¡Ç½, ÁȤ߹þ¤Þ¤ì¤¿¥¹¥Ú¥ë½¤Àµµ¡Ç½, ¥×¥í¥°¥é¥ß¥ó
63 ¥°²Äǽ¤Ê¥³¥Þ¥ó¥ÉÊä´°µ¡Ç½, (ưŪ¥í¡¼¥É¤µ¤ì¤ë)¥·¥§¥ëµ¡Ç½, ¥Ò¥¹¥È¥êµ¡¹½
64 ¤Ê¤É¤ò»ý¤Á¤Þ¤¹.
65
66 %description -l pl
67 zsh jest ulepszon± pow³ok± Bourne'a z elementami pow³oki csh. Posiada
68 wiêkszo¶æ cech ksh, bash i tcsh.
69
70 %description -l pt_BR
71 zsh é uma versão melhorada do bourne shell com essas características:
72 - muito próximo da gramática do ksh/sh, com adições csh,
73 - várias características do ksh, bash e tcsh,
74 - 75 funções embutidas, 89 opções, 154 combinações de teclas,
75 - seleção,
76 - funções shell ...e muito mais.
77
78 %description -l ru
79 zsh - ÜÔÏ ËÏÍÁÎÄÎÙÊ ÐÒÏÃÅÓÓÏÒ ÎÁÐÏÍÉÎÁÀÝÉÊ ksh (Korn shell), ÎÏ
80 ×ËÌÀÞÁÀÝÉÊ ÍÎÏÇÏ ÕÌÕÞÛÅÎÉÊ. zsh ÐÏÄÄÅÒÖÉ×ÁÅÔ ÒÅÄÁËÔÉÒÏ×ÁÎÉÅ ËÏÍÁÎÄÎÏÊ
81 ÓÔÒÏËÉ, ×ÓÔÒÏÅÎÎÕÀ ËÏÒÒÅËÃÉÀ ÎÁÐÉÓÁÎÉÑ, ÐÒÏÇÒÁÍÍÉÒÕÅÍÏÅ ÚÁ×ÅÒÛÅÎÉÅ
82 ËÏÍÁÎÄ, shell-ÆÕÎËÃÉÉ (Ó Á×ÔÏÚÁÇÒÕÚËÏÊ), ÉÓÔÏÒÉÀ ËÏÍÁÎÄ É ÍÎÏÇÏÅ
83 ÄÒÕÇÏÅ.
84
85 %description -l uk
86 zsh - ÃÅ ËÏÍÁÎÄÎÉÊ ÐÒÏÃÅÓÏÒ, ÝÏ ÎÁÇÁÄÕ¤ ksh (Korn shell), ÁÌÅ ×ËÌÀÞÁ¤
87 ÂÁÇÁÔÏ ÐÏËÒÁÝÅÎØ. zsh Ð¦ÄÔÒÉÍÕ¤ ÒÅÄÁÇÕ×ÁÎÎÑ ËÏÍÁÎÄÎÏÇÏ ÒÑÄËÁ,
88 ×ÂÕÄÏ×ÁÎÕ ËÏÒÅËæÀ ÎÁÐÉÓÁÎÎÑ, ÐÒÏÇÒÁÍÏ×ÁÎÅ ÚÁ×ÅÒÛÅÎÎÑ ËÏÍÁÎÄ,
89 shell-ÆÕÎË槠(Ú Á×ÔÏÚÁ×ÁÎÔÁÖÅÎÎÑÍ), ¦ÓÔÏÒ¦À ËÏÍÁÎÄ ÔÁ ÂÁÇÁÔÏ ¦ÎÛÏÇÏ.
90
91 %package completions
92 Summary:        Files needed for advanced TAB-completion
93 Summary(pl):    Pliki potrzebne dla zaawansowanej TAB-completion
94 Group:          Applications/Shells
95 Requires:       %{name} = %{version}
96
97 %description completions
98 This package contains files needed for advanced tab completion in zsh.
99
100 %description completions -l pl
101 Ten pakiet zawiera pliki wymagane przez zsh dla zaawansowanej
102 TAB-completion.
103
104 %package static
105 Summary:        Statically linked Enhanced bourne shell
106 Summary(pl):    Zaawansowany bourne SHell - linkowany statycznie
107 Group:          Applications/Shells
108 Requires(post,preun):   grep
109 Requires(preun):        fileutils
110 Requires:       %{name} = %{version}
111
112 %description static
113 zsh is an enhanced version of the Bourne shell with csh additions and
114 most features of ksh, bash, and tcsh.
115
116 %description static -l pl
117 zsh jest ulepszon± pow³ok± Bourne'a z elementami pow³oki csh. Posiada
118 wiêkszo¶æ cech ksh, bash i tcsh. W tym pakiecie jest statycznie
119 linkowany.
120
121 %package guide
122 Summary:        A User's Guide to the Z-Shell
123 Summary(pl):    Podrêcznik U¿ytkownika Z-Shella
124 Group:          Applications/Shells
125 URL:            http://zsh.sunsite.dk/Guide/
126
127 %description guide
128 A User's Guide to the Z-Shell.
129
130 %description guide -l pl
131 Podrêcznik U¿ytkownika Z-Shella.
132
133 %prep
134 %setup -q
135 %patch0 -p1
136 %patch1 -p1
137 %patch2 -p1
138 %patch3 -p1
139 %patch4 -p1
140 %patch5 -p1
141
142 install %{SOURCE2} .
143
144 %build
145 %{__autoconf}
146
147 %if %{!?_without_static:1}%{?_without_static:0}
148 LDFLAGS="%{rpmldflags} -static"
149 %configure
150 %{__make}
151 mv -f Src/zsh Src/zsh.static
152 LDFLAGS="%{rpmldflags}"
153 %endif
154
155 %configure \
156         --enable-maildir-support
157 %{__make}
158
159 cd Doc
160 makeinfo zsh.texi
161
162 %install
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT{%{_infodir},%{_sysconfdir},%{_bindir},%{_mandir}/pl/man1}
165
166 %{__make} install DESTDIR=$RPM_BUILD_ROOT
167
168 %{!?_without_static:install Src/zsh.static $RPM_BUILD_ROOT%{_bindir}}
169 install Doc/zsh.info*   $RPM_BUILD_ROOT%{_infodir}
170
171 touch $RPM_BUILD_ROOT%{_sysconfdir}/{zlogout,zlogin,zshenv}
172 echo "setopt no_function_argzero" > $RPM_BUILD_ROOT%{_sysconfdir}/zprofile
173 echo ". %{_sysconfdir}/profile" >> $RPM_BUILD_ROOT%{_sysconfdir}/zprofile
174
175 cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/zshrc
176 PS1='[%%n@%%m %%~]%%(!.#.%%\\$) '
177 bindkey -e >/dev/null 2>&1
178 alias which=whence
179
180 # xterm
181 bindkey \`tput khome\` beginning-of-line >/dev/null 2>&1
182 bindkey \`tput kend\` end-of-line >/dev/null 2>&1
183 bindkey \`tput kdch1\` delete-char >/dev/null 2>&1
184 bindkey \`tput kpp\` up-history >/dev/null 2>&1
185 bindkey \`tput knp\` end-of-history >/dev/null 2>&1
186 bindkey \`tput kcuu1\` history-beginning-search-backward >/dev/null 2>&1
187 bindkey \`tput kcud1\` history-beginning-search-forward >/dev/null 2>&1
188 EOF
189
190 rm -f Etc/Makefile*
191 find Functions Util StartupFiles -name .distfiles -o -name .cvsignore | xargs rm -f
192 install %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/pl/man1/zsh.1
193
194 # for kdesdk's completion
195 ln -sf %{version} $RPM_BUILD_ROOT%{_datadir}/zsh/latest
196
197 %clean
198 rm -rf $RPM_BUILD_ROOT
199
200 %post
201 umask 022
202 if [ ! -f /etc/shells ]; then
203         echo "%{_bindir}/zsh" >> /etc/shells
204 else
205         grep -q '^%{_bindir}/zsh$' /etc/shells || echo "%{_bindir}/zsh" >> /etc/shells
206 fi
207 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
208
209 %preun
210 if [ "$1" = "0" ]; then
211         umask 022
212         grep -v '^%{_bindir}/zsh$' /etc/shells > /etc/shells.new
213         mv -f /etc/shells.new /etc/shells
214 fi
215
216 %postun
217 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
218
219 %post static
220 umask 022
221 if [ ! -f /etc/shells ]; then
222         echo "%{_bindir}/zsh.static" >> /etc/shells
223 else
224         grep -q '^%{_bindir}/zsh\.static$' /etc/shells || echo "%{_bindir}/zsh.static" >> /etc/shells
225 fi
226
227 %preun static
228 if [ "$1" = "0" ]; then
229         umask 022
230         grep -v '^%{_bindir}/zsh\.static$' /etc/shells > /etc/shells.new
231         mv -f /etc/shells.new /etc/shells
232 fi
233
234 %files
235 %defattr(644,root,root,755)
236 %doc Etc/* README LICENCE ChangeLog META-FAQ Util StartupFiles
237 %attr(755,root,root) %{_bindir}/zsh
238 %config(noreplace,missingok) %verify(not md5 size mtime) %{_sysconfdir}/*
239 %dir %{_libdir}/zsh
240 %dir %{_libdir}/zsh/%{version}
241 %dir %{_datadir}/zsh
242 %dir %{_datadir}/zsh/site-functions
243 %{_datadir}/zsh/latest
244 %dir %{_datadir}/zsh/%{version}
245 %dir %{_datadir}/zsh/%{version}/functions
246 %{_datadir}/zsh/%{version}/functions/[!_c]*
247 %{_datadir}/zsh/%{version}/functions/c[!o]*
248 %{_datadir}/zsh/%{version}/functions/co[!m]*
249 %attr(755,root,root) %{_libdir}/zsh/%{version}/*
250 %{_infodir}/zsh.info*
251 %{_mandir}/man1/zsh*.1*
252 %lang(pl) %{_mandir}/pl/man1/zsh*.1*
253
254 %files completions
255 %defattr(644,root,root,755)
256 %{_datadir}/zsh/%{version}/functions/comp*
257 %{_datadir}/zsh/%{version}/functions/_*
258
259 %files guide
260 %defattr(644,root,root,755)
261 %doc zshguide.pdf
262
263 %if %{!?_without_static:1}%{?_without_static:0}
264 %files static
265 %defattr(644,root,root,755)
266 %attr(755,root,root) %{_bindir}/zsh.static
267 %endif
This page took 0.03664 seconds and 2 git commands to generate.