]> git.pld-linux.org Git - packages/zsh.git/blob - zsh.spec
perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
[packages/zsh.git] / zsh.spec
1 # $Revision: 1.44 $ $Date: 2002-01-18 02:15:48 $
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:        6
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 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 pl
43 zsh jest ulepszon± pow³ok± Bourne'a z elementami pow³oki csh. Posiada
44 wiêkszo¶æ cech ksh, bash i tcsh.
45
46 %package completions
47 Summary:        Files needed for advanced TAB-completion
48 Summary(pl):    Pliki potrzebne dla zaawansowanej TAB-completion
49 Group:          Applications/Shells
50 Group(de):      Applikationen/Shells
51 Group(pl):      Aplikacje/Pow³oki
52 Requires:       %{name} = %{version}
53
54 %description completions
55 This package contains files needed for advanced tab completion in zsh.
56
57 %description -l pl completions
58 Ten pakiet zawiera pliki wymagane przez zsh dla zaawansowanej
59 TAB-completion.
60
61 %package static
62 Summary:       Statically linked Enhanced bourne shell
63 Summary(pl):   Zaawansowany bourne SHell - linkowany statycznie
64 Group:         Applications/Shells
65 Group(de):     Applikationen/Shells
66 Group(pl):     Aplikacje/Pow³oki
67 Requires:      %{name} = %{version}
68
69 %description static
70 zsh is an enhanced version of the Bourne shell with csh additions and
71 most features of ksh, bash, and tcsh.
72
73 %description -l pl static
74 zsh jest ulepszon± pow³ok± Bourne'a z elementami pow³oki csh. Posiada
75 wiêkszo¶æ cech ksh, bash i tcsh. W tym pakiecie jest statycznie
76 linkowany.
77
78 %prep
79 %setup -q
80 %patch0 -p1
81 %patch1 -p1
82 %patch2 -p1
83 %patch3 -p1
84 %patch4 -p1
85
86 %build
87 autoconf
88
89 %if %{!?_without_static:1}%{?_without_static:0}
90 LDFLAGS="%{rpmldflags} -static"
91 %configure
92 %{__make}
93 mv -f Src/zsh Src/zsh.static
94 LDFLAGS="%{rpmldflags}"
95 %endif
96
97 %configure \
98         --enable-maildir-support
99 %{__make}
100
101 (cd Doc; makeinfo zsh.texi)
102
103 %install
104 rm -rf $RPM_BUILD_ROOT
105 install -d $RPM_BUILD_ROOT{%{_infodir},%{_sysconfdir},%{_bindir},%{_mandir}/pl/man1}
106
107 %{__make} install DESTDIR=$RPM_BUILD_ROOT
108
109 %{!?_without_static:install Src/zsh.static $RPM_BUILD_ROOT%{_bindir}}
110 install Doc/zsh.info*   $RPM_BUILD_ROOT%{_infodir}
111
112 touch $RPM_BUILD_ROOT%{_sysconfdir}/{zlogout,zlogin,zshenv}
113 echo    ". /etc/profile"                > $RPM_BUILD_ROOT%{_sysconfdir}/zprofile
114 echo -e "PS1='[%%n@%%m %%~]%%(!.#.%%\\$) '\nbindkey -e >/dev/null 2>&1\nalias which=whence" > \
115                                           $RPM_BUILD_ROOT%{_sysconfdir}/zshrc
116
117 rm -f Etc/Makefile*
118 find Functions Util StartupFiles -name .distfiles -o -name .cvsignore | xargs rm -f
119 install %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/pl/man1/zsh.1
120
121 gzip -9nf Etc/* README LICENCE ChangeLog META-FAQ
122
123 %post
124 if [ ! -f /etc/shells ]; then
125         echo "%{_bindir}/zsh" >> /etc/shells
126 else
127         grep -q '^%{_bindir}/zsh$' /etc/shells || echo "%{_bindir}/zsh" >> /etc/shells
128 fi
129 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
130
131 %preun
132 if [ "$1" = "0" ]; then
133         grep -v '^%{_bindir}/zsh$' /etc/shells > /etc/shells.new
134         mv -f /etc/shells.new /etc/shells
135 fi
136
137 %postun
138 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
139
140 %post static
141 if [ ! -f /etc/shells ]; then
142        echo "%{_bindir}/zsh.static" >> /etc/shells
143 else
144        grep -q '^%{_bindir}/zsh\.static$' /etc/shells || echo "%{_bindir}/zsh.static" >> /etc/shells
145 fi
146
147 %preun static
148 if [ "$1" = "0" ]; then
149        grep -v '^%{_bindir}/zsh\.static$' /etc/shells > /etc/shells.new
150        mv -f /etc/shells.new /etc/shells
151 fi
152
153
154 %clean
155 rm -rf $RPM_BUILD_ROOT
156
157 %files
158 %defattr(644,root,root,755)
159 %doc *.gz Etc/* Util StartupFiles
160 %attr(755,root,root) %{_bindir}/zsh
161 %config %{_sysconfdir}/*
162 %dir %{_libdir}/zsh
163 %dir %{_libdir}/zsh/%{version}
164 %dir %{_datadir}/zsh/
165 %dir %{_datadir}/zsh/site-functions
166 %dir %{_datadir}/zsh/%{version}
167 %dir %{_datadir}/zsh/%{version}/functions
168 %{_datadir}/zsh/%{version}/functions/[^_c]*
169 %{_datadir}/zsh/%{version}/functions/c[^o]*
170 %{_datadir}/zsh/%{version}/functions/co[^m]*
171 %attr(755,root,root) %{_libdir}/zsh/%{version}/*
172 %{_infodir}/zsh.info*
173 %{_mandir}/man1/zsh*.1*
174 %lang(pl) %{_mandir}/pl/man1/zsh*.1*
175
176 %files completions
177 %defattr(644,root,root,755)
178 %{_datadir}/zsh/%{version}/functions/comp*
179 %{_datadir}/zsh/%{version}/functions/_*
180
181 %if %{!?_without_static:1}%{?_without_static:0}
182 %files static
183 %attr(755,root,root) %{_bindir}/zsh.static
184 %endif
This page took 0.087055 seconds and 4 git commands to generate.