Sophie

Sophie

distrib > Mandriva > 7.2 > i586 > media > main-src > by-pkgid > dfd9cfa93647fcdaf2f2594ede83b320 > files > 10

zsh-3.1.9-4mdk.src.rpm

# -*- Mode: rpm-spec -*-
%define name zsh
%define version 3.1.9
%define rversion 3.1.9
%define dversion 3.1.9
%define release 4mdk
%define url ftp://ftp.zsh.org/pub/

Summary: A shell with lots of features.
Name: %{name}
Version: %{version}
Release: %{release}
Url: http://www.zsh.org
Source0: %{url}/%{name}-%{rversion}.tar.bz2
Source1: %{url}/%{name}-%{dversion}-doc.tar.bz2
Source2: zcfg-mdk.tar.bz2
Source3: http://www.pwstephenson.fsnet.co.uk/computing/zshguide.tar.bz2
Patch0: zsh-3.1.6-nsl.patch.bz2
Patch1: zsh-3.1.6-dev-22-path.patch.bz2
Patch2: zsh-3.1.6-dev-22-keys.patch.bz2
Patch3: zsh-3.1.9-buildroot.patch.bz2
Patch4: zsh-3.1.9-perl-manpath.patch.bz2
Patch5: zsh-3.1.9-rpmnewopt.patch.bz2
Copyright: GPL
Group: Shells
Prefix: %{_prefix}
Prereq: fileutils grep
Serial: 1
# Available in our contrib.
BuildRequires: yodl autoconf tetex
BuildRoot: %{_tmppath}/%{name}-buildroot

%description
Zsh is a UNIX command interpreter (shell) usable as an
interactive login shell and as a shell script command
processor. Of the standard shells, zsh most closely resembles
ksh but includes many enhancements. Zsh has command-line editing,
built-in spelling correction, programmable command completion,
shell functions (with autoloading), a history mechanism, and a
lots of other features

Install the zsh package if you'd like to try out a different shell.

%package doc
Summary: The doc package of zsh
Group: Shells

%description doc
Zsh is a UNIX command interpreter (shell) usable as an
interactive login shell and as a shell script command
processor. Of the standard shells, zsh most closely resembles
ksh but includes many enhancements. Zsh has command-line editing,
built-in spelling correction, programmable command completion,
shell functions (with autoloading), a history mechanism, and a
lots of other features

This package include doc guid examples and manual for zsh.

