]> git.pld-linux.org Git - packages/zsh.git/blob - zsh.spec
d6e5e5b495cbc016cb0906b23663f49373ff24b3
[packages/zsh.git] / zsh.spec
1 # $Revision: 1.48 $ $Date: 2002-04-13 06:10:11 $
2 #
3 # Conditional build:
4 # _without_static       - without static version
5 #
6 Summary:        Enhanced bourne shell
7 Summary(de):    Enhanced Bourne Shell
8 Summary(es):    Shell bourne mejorada
9 Summary(fr):    Bourne shell amélioré
10 Summary(pl):    Ulepszona pow³oka Bourne'a
11 Summary(pt_BR): Shell bourne melhorada
12 Summary(tr):    Geliþmiþ bir BASH sürümü
13 Name:           zsh
14 Version:        4.0.4
15 Release:        6
16 License:        BSD-like
17 Group:          Applications/Shells
18 URL:            http://www.zsh.org/
19 Source0:        ftp://ftp.zsh.org/pub/zsh/%{name}-%{version}.tar.gz
20 Source1:        %{name}.1.pl
21 Patch0:         %{name}-info.patch
22 Patch1:         %{name}-tinfo.patch
23 Patch2:         %{name}-addons.patch
24 Patch3:         %{name}-paths.patch
25 Patch4:         %{name}-no_nis.patch
26 Prereq:         grep
27 Prereq:         fileutils
28 BuildRequires:  autoconf
29 BuildRequires:  ncurses-devel >= 5.1
30 BuildRequires:  texinfo
31 %{!?_without_static:BuildRequires:      glibc-static}
32 %{!?_without_static:BuildRequires:      ncurses-static}
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Obsoletes:      zsh-doc-html, zsh-doc-ps, zsh-doc-dvi
35
36 %define         _bindir         /bin
37
38 %description
39 zsh is an enhanced version of the Bourne shell with csh additions and
40 most features of ksh, bash, and tcsh.
41
42 %description -l es
43 zsh es una versión mejorada del bourne shell con estas
44 características:
45 - muy próximo de la gramática del ksh/sh, con adiciones csh,
46 - varias características del ksh, bash y tcsh,
47 - 75 funciones empotradas, 89 opciones, 154 combinaciones de teclas,
48 - selección,
49 - funciones shell ...y mucho más.
50
51 %description -l pl
52 zsh jest ulepszon± pow³ok± Bourne'a z elementami pow³oki csh. Posiada
53 wiêkszo¶æ cech ksh, bash i tcsh.
54
55 %description -l pt_BR
56 zsh é uma versão melhorada do bourne shell com essas características:
57 - muito próximo da gramática do ksh/sh, com adições csh,
58 - várias características do ksh, bash e tcsh,
59 - 75 funções embutidas, 89 opções, 154 combinações de teclas,
60 - seleção,
61 - funções shell ...e muito mais.
62
63 %package completions
64 Summary:        Files needed for advanced TAB-completion
65 Summary(pl):    Pliki potrzebne dla zaawansowanej TAB-completion
66 Group:          Applications/Shells
67 Requires:       %{name} = %{version}
68
69 %description completions
70 This package contains files needed for advanced tab completion in zsh.
71
72 %description -l pl completions
73 Ten pakiet zawiera pliki wymagane przez zsh dla zaawansowanej
74 TAB-completion.
75
76 %package static
77 Summary:        Statically linked Enhanced bourne shell
78 Summary(pl):    Zaawansowany bourne SHell - linkowany statycznie
79 Group:          Applications/Shells
80 Requires:       %{name} = %{version}
81
82 %description static
83 zsh is an enhanced version of the Bourne shell with csh additions and
84 most features of ksh, bash, and tcsh.
85
86 %description -l pl static
87 zsh jest ulepszon± pow³ok± Bourne'a z elementami pow³oki csh. Posiada
88 wiêkszo¶æ cech ksh, bash i tcsh. W tym pakiecie jest statycznie
89 linkowany.
90
91 %prep
92 %setup -q
93 %patch0 -p1
94 %patch1 -p1
95 %patch2 -p1
96 %patch3 -p1
97 %patch4 -p1
98
99 %build
100 autoconf
101
102 %if %{!?_without_static:1}%{?_without_static:0}
103 LDFLAGS="%{rpmldflags} -static"
104 %configure
105 %{__make}
106 mv -f Src/zsh Src/zsh.static
107 LDFLAGS="%{rpmldflags}"
108 %endif
109
110 %configure \
111         --enable-maildir-support
112 %{__make}
113
114 (cd Doc; makeinfo zsh.texi)
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118 install -d $RPM_BUILD_ROOT{%{_infodir},%{_sysconfdir},%{_bindir},%{_mandir}/pl/man1}
119
120 %{__make} install DESTDIR=$RPM_BUILD_ROOT
121
122 %{!?_without_static:install Src/zsh.static $RPM_BUILD_ROOT%{_bindir}}
123 install Doc/zsh.info*   $RPM_BUILD_ROOT%{_infodir}
124
125 touch $RPM_BUILD_ROOT%{_sysconfdir}/{zlogout,zlogin,zshenv}
126 echo ". /etc/profile" > $RPM_BUILD_ROOT%{_sysconfdir}/zprofile
127 echo -e "PS1='[%%n@%%m %%~]%%(!.#.%%\\$) '\nbindkey -e >/dev/null 2>&1\nalias which=whence" > \
128                                           $RPM_BUILD_ROOT%{_sysconfdir}/zshrc
129
130 rm -f Etc/Makefile*
131 find Functions Util StartupFiles -name .distfiles -o -name .cvsignore | xargs rm -f
132 install %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/pl/man1/zsh.1
133
134 gzip -9nf Etc/* README LICENCE ChangeLog META-FAQ
135
136 %post
137 if [ ! -f /etc/shells ]; then
138         echo "%{_bindir}/zsh" >> /etc/shells
139 else
140         grep -q '^%{_bindir}/zsh$' /etc/shells || echo "%{_bindir}/zsh" >> /etc/shells
141 fi
142 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
143
144 %preun
145 if [ "$1" = "0" ]; then
146         grep -v '^%{_bindir}/zsh$' /etc/shells > /etc/shells.new
147         mv -f /etc/shells.new /etc/shells
148 fi
149
150 %postun
151 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
152
153 %post static
154 if [ ! -f /etc/shells ]; then
155        echo "%{_bindir}/zsh.static" >> /etc/shells
156 else
157        grep -q '^%{_bindir}/zsh\.static$' /etc/shells || echo "%{_bindir}/zsh.static" >> /etc/shells
158 fi
159
160 %preun static
161 if [ "$1" = "0" ]; then
162        grep -v '^%{_bindir}/zsh\.static$' /etc/shells > /etc/shells.new
163        mv -f /etc/shells.new /etc/shells
164 fi
165
166
167 %clean
168 rm -rf $RPM_BUILD_ROOT
169
170 %files
171 %defattr(644,root,root,755)
172 %doc *.gz Etc/* Util StartupFiles
173 %attr(755,root,root) %{_bindir}/zsh
174 %config %{_sysconfdir}/*
175 %dir %{_libdir}/zsh
176 %dir %{_libdir}/zsh/%{version}
177 %dir %{_datadir}/zsh/
178 %dir %{_datadir}/zsh/site-functions
179 %dir %{_datadir}/zsh/%{version}
180 %dir %{_datadir}/zsh/%{version}/functions
181 %{_datadir}/zsh/%{version}/functions/[^_c]*
182 %{_datadir}/zsh/%{version}/functions/c[^o]*
183 %{_datadir}/zsh/%{version}/functions/co[^m]*
184 %attr(755,root,root) %{_libdir}/zsh/%{version}/*
185 %{_infodir}/zsh.info*
186 %{_mandir}/man1/zsh*.1*
187 %lang(pl) %{_mandir}/pl/man1/zsh*.1*
188
189 %files completions
190 %defattr(644,root,root,755)
191 %{_datadir}/zsh/%{version}/functions/comp*
192 %{_datadir}/zsh/%{version}/functions/_*
193
194 %if %{!?_without_static:1}%{?_without_static:0}
195 %files static
196 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_bindir}/zsh.static
198 %endif
This page took 0.034021 seconds and 3 git commands to generate.