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