X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=zsh.spec;h=b4f15f2e8fad61cf42054f730532208489696957;hb=424f1ac6d3a6d69ad33caf25e7e125a033779735;hp=c176fea57a50bd63d4583052fd8c9aa2e348e034;hpb=4f66490855e26abdd4210376623383ba80017d76;p=packages%2Fzsh.git diff --git a/zsh.spec b/zsh.spec index c176fea..b4f15f2 100644 --- a/zsh.spec +++ b/zsh.spec @@ -1,9 +1,8 @@ -# $Revision: 1.57 $ $Date: 2002-11-17 01:29:47 $ # # Conditional build: # _without_static - without static version # -Summary: Enhanced bourne shell +Summary: Enhanced Bourne shell Summary(de): Enhanced Bourne Shell Summary(es): Shell bourne mejorada Summary(fr): Bourne shell amélioré @@ -13,31 +12,37 @@ Summary(ru): Summary(tr): Geliþmiþ bir BASH sürümü Summary(uk): ëÏÍÁÎÄÎÉÊ ÐÒÏÃÅÓÏÒ (shell) ÓÈÏÖÉÊ ÎÁ ksh, ÁÌÅ Ú ÐÏËÒÁÝÅÎÎÑÍÉ Name: zsh -Version: 4.0.6 -Release: 3 +Version: 4.1.1 +Release: 7 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 +# Source0-md5: 48958b1a3fc86261a26eea40a4f7d4af Source1: %{name}.1.pl Source2: http://zsh.sunsite.dk/Guide/zshguide.pdf +# Source2-md5: 0d80ba1ef39052c512cfabf368f3bf20 Patch0: %{name}-info.patch Patch1: %{name}-tinfo.patch Patch2: %{name}-addons.patch Patch3: %{name}-paths.patch Patch4: %{name}-no_nis.patch -PreReq: grep -PreReq: fileutils +Patch5: %{name}-completions.patch +Patch6: %{name}-zle_misc.patch BuildRequires: autoconf -BuildRequires: ncurses-devel >= 5.1 -BuildRequires: texinfo %{!?_without_static:BuildRequires: glibc-static} +BuildRequires: libcap-devel +BuildRequires: ncurses-devel >= 5.1 %{!?_without_static:BuildRequires: ncurses-static} +BuildRequires: pcre-devel +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 %define _bindir /bin +%define specflags_ia32 "-fomit-frame-pointer" %description zsh is an enhanced version of the Bourne shell with csh additions and @@ -99,11 +104,12 @@ Ten pakiet zawiera pliki wymagane przez zsh dla zaawansowanej TAB-completion. %package static -Summary: Statically linked Enhanced bourne shell -Summary(pl): Zaawansowany bourne SHell - linkowany statycznie +Summary: Statically linked Enhanced Bourne shell +Summary(pl): Zaawansowana pow³oka Bourne'a - skonsolidowana 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 @@ -111,8 +117,8 @@ most features of ksh, bash, and tcsh. %description static -l pl zsh jest ulepszon± pow³ok± Bourne'a z elementami pow³oki csh. Posiada -wiêkszo¶æ cech ksh, bash i tcsh. W tym pakiecie jest statycznie -linkowany. +wiêkszo¶æ cech ksh, bash i tcsh. W tym pakiecie jest wersja +skonsolidowana statycznie. %package guide Summary: A User's Guide to the Z-Shell @@ -133,6 +139,8 @@ Podr %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p0 install %{SOURCE2} . @@ -141,9 +149,12 @@ install %{SOURCE2} . %if %{!?_without_static:1}%{?_without_static:0} LDFLAGS="%{rpmldflags} -static" -%configure -%{__make} +%configure \ + --disable-dynamic +%{__make} \ + DLLDFLAGS="" mv -f Src/zsh Src/zsh.static +%{__make} clean || : LDFLAGS="%{rpmldflags}" %endif @@ -151,13 +162,15 @@ LDFLAGS="%{rpmldflags}" --enable-maildir-support %{__make} -(cd Doc; makeinfo zsh.texi) +cd Doc +makeinfo zsh.texi %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_infodir},%{_sysconfdir},%{_bindir},%{_mandir}/pl/man1} -%{__make} install DESTDIR=$RPM_BUILD_ROOT +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT %{!?_without_static:install Src/zsh.static $RPM_BUILD_ROOT%{_bindir}} install Doc/zsh.info* $RPM_BUILD_ROOT%{_infodir} @@ -166,14 +179,48 @@ 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 +# System wide functions and aliases +# Environment stuff goes in /etc/profile + +# Aliases: +alias which=whence +alias cd='builtin cd' +alias precmd=' precmd' + +setopt histignorespace + +# Setup key bindings: +bindkey -e >/dev/null 2>&1 + +bindkey \`tput khome\` beginning-of-line >/dev/null 2>&1 +bindkey \`tput kend\` end-of-line >/dev/null 2>&1 +bindkey \`tput kich1\` quoted-insert >/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 + +case "$TERM" in + xterm*) + precmd () { print -Pn "\e]0;%n@%m: %~\a"i; } + ;; +esac +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 @@ -181,21 +228,18 @@ else fi [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} > /dev/null 2>&1 -%pre -rm -rf %{_datadir}/zsh/latest -ln -s %{_datadir}/zsh/%{version} %{_datadir}/zsh/latest - %preun if [ "$1" = "0" ]; then + umask 022 grep -v '^%{_bindir}/zsh$' /etc/shells > /etc/shells.new mv -f /etc/shells.new /etc/shells fi -rm -rf %{_datadir}/zsh/latest %postun [ ! -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 @@ -204,13 +248,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 @@ -218,13 +260,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*