rpms/boinc-client/F-8 boinc-client, NONE, 1.1 boinc-client.spec, 1.2, 1.3
Miloš Jakubíček (mjakubicek)
fedora-extras-commits at redhat.com
Tue Apr 8 11:23:07 UTC 2008
Author: mjakubicek
Update of /cvs/pkgs/rpms/boinc-client/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8846
Modified Files:
boinc-client.spec
Added Files:
boinc-client
Log Message:
- Using --with-boinc-platform=i686-pc-linux-gnu on i386 instead of --build,
--host, --target
- Added bash completion script.
--- NEW FILE boinc-client ---
# Source this file in bash to get command completion (using tab)
# for boinc_client and boinc_cmd
# Written by Frank S. Thomas
_boinc_client()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="$(boinc_client --help | \
sed -n -r 's/^[[:space:]]*(--[a-z_]*).*/\1/p')"
# Handle options that require one or more arguments.
case "$prev" in
--attach_project|--detach_project|--reset_project|--update_prefs|\
--gui_rpc_port)
return 0
;;
esac
# Handle options that require two arguments.
if [[ COMP_CWORD -gt 1 ]]; then
pprev="${COMP_WORDS[COMP_CWORD-2]}"
case "$pprev" in
--attach_project)
return 0
;;
esac
fi
if [[ "$cur" == -* ]]; then
COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
return 0
fi
}
complete -F _boinc_client -o default boinc_client
_boinc_cmd()
{
local cur prev opts cmds
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="--host --passwd -h --help -V --version"
cmds="$(boinc_cmd --help 2>&1 | \
sed -n -r 's/^[[:space:]]*(--[a-z_]*).*/\1/p')"
# The following construct assures that:
# - no command follows if one of $opts or $cmds was given
# - after --host follows only one command or --passwd and one command
# - after --passwd follows only one command
if [[ $COMP_CWORD -eq 1 ]]; then
COMPREPLY=( $(compgen -W "$opts $cmds" -- "$cur") )
return 0
else
if [[ "${COMP_WORDS[@]}" =~ ".* --host .* --passwd .*" ]]; then
if [[ $COMP_CWORD -eq 5 ]]; then
COMPREPLY=( $(compgen -W "$cmds" -- "$cur") )
fi
elif [[ "${COMP_WORDS[@]}" =~ ".* --passwd .*" ]]; then
if [[ $COMP_CWORD -eq 3 ]]; then
COMPREPLY=( $(compgen -W "$cmds" -- "$cur") )
fi
elif [[ "${COMP_WORDS[@]}" =~ ".* --host .*" ]]; then
if [[ $COMP_CWORD -eq 3 ]]; then
COMPREPLY=( $(compgen -W "--passwd $cmds" -- "$cur") )
fi
fi
fi
# Handle options/commands that require one or more arguments.
case "$prev" in
--get_messages|--passwd)
return 0
;;
--host)
_known_hosts
return 0
;;
--set_run_mode|--set_network_mode)
COMPREPLY=( $(compgen -W "always auto never" -- "$cur") )
return 0
;;
--set_screensaver_mode)
COMPREPLY=( $(compgen -W "on off" -- "$cur") )
return 0
;;
esac
}
complete -F _boinc_cmd boinc_cmd
# vim: syntax=sh
Index: boinc-client.spec
===================================================================
RCS file: /cvs/pkgs/rpms/boinc-client/F-8/boinc-client.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- boinc-client.spec 3 Apr 2008 23:52:16 -0000 1.2
+++ boinc-client.spec 8 Apr 2008 11:22:29 -0000 1.3
@@ -4,7 +4,7 @@
Summary: The BOINC client core
Name: boinc-client
Version: 5.10.45
-Release: 5.%{snap}svn%{?dist}
+Release: 6.%{snap}svn%{?dist}
License: LGPLv2+
Group: Applications/Engineering
URL: http://boinc.berkeley.edu/
@@ -30,6 +30,7 @@
Source8: trim
Source9: noexec
Source10: unicode
+Source11: boinc-client
Patch0: boinc-gcc43.patch
Patch1: boinc-gccflags.patch
@@ -99,7 +100,7 @@
%build
%ifarch i386
-%configure --disable-static --enable-unicode --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu --target=i686-redhat-linux-gnu
+%configure --disable-static --enable-unicode --with-boinc-platform=i686-pc-linux-gnu
%else
%configure --disable-static --enable-unicode
%endif
@@ -170,6 +171,10 @@
%find_lang BOINC-Manager
+# bash-completion
+
+install -Dp -m644 %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/boinc-client
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -206,6 +211,7 @@
%files
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
+%config(noreplace) %{_sysconfdir}/bash_completion.d/
%doc COPYING
%doc COPYRIGHT
%doc checkin_notes
@@ -251,6 +257,11 @@
%changelog
+* Mon Apr 07 2008 Milos Jakubicek <xjakub at fi.muni.cz> - 5.10.45-6.20080315svn
+- Using --with-boinc-platform=i686-pc-linux-gnu on i386 instead of --build,
+ --host, --target
+- Added bash completion script.
+
* Fri Apr 04 2008 Milos Jakubicek <xjakub at fi.muni.cz> - 5.10.45-5.20080315svn
- Fixed build on i386 since it needs to be configured as i686-pc-linux-gnu
and not i386-pc-linux-gnu.
More information about the fedora-extras-commits
mailing list