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