diff --git a/trim-unneeded-completions.patch b/trim-unneeded-completions.patch new file mode 100644 index 0000000..0ad96f2 --- /dev/null +++ b/trim-unneeded-completions.patch @@ -0,0 +1,13 @@ +Index: zsh-5.0.2/Src/Zle/complete.mdd +=================================================================== +--- zsh-5.0.2.orig/Src/Zle/complete.mdd ++++ zsh-5.0.2/Src/Zle/complete.mdd +@@ -1,7 +1,7 @@ + name=zsh/complete + link=either + load=yes +-functions='Completion/*comp* Completion/AIX/*/* Completion/BSD/*/* Completion/Base/*/* Completion/Cygwin/*/* Completion/Darwin/*/* Completion/Debian/*/* Completion/Linux/*/* Completion/Mandriva/*/* Completion/Redhat/*/* Completion/Solaris/*/* Completion/openSUSE/*/* Completion/Unix/*/* Completion/X/*/* Completion/Zsh/*/*' ++functions='Completion/*comp* Completion/Base/*/* Completion/Linux/*/* Completion/openSUSE/*/* Completion/Unix/*/* Completion/X/*/* Completion/Zsh/*/*' + + moddeps="zsh/zle" + diff --git a/zsh.changes b/zsh.changes index 8f2d380..5fc2be0 100644 --- a/zsh.changes +++ b/zsh.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 21 10:17:56 UTC 2013 - idonmez@suse.com + +- Fix custom completion support via /etc/zsh_completion.d +- Add trim-unneeded-completions.patch to remove unneeded completions + when building for openSUSE + ------------------------------------------------------------------- Sun Jan 27 20:53:10 UTC 2013 - dmitry_r@opensuse.org diff --git a/zsh.spec b/zsh.spec index a80741b..9b94ff5 100644 --- a/zsh.spec +++ b/zsh.spec @@ -38,6 +38,7 @@ Source17: zshprompt.pl %endif Patch1: zsh-zypper-completion.patch Patch2: zsh-osc-suseversion.patch +Patch3: trim-unneeded-completions.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} Requires(pre): %{install_info_prereq} @@ -95,6 +96,9 @@ This package contains the Zsh manual in html format. %setup -q -n %{name}-%{version} %patch1 -p1 %patch2 -p1 +%if 0%{?suse_version} +%patch3 -p1 +%endif # Remove executable bit chmod 0644 Etc/changelog2html.pl @@ -111,8 +115,9 @@ perl -p -i -e 's|/usr/local/bin|%{_bindir}|' \ %build %configure \ - --enable-site-scriptdir=%{_datadir}/%{name}/site/scripts/ \ - --enable-site-fndir=%{_datadir}/%{name}/site/scripts/ \ + --enable-fndir=%{_datadir}/%{name}/${version}/functions \ + --enable-site-fndir=%{_datadir}/%{name}/site-functions \ + --enable-function-subdirs \ --enable-maildir-support \ --with-tcsetpgrp \ --enable-cap \ diff --git a/zshrc b/zshrc index a7061b0..b2ec51c 100644 --- a/zshrc +++ b/zshrc @@ -3,9 +3,7 @@ source /etc/bash.bashrc # Custom completion support via /etc/zsh_completion.d -for i in /etc/zsh_completion.d/*(N); do - test -r $i && . $i -done +fpath=( $fpath /etc/zsh_completion.d ) # zsh line editing : ${ZSHEDIT:="emacs"}