]> git.pld-linux.org Git - packages/zsh.git/blob - zsh.spec
fixed _bindir; rel 6; stb
[packages/zsh.git] / zsh.spec
1 # $Revision: 1.26 $ $Date: 2001-03-11 00:55:22 $
2 Summary:        Enhanced bourne shell
3 Summary(de):    Enhanced Bourne Shell
4 Summary(fr):    Bourne shell amélioré
5 Summary(tr):    Geliþmiþ bir BASH sürümü
6 Summary(pl):    Ulepszona pow³oka Bourne'a
7 Name:           zsh
8 Version:        3.1.9
9 Release:        6
10 License:        GPL
11 Group:          Applications/Shells
12 Group(de):      Applikationen/Shells
13 Group(pl):      Aplikacje/Pow³oki
14 URL:            http://www.zsh.org/
15 Source0:        ftp://ftp.zsh.org/pub/zsh/%{name}-%{version}.tar.gz
16 Patch0:         %{name}-info.patch
17 Patch1:         %{name}-DESTDIR.patch
18 Patch2:         %{name}-sys_capability.patch
19 Patch3:         %{name}-cap_get_proc.patch
20 Patch4:         %{name}-tinfo.patch
21 Patch5:         %{name}-addons.patch
22 BuildRequires:  ncurses-devel >= 5.1
23 BuildRequires:  glibc-static
24 BuildRequires:  ncurses-static
25 BuildRequires:  texinfo
26 BuildRequires:  autoconf
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Obsoletes:      zsh-doc-html, zsh-doc-ps, zsh-doc-dvi
29
30 %define         _bindir         /bin
31
32 %description
33 zsh is an enhanced version of the Bourne shell with csh additions and
34 most features of ksh, bash, and tcsh.
35
36 %description -l pl
37 zsh jest ulepszon± pow³ok± Bourne'a z elementami pow³oki csh. Posiada
38 wiêkszo¶æ cech ksh, bash i tcsh.
39
40 %package static
41 Summary:        Statically linked Enhanced bourne shell
42 Summary(pl):    Zaawansowany bourne SHell - linkowany statycznie
43 Group:          Applications/Shells
44 Group(de):      Applikationen/Shells
45 Group(pl):      Aplikacje/Pow³oki
46 Requires:       %{name} = %{version}
47
48 %description static
49 zsh is an enhanced version of the Bourne shell with csh additions and
50 most features of ksh, bash, and tcsh.
51
52 %description -l pl static
53 zsh jest ulepszon± pow³ok± Bourne'a z elementami pow³oki csh. Posiada
54 wiêkszo¶æ cech ksh, bash i tcsh. W tym pakiecie jest statycznie
55 linkowany.
56
57 %prep
58 %setup -q
59 %patch0 -p1
60 %patch1 -p1
61 %patch2 -p1
62 %patch3 -p1
63 %patch4 -p1
64 %patch5 -p1
65
66 %build
67 autoconf
68
69 %configure
70 %{__make}
71 mv -f Src/zsh Src/zsh.static
72
73 %configure \
74         --enable-maildir-support
75 %{__make}
76
77 (cd Doc; makeinfo zsh.texi)
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT{%{_infodir},%{_sysconfdir},%{_bindir}}
82
83 %{__make} install DESTDIR=$RPM_BUILD_ROOT
84
85 install Src/zsh.static  $RPM_BUILD_ROOT%{_bindir}
86 install Doc/zsh.info*   $RPM_BUILD_ROOT%{_infodir}
87
88 touch $RPM_BUILD_ROOT%{_sysconfdir}/{zlogout,zlogin,zshenv}
89 echo    ". /etc/profile"                > $RPM_BUILD_ROOT%{_sysconfdir}/zprofile
90 echo -e "PS1='[%n@%m %~]%(!.#.%\$) '\nbindkey -e >/dev/null 2>&1" > \
91                                           $RPM_BUILD_ROOT%{_sysconfdir}/zshrc
92                                         
93 rm -f Etc/Makefile*
94 gzip -9nf Etc/* README ChangeLog META-FAQ
95
96 %post
97 if [ ! -f /etc/shells ]; then
98         echo "/bin/zsh" >> /etc/shells
99 else
100         while read SHNAME; do
101                 if [ "$SHNAME" = "/bin/zsh" ]; then
102                         HAS_ZSH=1
103                 fi
104         done < /etc/shells
105         if [ -n "$HAS_ZSH" ]; then
106                 echo "/bin/zsh" >> /etc/shells
107         fi
108 fi
109 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
110
111 %preun
112 if [ "$1" = "0" ]; then
113         while read SHNAME; do
114                 if [ "$SHNAME" = "/bin/zsh" ]; then
115                         echo "$SHNAME"
116                 fi
117         done < /etc/shells > /etc/shells.new
118         mv -f /etc/shells.new /etc/shells
119 fi
120 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
121
122 %post static
123 if [ ! -f /etc/shells ]; then
124         echo "/bin/zsh.static" >> /etc/shells
125 else
126         while read SHNAME; do
127                 if [ "$SHNAME" = "/bin/zsh.static" ]; then
128                         HAS_ZSH_STATIC=1
129                 fi
130         done < /etc/shells
131         if [ -n "$HAS_ZSH_STATIC" ]; then
132                  echo "/bin/zsh.static" >> /etc/shells
133         fi
134 fi
135
136 %preuni static
137 if [ "$1" = "0" ]; then
138         while read SHNAME; do
139                 if [ "$SHNAME" = "/bin/zsh.static" ]; then
140                         echo "$SHNAME"
141                 fi
142         done < /etc/shells > /etc/shells.new
143         mv -f /etc/shells.new /etc/shells
144 fi
145
146 %clean
147 rm -rf $RPM_BUILD_ROOT
148
149 %files
150 %defattr(644,root,root,755)
151 %doc {META-FAQ,README,ChangeLog}.gz Etc/* Util Functions
152 %doc %{_infodir}/zsh.info*
153 %dir %{_libdir}/zsh/%{version}
154 %config %{_sysconfdir}/*
155
156 %attr(755,root,root) %{_bindir}/zsh
157 %attr(755,root,root) %{_libdir}/zsh/%{version}/*
158 %{_mandir}/man1/zsh*.1.gz
159
160 %files static
161 %defattr(644,root,root,755)
162 %attr(755,root,root) %{_bindir}/zsh.static
This page took 0.093257 seconds and 4 git commands to generate.