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