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