]> git.pld-linux.org Git - packages/zsh.git/blob - zsh.spec
d60b0395ccb99d1268127c9cff0ff56553957020
[packages/zsh.git] / zsh.spec
1 # $Revision: 1.19 $ $Date: 2000-09-24 21:09:03 $
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:        2
10 License:        GPL
11 Group:          Shells
12 Group(pl):      Pow³oki
13 Source0:        ftp://ftp.zsh.org/pub/zsh/%{name}-%{version}.tar.gz
14 Patch0:         zsh-info.patch
15 Patch1:         zsh-DESTDIR.patch
16 Patch2:         zsh-sys_capability.patch
17 Patch3:         zsh-cap_get_proc.patch
18 Patch4:         zsh-tinfo.patch
19 Patch5:         zsh-addons.patch
20 Prereq:         grep
21 Prereq:         mawk
22 BuildRequires:  ncurses-devel >= 5.1
23 BuildRequires:  glibc-static
24 BuildRequires:  ncurses-static
25 BuildRequires:  texinfo
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 Obsoletes:      zsh-doc-html, zsh-doc-ps, zsh-doc-dvi
28
29 %define         _exec_prefix            /
30
31 %description
32 zsh is an enhanced version of the Bourne shell with csh additions and
33 most features of ksh, bash, and tcsh.
34
35 %description -l pl
36 zsh jest ulepszon± pow³ok± Bourne'a z elementami pow³oki csh. Posiada
37 wiêkszo¶æ cech ksh, bash i tcsh.
38
39 %package static
40 Summary:        Statically linked Enhanced bourne shell
41 Summary(pl):     Zaawansowany bourne SHell - linkowany statycznie
42 Group:          Shells
43 Group(pl):      Pow³oki
44 Requires:       %{name} = %{version}
45
46 %description static
47 zsh is an enhanced version of the Bourne shell with csh additions and
48 most features of ksh, bash, and tcsh.
49
50 %description -l pl static
51 zsh jest ulepszon± pow³ok± Bourne'a z elementami pow³oki csh. Posiada
52 wiêkszo¶æ cech ksh, bash i tcsh. W tym pakiecie jest statycznie
53 linkowany.
54
55 %prep
56 %setup -q
57 %patch0 -p1
58 %patch1 -p1
59 %patch2 -p1
60 %patch3 -p1
61 %patch4 -p1
62 %patch5 -p1
63
64 %build
65 autoconf
66
67 LDFLAGS="-static %{?debug:-s}"
68 %configure
69 %{__make}
70 mv Src/zsh Src/zsh.static
71
72 LDFLAGS="%{?debug:-s}"
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
82 %{__make} install DESTDIR=$RPM_BUILD_ROOT
83
84 install Src/zsh.static $RPM_BUILD_ROOT%{_bindir}
85
86 install -d $RPM_BUILD_ROOT%{_infodir}
87 install Doc/zsh.info* $RPM_BUILD_ROOT%{_infodir}
88
89 install -d $RPM_BUILD_ROOT%{_sysconfdir}
90 touch $RPM_BUILD_ROOT%{_sysconfdir}/{zlogout,zprofile,zshrc,zlogin,zshenv}
91
92 rm Etc/Makefile*
93 gzip -9nf Etc/* README ChangeLog META-FAQ \
94         $RPM_BUILD_ROOT%{_mandir}/man1/* \
95         $RPM_BUILD_ROOT%{_infodir}/zsh.info*
96
97 %post
98 if [ ! -f /etc/shells ]; then
99         echo "/bin/zsh" > /etc/shells
100 else
101         if ! grep '^/bin/zsh$' /etc/shells > /dev/null; then
102                 echo "/bin/zsh" >> /etc/shells
103         fi
104 fi
105
106 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
107
108 %postun
109 if [ "$1" = "0" ]; then
110         grep -v /bin/zsh /etc/shells > /etc/shells.new
111         mv /etc/shells.new /etc/shells
112 fi
113
114 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
115
116 %post static
117 if [ ! -f /etc/shells ]; then
118         echo "/bin/zsh.static" > /etc/shells
119 else
120         grep '^/bin/zsh.static$' /etc/shells > /dev/null || echo "/bin/zsh.static" >> /etc/shells
121 fi
122
123 %postun static
124 if [ ! -x /bin/zsh.static ]; then
125         grep -v '^/bin/zsh.static$' /etc/shells > /etc/shells.rpm
126         mv /etc/shells.rpm /etc/shells
127 fi
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %files
133 %defattr(644,root,root,755)
134 %doc {META-FAQ,README,ChangeLog}.gz Etc/* Util Functions
135 %doc %{_infodir}/zsh.info*
136 %dir %{_libdir}/zsh/%{version}
137 %config %{_sysconfdir}/*
138
139 %attr(755,root,root) %{_bindir}/zsh
140 %attr(755,root,root) %{_libdir}/zsh/%{version}/*
141 %{_mandir}/man1/zsh*.1.gz
142
143 %files static
144 %defattr(644,root,root,755)
145 %attr(755,root,root) %{_bindir}/zsh.static
This page took 0.03372 seconds and 2 git commands to generate.