%prep
%setup -q -a 2 -a 1 -n %{name}-%{rversion}
mv %{name}-%{dversion}/Doc/* Doc/
%patch0 -p0
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

# remove temporary files
find|grep '~$'|xargs rm -f

%build
%ifnarch sparc
%configure --enable-etcdir=%{_sysconfdir} --enable-function-subdirs
%else
%configure --enable-etcdir=%{_sysconfdir} --enable-function-subdirs --disable-lfs
%endif

for i in Doc Etc Src;do
pushd $i && {
make all
} && popd
done

%install
rm -rf $RPM_BUILD_ROOT

# Zsh hardcode the prefix in binary even at install.
pushd Src/ && {
	touch .in_rpm_install
    %makeinstall
} && popd

%makeinstall install.man install.info \
 fndir=%{?buildroot:%{buildroot}}%{_datadir}/%{name}/%{rversion}/functions \
 sitefndir=%{?buildroot:%{buildroot}}%{_datadir}/%{name}/site-functions

# copy Mandrake Configuration files.
mkdir -p $RPM_BUILD_ROOT/{bin,etc}
cp -a zcfg/* $RPM_BUILD_ROOT%{_sysconfdir}
# Backward compatibilie should be removed in the others times.
pushd $RPM_BUILD_ROOT/bin && {
    ln -s ..%{_bindir}/zsh ./zsh
} && popd

# Copy documentation.
rm -rf docroot
mkdir -p docroot/{Info_html,Examples,Documentation}/

cp -a README docroot/
cp -a Functions/Misc/* Misc/* Util/* docroot/Examples/
cp -a INSTALL ChangeLog* docroot/Documentation 
cp -a StartupFiles docroot/
cp -a Etc/* docroot/Documentation
mv docroot/Documentation/NEWS docroot/
cp -a Doc/*html docroot/Info_html/

mkdir -p docroot/Zsh_Guide
bzcat %{SOURCE3}|tar xf - -C docroot/Zsh_Guide
mv docroot/Zsh_Guide/zshguide/*html docroot/Zsh_Guide/
rmdir docroot/Zsh_Guide/zshguide

find docroot/ -type f|xargs perl -p -i -e 's|^#!%{prefix}/local/bin/zsh|#!%{_bindir}/zsh|'
find docroot/ -type f|xargs perl -p -i -e 's|^#!%{prefix}/local/bin/perl|#!%{_bindir}/perl|'

rm -f docroot/StartupFiles/.distfiles
rm -f docroot/Examples/{Makefile*,*.yo}
rm -f docroot/Documentation/{Makefile*,*.yo}
mv docroot/Examples/compctl-examples docroot/StartupFiles

#Build Helpdir
mkdir -p $RPM_BUILD_ROOT%{_datadir}/zsh/

rm -rf help && mkdir help/ && pushd help && {
    echo "Build Documentation"
    make -C ../Doc/ zshbuiltins.1
    man ../Doc/zshbuiltins.1|colcrt -|perl ../Util/helpfiles
} && popd

mv help $RPM_BUILD_ROOT%{_datadir}/zsh

# TODO: ???? ??? ??? ???
rm -f $RPM_BUILD_ROOT%{_libdir}/zsh/%{rversion}/*.so

find docroot/ -name 'Makefile*' -o -name '.yo'|xargs rm -f

%clean
rm -rf $RPM_BUILD_ROOT

%post
if [ ! -f %{_sysconfdir}/shells ]; then
	echo "/bin/zsh" > %{_sysconfdir}/shells
else
	grep '^/bin/zsh' %{_sysconfdir}/shells > /dev/null || echo "/bin/zsh" >> /etc/shells
fi
%_install_info %{name}.info

%postun
if [ ! -x /bin/zsh ]; then
	grep -v '^/bin/zsh$' %{_sysconfdir}/shells | grep -v '^/bin/zsh$'> /etc/shells.rpm
	mv %{_sysconfdir}/shells.rpm /etc/shells
fi
%_remove_install_info %{name}.info

%files
%defattr(-,root,root,0755)
%doc docroot/README docroot/NEWS
%config(noreplace) %{_sysconfdir}/z*
/bin/%{name}
%{_bindir}/*
%{_libdir}/zsh/
%{_mandir}/man1/*.1*
%{_infodir}/*.info*
%{_datadir}/zsh/%{rversion}/functions
%{_datadir}/zsh/site-functions/

%files doc
%defattr(-,root,root)
%doc docroot/Documentation/ docroot/Examples/ docroot/Info_html/ docroot/StartupFiles/
%doc docroot/Zsh_Guide

%changelog
* Sat Aug 26 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.9-4mdk
- Set some %config file to (noreplace).
- Make -A to complete spec file for _rpm.

* Thu Jul 20 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.9-3mdk
- Get /usr/share/man also in the completion for perl manpages.
- BM.

* Wed Jul  5 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.9-2mdk
- Fix buildroot hardcoded in binary.

* Wed Jun 21 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.9-1mdk
- Use makeinstall macros (not easy this one :\).
- 3.1.9.

* Mon Jun  5 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.8-1mdk
- 3.1.8.

* Sun May 28 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev22-3mdk
- Fix path (%{prefix}/ucb -> %{_bindir}/X11)
- Fix keys (home-end-suppr-delete) directly in the zsh binary.

* Sun Apr 16 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev22-2mdk
- Remove doble .so in %{_libdir}/zsh/*.

* Thu Apr 13 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev22-1mdk
- 3.1.6dev22.

* Fri Mar 31 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev20-3mdk
- Fix completion of rpm with -qp*.

* Mon Mar 27 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev20-2mdk
- Upgrade zshguide.

* Sat Mar 25 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev20-1mdk
- 3.1.6-dev20

* Wed Mar 22 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev19-3mdk
- Move global configuration here.
- Adjust groups.

* Tue Feb 22 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev19-2mdk
- Add new zshguide from pws.
- Separate the doc to the doc package

* Sun Feb 20 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev19-1mdk
- Clean Up spec (thanks specs-helper).
- Remove all our patchs (now all is commited to upstream main).
- 3.1.6dev19.

* Fri Feb 18 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev18-3mdk
- Recompile with glibc2.1.3 (first one).

* Thu Feb 17 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev18-2mdk
- Add --freshen completion.

* Tue Feb 15 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev18-1mdk
- Fix descriptions and summary.
- 3.1.6dev18.

* Thu Feb 10 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev17-2mdk
- Remove Makefile in %doc.
- BuildRequires: autoconf tetex.
- Lot of modications in the default config as suggested by Bart
  Schaefer <schaefer@zsh.org>.
- 3.1.6dev17.

* Mon Jan 24 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev16-1mdk
- dev16.
- Redo the tar_archive patchs.

* Tue Jan 18 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev15-1mdk
- dev15.
- Fix doc generation with dev15.
- remove META-FAQ.
- disable lfs on sparc.

* Thu Jan  6 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6dev14-1mdk
- dev14 (note the name change).

* Mon Jan  3 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 3.1.6pws13-3mdk
- Remove temporary files.

* Fri Dec 31 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- 3.1.6pws13 (mainly bug fixes).
- fix %post.
- fix rpm completion

* Thu Dec 09 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- 3.1.6pws11 (mainly bug fixes).

* Tue Dec  7 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Add run-help and perl-build the documentation.

* Tue Nov 30 1999 Francis Galiegue <francis@mandrakesoft.com>

- Completion machine patch - we use GNU make and GNU tar
- Small fix to %post script

* Tue Nov 30 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- 3.1.6pws10
- Fix zprofile.
- Clean-up Franciseries.
- Clean-up specs.

* Mon Nov 29 1999 Francis Galiegue <francis@mandrakesoft.com>
- Grrr... Rebuilt on kenobi, toy ain't a cooker

* Mon Nov 29 1999 Francis Galiegue <francis@mandrakesoft.com>

- Completion system now handles bzip2'ed manpages and tarballs
- Some cool options

* Wed Nov 10 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Add zshguide.txt to documentation.

* Thu Oct 07 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>

- Fix bug in %{_sysconfdir}/zsh use USERNAME instead of USER.
- Improve %{_sysconfdir}/z* to source the /etc/profile.d/ files.

* Mon Oct 04 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>

- 3.1.6-pws6
- Fix bad link.
- Fix bad manpages.

* Tue Aug 17 1999 Thierry Vignaud <tvignaud@mandrakesoft.com>
- fix typo in examples directory name

* Sun Aug  8 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>

- Copy documentation (yes a lot).
- Remove the completion machine and put them in [[ {etc,root}(skel|files) ]] package.

* Sat Aug  7 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>

- By defaut we launch the completion machine.
- Put zsh in %{_bindir}/
- Rewrite of Spec file for this new major version.

# end of file