]> git.pld-linux.org Git - packages/zsh.git/blobdiff - zsh.spec
- added -Os to %optflags
[packages/zsh.git] / zsh.spec
index 0e7972e89f2e3372cbbde99e5fb07de78c3424e4..d053b04f4dcf4a1c1741b0b72324c898e8290690 100644 (file)
--- a/zsh.spec
+++ b/zsh.spec
@@ -1,4 +1,4 @@
-# $Revision: 1.55 $ $Date: 2002-08-24 09:31:15 $
+# $Revision: 1.65 $ $Date: 2003-04-24 11:54:34 $
 #
 # Conditional build:
 # _without_static      - without static version
@@ -14,25 +14,28 @@ Summary(tr):        Geli
 Summary(uk):   ëÏÍÁÎÄÎÉÊ ÐÒÏÃÅÓÏÒ (shell) ÓÈÏÖÉÊ ÎÁ ksh, ÁÌÅ Ú ÐÏËÒÁÝÅÎÎÑÍÉ
 Name:          zsh
 Version:       4.0.6
-Release:       1
+Release:       4
 License:       BSD-like
 Group:         Applications/Shells
 URL:           http://www.zsh.org/
-Source0:       ftp://ftp.zsh.org/pub/zsh/%{name}-%{version}.tar.gz
+Source0:       ftp://ftp.zsh.org/pub/zsh/%{name}-%{version}.tar.bz2
 Source1:       %{name}.1.pl
+Source2:       http://zsh.sunsite.dk/Guide/zshguide.pdf
 Patch0:                %{name}-info.patch
 Patch1:                %{name}-tinfo.patch
 Patch2:                %{name}-addons.patch
 Patch3:                %{name}-paths.patch
 Patch4:                %{name}-no_nis.patch
+Patch5:                %{name}-completions.patch
 PreReq:                grep
 PreReq:                fileutils
 BuildRequires: autoconf
-BuildRequires: ncurses-devel >= 5.1
-BuildRequires: texinfo
 %{!?_without_static:BuildRequires:     glibc-static}
+BuildRequires: ncurses-devel >= 5.1
 %{!?_without_static:BuildRequires:     ncurses-static}
+BuildRequires: texinfo
 Requires(post,preun):  grep
+Requires(preun):       fileutils
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Obsoletes:     zsh-doc-html, zsh-doc-ps, zsh-doc-dvi
 
@@ -101,8 +104,9 @@ TAB-completion.
 Summary:       Statically linked Enhanced bourne shell
 Summary(pl):   Zaawansowany bourne SHell - linkowany statycznie
 Group:         Applications/Shells
-Requires:      %{name} = %{version}
 Requires(post,preun):  grep
+Requires(preun):       fileutils
+Requires:      %{name} = %{version}
 
 %description static
 zsh is an enhanced version of the Bourne shell with csh additions and
@@ -113,6 +117,18 @@ zsh jest ulepszon
 wiêkszo¶æ cech ksh, bash i tcsh. W tym pakiecie jest statycznie
 linkowany.
 
+%package guide
+Summary:       A User's Guide to the Z-Shell
+Summary(pl):   Podrêcznik U¿ytkownika Z-Shella
+Group:         Applications/Shells
+URL:           http://zsh.sunsite.dk/Guide/
+
+%description guide
+A User's Guide to the Z-Shell.
+
+%description guide -l pl
+Podrêcznik U¿ytkownika Z-Shella.
+
 %prep
 %setup -q
 %patch0 -p1
@@ -120,10 +136,16 @@ linkowany.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
+
+install %{SOURCE2} .
 
 %build
 %{__autoconf}
 
+newoptflags="%{optflags} -Os -fomit-frame-pointer"
+%define optflags $newoptflags
+
 %if %{!?_without_static:1}%{?_without_static:0}
 LDFLAGS="%{rpmldflags} -static"
 %configure
@@ -136,7 +158,8 @@ LDFLAGS="%{rpmldflags}"
        --enable-maildir-support
 %{__make}
 
-(cd Doc; makeinfo zsh.texi)
+cd Doc
+makeinfo zsh.texi
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -151,14 +174,33 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/{zlogout,zlogin,zshenv}
 echo "setopt no_function_argzero" > $RPM_BUILD_ROOT%{_sysconfdir}/zprofile
 echo ". %{_sysconfdir}/profile" >> $RPM_BUILD_ROOT%{_sysconfdir}/zprofile
 
