]> git.pld-linux.org Git - packages/zsh.git/blob - zsh.spec
- prevent rpm from expanding "macros" in PS1
[packages/zsh.git] / zsh.spec
1 # $Revision: 1.34 $ $Date: 2001-07-15 16:46:27 $
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:        4.0.2
9 Release:        3
10 License:        BSD-like
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}-tinfo.patch
18 Patch2:         %{name}-addons.patch
19 Patch3:         %{name}-paths.patch
20 Patch4:         %{name}-no_nis.patch
21 Prereq:         grep
22 Prereq:         fileutils
23 BuildRequires:  autoconf
24 BuildRequires:  ncurses-devel >= 5.1
25 BuildRequires:  glibc-static
26 BuildRequires:  ncurses-static
27 BuildRequires:  texinfo
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Obsoletes:      zsh-doc-html, zsh-doc-ps, zsh-doc-dvi
30
31 %define         _bindir         /bin
32
33 %description
34 zsh is an enhanced version of the Bourne shell with csh additions and
35 most features of ksh, bash, and tcsh.
36
37 %description -l pl
38 zsh jest ulepszon± pow³ok± Bourne'a z elementami pow³oki csh. Posiada
39 wiêkszo¶æ cech ksh, bash i tcsh.
40
41 %package static
42 Summary:        Statically linked Enhanced bourne shell
43 Summary(pl):    Zaawansowany bourne SHell - linkowany statycznie
44 Group:          Applications/Shells
45 Group(de):      Applikationen/Shells
46 Group(pl):      Aplikacje/Pow³oki
47 Requires:       %{name} = %{version}
48
49 %description static
50 zsh is an enhanced version of the Bourne shell with csh additions and
51 most features of ksh, bash, and tcsh.
52
53 %description -l pl static
54 zsh jest ulepszon± pow³ok± Bourne'a z elementami pow³oki csh. Posiada
55 wiêkszo¶æ cech ksh, bash i tcsh. W tym pakiecie jest statycznie
56 linkowany.
57
58 %prep
59 %setup -q
60 %patch0 -p1
61 %patch1 -p1
62 %patch2 -p1
63 %patch3 -p1
64 %patch4 -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 find Functions Util StartupFiles -name .distfiles -o -name .cvsignore | xargs rm -f
95 gzip -9nf Etc/* README LICENCE ChangeLog META-FAQ
96
97 %post
98 if [ ! -f /etc/shells ]; then
99         echo "%{_bindir}/zsh" >> /etc/shells
100 else
101         grep -q '^%{_bindir}/zsh$' /etc/shells || echo "%{_bindir}/zsh" >> /etc/shells
102 fi
103 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
104
105 %preun
106 if [ "$1" = "0" ]; then
107         grep -v '^%{_bindir}/zsh$' /etc/shells > /etc/shells.new
108         mv -f /etc/shells.new /etc/shells
109 fi
110
111 %postun
112 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
113
114 %post static
115 if [ ! -f /etc/shells ]; then
116         echo "%{_bindir}/zsh.static" >> /etc/shells
117 else
118         grep -q '^%{_bindir}/zsh\.static$' /etc/shells || echo "%{_bindir}/zsh.static" >> /etc/shells
119 fi
120
121 %preun static
122 if [ "$1" = "0" ]; then
123         grep -v '^%{_bindir}/zsh\.static$' /etc/shells > /etc/shells.new
124         mv -f /etc/shells.new /etc/shells
125 fi
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
129
130 %files
131 %defattr(644,root,root,755)
132 %doc *.gz Etc/* Util Functions StartupFiles
133 %attr(755,root,root) %{_bindir}/zsh
134 %config %{_sysconfdir}/*
135 %dir %{_libdir}/zsh
136 %dir %{_libdir}/zsh/%{version}
137 %attr(755,root,root) %{_libdir}/zsh/%{version}/*
138 %{_infodir}/zsh.info*
139 %{_mandir}/man1/zsh*.1*
140
141 %files static
142 %defattr(644,root,root,755)
143 %attr(755,root,root) %{_bindir}/zsh.static
This page took 0.080228 seconds and 4 git commands to generate.