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