/[packages]/cauldron/zsh/current/SPECS/zsh.spec
ViewVC logotype

Contents of /cauldron/zsh/current/SPECS/zsh.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 57677 - (show annotations) (download)
Wed Feb 23 17:59:08 2011 UTC (13 years, 2 months ago) by ennael
File size: 5114 byte(s)
imported package zsh
1 %define _disable_ld_no_undefined 1
2
3 # The version flow of zsh: N - N-dev-1 - ... - (N+1)-pre-1 ... (N+1)
4 #define dev 0
5 #define pre 0
6 %define zshversion 4.3.11
7
8 %if %{?dev:1}%{!?dev:0} && %{?pre:1}%{!?pre:0}
9 %{error:Both %%pre and %%dev defined}
10 %endif
11
12 %if %{?dev:1}%{!?dev:0} || %{?pre:1}%{!?pre:0}
13 %define devdir development/
14 %endif
15
16 %define srcversion %{zshversion}%{?pre:-pre-%{pre}}%{?dev:-dev-%{dev}}
17
18 Summary: A shell with lots of features
19 Name: zsh
20 Version: %zshversion%{?dev:.dev%{dev}}
21 Release: %mkrel %{?pre:0.pre%{pre}.}1
22 Url: http://www.zsh.org
23 License: BSD-like
24 Group: Shells
25 Source0: http://www.zsh.org/pub/%{?devdir}%name-%{srcversion}.tar.bz2
26 Source1: http://www.zsh.org/pub/%{?devdir}%name-%{srcversion}-doc.tar.bz2
27 Source2: zcfg-mdk.tar.bz2
28 Source3: http://zsh.dotsrc.org/Guide/zshguide.tar.gz
29 Source4: zsh.urpmi_comp
30
31 # Upstream patches (none at the moment)
32
33 Requires(postun): rpm-helper
34 Requires(post): rpm-helper
35 Epoch: 1
36 BuildRequires: ncurses-devel libtermcap-devel >= 2.0, texinfo yodl pcre-devel
37 BuildRequires: rpm-helper >= 0.18.5
38 BuildRequires: gdbm-devel
39 BuildRequires: groff
40
41 BuildRoot: %_tmppath/%name-buildroot
42
43 %description
44 Zsh is a UNIX command interpreter (shell) usable as an
45 interactive login shell and as a shell script command
46 processor. Of the standard shells, zsh most closely resembles
47 ksh but includes many enhancements. Zsh has command-line editing,
48 built-in spelling correction, programmable command completion,
49 shell functions (with autoloading), a history mechanism, and a
50 lots of other features
51
52 Install the zsh package if you'd like to try out a different shell.
53
54 %package doc
55 Summary: The doc package of zsh
56 Group: Books/Computer books
57
58 %description doc
59 Zsh is a UNIX command interpreter (shell) usable as an
60 interactive login shell and as a shell script command
61 processor. Of the standard shells, zsh most closely resembles
62 ksh but includes many enhancements. Zsh has command-line editing,
63 built-in spelling correction, programmable command completion,
64 shell functions (with autoloading), a history mechanism, and a
65 lots of other features
66
67 This package include doc guid examples and manual for zsh.
68
69 %prep
70 %setup -q -a 2 -a 1 -n %name-%srcversion
71
72 mv %name-%{srcversion}/Doc/* Doc/
73 install -m 0644 %{SOURCE4} Completion/Mandriva/Command/_urpmi
74
75 # remove temporary files
76 find | grep '~$' | xargs rm -f
77 perl -pi -e 's|/usr/local/bin/|%_bindir/|' Functions/Misc/{run-help,checkmail,zcalc}
78
79 %build
80
81 # check for tcsetpgrp fails with "configure: error: no controlling tty" when
82 # building by bot; force tcsetpgrp
83 %configure2_5x \
84 --enable-etcdir=%_sysconfdir \
85 --enable-function-subdirs \
86 %ifarch sparc
87 --disable-lfs \
88 %endif
89 --enable-pcre \
90 --with-tcsetpgrp
91 make all
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95
96 make install DESTDIR=%buildroot
97 make install.info DESTDIR=%buildroot
98
99 # copy Mandriva Configuration files.
100 mkdir -p $RPM_BUILD_ROOT/{bin,etc}
101 cp -a zcfg/etc/z* $RPM_BUILD_ROOT%_sysconfdir
102 cp -a zcfg/share/zshrc_default %buildroot%_datadir/zsh/%srcversion/zshrc_default
103
104 # this prevents RPM helper from adding dependency on /usr/bin/zsh
105 find %buildroot%_datadir/zsh/%srcversion -type f -exec chmod 0644 '{}' \;
106
107 # Backward compatibilie should be removed in the others times.
108 pushd $RPM_BUILD_ROOT/bin && {
109 mv ..%_bindir/zsh ./zsh
110 } && popd
111
112 # zshall.1 includes all other man pages which does not work with compressed
113 # files. Generate full contents here
114 pushd $RPM_BUILD_ROOT%_mandir && {
115 /usr/bin/soelim man1/zshall.1 > zshall-full
116 mv zshall-full man1/zshall.1
117 popd
118 }
119
120 rm -f $RPM_BUILD_ROOT%_bindir/zsh-%srcversion
121
122 # Copy documentation.
123 rm -rf docroot
124 mkdir -p docroot/{Info_html,Examples,Documentation}/
125
126 cp -a README docroot/
127 cp -a Functions/Misc/* Misc/* Util/* docroot/Examples/
128 cp -a INSTALL ChangeLog* docroot/Documentation
129 cp -a StartupFiles docroot/
130 cp -a Etc/* docroot/Documentation
131 cp -a Doc/*html docroot/Info_html/
132
133 mkdir -p docroot/Zsh_Guide
134 tar xzf %SOURCE3 -C docroot/Zsh_Guide
135 ( cd docroot/Zsh_Guide/zshguide/ ; make )
136 mv docroot/Zsh_Guide/zshguide/*html docroot/Zsh_Guide/
137 rm -Rf docroot/Zsh_Guide/zshguide/
138
139 # Doc
140 rm -f docroot/{StartupFiles/.distfiles,Examples/{Makefile*,*.yo},Documentation/{Makefile*,*.yo}}
141 find docroot/ -name 'Makefile*' -o -name '.yo'|xargs rm -f
142 find docroot/ -type f|xargs perl -pi -e 's@^#!%_prefix/local/bin/(perl|zsh)@#!%_bindir/\1@'
143 mv docroot/Examples/compctl-examples docroot/StartupFiles
144
145 %clean
146 rm -rf $RPM_BUILD_ROOT
147
148 %post
149 %_post_shelladd /bin/zsh
150 %_install_info %name.info
151
152 %preun
153 %_remove_install_info %name.info
154 %_preun_shelldel /bin/zsh
155
156 %files
157 %defattr(-,root,root,0755)
158 %doc docroot/README NEWS
159 %config(noreplace) %_sysconfdir/z*
160 /bin/%name
161 %_mandir/man1/*.1*
162 %_infodir/*.info*
163 %dir %_datadir/zsh
164 %dir %_datadir/zsh/%{srcversion}/
165 %_datadir/zsh/%{srcversion}/functions
166 %_datadir/zsh/%{srcversion}/scripts
167 %_datadir/zsh/%{srcversion}/zshrc_default
168 %dir %_libdir/zsh
169 %_libdir/zsh/%{srcversion}/
170 %_datadir/zsh/site-functions/
171
172 %files doc
173 %defattr(-,root,root)
174 %doc docroot/Documentation/ docroot/Examples/ docroot/Info_html/
175 %doc docroot/StartupFiles/ docroot/Zsh_Guide ChangeLog* LICENCE
176
177

  ViewVC Help
Powered by ViewVC 1.1.30