-echo -e "PS1='[%%n@%%m %%~]%%(!.#.%%\\$) '\nbindkey -e >/dev/null 2>&1\nalias which=whence" > \
-                                               $RPM_BUILD_ROOT%{_sysconfdir}/zshrc
+cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/zshrc
+PS1='[%%n@%%m %%~]%%(!.#.%%\\$) '
+bindkey -e >/dev/null 2>&1
+alias which=whence
+
+# xterm
+bindkey \`tput khome\` beginning-of-line >/dev/null 2>&1
+bindkey \`tput kend\` end-of-line >/dev/null 2>&1
+bindkey \`tput kdch1\` delete-char >/dev/null 2>&1
+bindkey \`tput kpp\` up-history >/dev/null 2>&1
+bindkey \`tput knp\` end-of-history >/dev/null 2>&1
+bindkey \`tput kcuu1\` history-beginning-search-backward >/dev/null 2>&1
+bindkey \`tput kcud1\` history-beginning-search-forward >/dev/null 2>&1
+EOF
 
 rm -f Etc/Makefile*
 find Functions Util StartupFiles -name .distfiles -o -name .cvsignore | xargs rm -f
 install %{SOURCE1} $RPM_BUILD_ROOT%{_mandir}/pl/man1/zsh.1
 
+# for kdesdk's completion
+ln -sf %{version} $RPM_BUILD_ROOT%{_datadir}/zsh/latest
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
 %post
+umask 022
 if [ ! -f /etc/shells ]; then
        echo "%{_bindir}/zsh" >> /etc/shells
 else
@@ -168,6 +210,7 @@ fi
 
 %preun
 if [ "$1" = "0" ]; then
+       umask 022
        grep -v '^%{_bindir}/zsh$' /etc/shells > /etc/shells.new
        mv -f /etc/shells.new /etc/shells
 fi
@@ -176,6 +219,7 @@ fi
 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1
 
 %post static
+umask 022
 if [ ! -f /etc/shells ]; then
        echo "%{_bindir}/zsh.static" >> /etc/shells
 else
@@ -184,13 +228,11 @@ fi
 
 %preun static
 if [ "$1" = "0" ]; then
+       umask 022
        grep -v '^%{_bindir}/zsh\.static$' /etc/shells > /etc/shells.new
        mv -f /etc/shells.new /etc/shells
 fi
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %files
 %defattr(644,root,root,755)
 %doc Etc/* README LICENCE ChangeLog META-FAQ Util StartupFiles
@@ -198,13 +240,14 @@ rm -rf $RPM_BUILD_ROOT
 %config(noreplace,missingok) %verify(not md5 size mtime) %{_sysconfdir}/*
 %dir %{_libdir}/zsh
 %dir %{_libdir}/zsh/%{version}
-%dir %{_datadir}/zsh/
+%dir %{_datadir}/zsh
 %dir %{_datadir}/zsh/site-functions
+%{_datadir}/zsh/latest
 %dir %{_datadir}/zsh/%{version}
 %dir %{_datadir}/zsh/%{version}/functions
-%{_datadir}/zsh/%{version}/functions/[^_c]*
-%{_datadir}/zsh/%{version}/functions/c[^o]*
-%{_datadir}/zsh/%{version}/functions/co[^m]*
+%{_datadir}/zsh/%{version}/functions/[!_c]*
+%{_datadir}/zsh/%{version}/functions/c[!o]*
+%{_datadir}/zsh/%{version}/functions/co[!m]*
 %attr(755,root,root) %{_libdir}/zsh/%{version}/*
 %{_infodir}/zsh.info*
 %{_mandir}/man1/zsh*.1*
@@ -215,6 +258,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/zsh/%{version}/functions/comp*
 %{_datadir}/zsh/%{version}/functions/_*
 
+%files guide
+%defattr(644,root,root,755)
+%doc zshguide.pdf
+
 %if %{!?_without_static:1}%{?_without_static:0}
 %files static
 %defattr(644,root,root,755)
This page took 0.078799 seconds and 4 git commands to generate.