[lrzip] 0.607 bump
Petr Pisar
ppisar at fedoraproject.org
Mon Sep 19 09:06:44 UTC 2011
commit a11df81310519d051723ae3dbb5049eb14ca8871
Author: Petr Písař <ppisar at redhat.com>
Date: Mon Sep 19 10:30:23 2011 +0200
0.607 bump
.gitignore | 1 +
lrzip-0.607-bash_completion_installation.patch | 334 ++++++++++++++++++++++++
lrzip.spec | 12 +-
sources | 2 +-
4 files changed, 347 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5b54cc0..e04a160 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@ lrzip-0.46.tar.bz2
/lrzip-0.604.tar.bz2
/lrzip-0.605.tar.bz2
/lrzip-0.606.tar.bz2
+/lrzip-0.607.tar.bz2
diff --git a/lrzip-0.607-bash_completion_installation.patch b/lrzip-0.607-bash_completion_installation.patch
new file mode 100644
index 0000000..c5fc365
--- /dev/null
+++ b/lrzip-0.607-bash_completion_installation.patch
@@ -0,0 +1,334 @@
+From 79c2e9accdca91c3b43adb9baac8523adf6cb4c9 Mon Sep 17 00:00:00 2001
+From: Con Kolivas <kernel at kolivas.org>
+Date: Sat, 17 Sep 2011 17:46:55 +1000
+Subject: [PATCH 1/2] Fix bash completion installation.
+
+---
+ Makefile.am | 20 ++++----
+ bash_completion.d/lrzip | 119 +++++++++++++++++++++++++++++++++++++++++++++++
+ lrzip.completion | 119 -----------------------------------------------
+ 3 files changed, 129 insertions(+), 129 deletions(-)
+ create mode 100644 bash_completion.d/lrzip
+ delete mode 100644 lrzip.completion
+
+diff --git a/Makefile.am b/Makefile.am
+index 89a9518..01a88a7 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -25,7 +25,7 @@ SUBDIRS = lzma man doc
+
+ AM_CFLAGS = -I lzma/C -DNDEBUG
+
+-lrztardir = @bindir@
++lrztardir = $(bindir)
+ lrztar_SCRIPTS = lrztar
+
+ bin_PROGRAMS = lrzip
+@@ -72,19 +72,19 @@ EXTRA_DIST = \
+ description-pak \
+ autogen.sh \
+ INSTALL \
+- lrzip.completion \
++ bash_completion.d/lrzip \
+ $(dist_doc_DATA)
+
+-install-data-hook:
+- test -d /etc/bash_completion.d && @INSTALL_DATA@ lrzip.completion /etc/bash_completion.d/lrzip
++completiondir = $(DESTDIR)/$(sysconfdir)/bash_completion.d
++completion_DATA = @top_srcdir@/bash_completion.d/lrzip
+
+ install-exec-hook:
+- $(LN_S) -f lrzip$(EXEEXT) $(DESTDIR)@bindir@/lrunzip$(EXEEXT)
+- $(LN_S) -f lrzip$(EXEEXT) $(DESTDIR)@bindir@/lrzcat$(EXEEXT)
+- $(LN_S) -f lrztar$(EXEEXT) $(DESTDIR)@bindir@/lrzuntar$(EXEEXT)
++ $(LN_S) -f lrzip$(EXEEXT) $(DESTDIR)$(bindir)/lrunzip$(EXEEXT)
++ $(LN_S) -f lrzip$(EXEEXT) $(DESTDIR)$(bindir)/lrzcat$(EXEEXT)
++ $(LN_S) -f lrztar$(EXEEXT) $(DESTDIR)$(bindir)/lrzuntar$(EXEEXT)
+
+
+ uninstall-local:
+- rm -f @bindir@/lrunzip
+- rm -f @bindir@/lrzcat
+- rm -f @bindir@/lrzuntar
++ rm -f $(bindir)/lrunzip
++ rm -f $(bindir)/lrzcat
++ rm -f $(bindir)/lrzuntar
+diff --git a/bash_completion.d/lrzip b/bash_completion.d/lrzip
+new file mode 100644
+index 0000000..129c9ee
+--- /dev/null
++++ b/bash_completion.d/lrzip
+@@ -0,0 +1,119 @@
++#-*- mode: shell-script;-*-
++# Inputs:
++# $1 -- name of the command whose arguments are being completed
++# $2 -- word being completed
++# $3 -- word preceding the word being completed
++# $COMP_LINE -- current command line
++# $COMP_PONT -- cursor position
++# $COMP_WORDS -- array containing individual words in the current
++# command line
++# $COMP_CWORD -- index into ${COMP_WORDS} of the word containing the
++# current cursor position
++# Output:
++# COMPREPLY array variable contains possible completions
++#
++# Copyright (C) 2011 Fernando Auil <troesmix at gmail.com>
++# Author: Fernando Auil <troesmix at gmail.com>
++# Last revision: 25Jun2011
++
++have lrzip &&
++_lrzip()
++{
++local cpu_count win_size
++local general_opts output_opts compress_opts level_opts options special special2
++
++# Get the CPU count.
++cpu_count=$(grep -c ^processor /proc/cpuinfo)
++
++# This is aproximately the heuristical window size (in MB) for the
++# non-STDIN case (which is more conservative?).
++win_size=$(awk '/MemTotal/{print$2}' /proc/meminfo)
++win_size=$((win_size >> 17))
++
++general_opts='-c -d -e -h -? -H -i -q -t -v -vv -V'
++output_opts='-D -f -k -o -O -S'
++compress_opts='-b -g -l -n -z'
++level_opts='-L -N -p -T -U -w'
++
++COMPREPLY=()
++cur=${COMP_WORDS[COMP_CWORD]}
++prev=${COMP_WORDS[COMP_CWORD-1]}
++
++ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
++ if [[ ${COMP_WORDS[i]} == @(-b|-g|-l|-n|-z) ]]; then
++ special=${COMP_WORDS[i]}
++ elif [[ ${COMP_WORDS[i]} == @(-U) ]]; then
++ special2=${COMP_WORDS[i]}
++ fi
++ done
++
++ if [ -n "$special" ]; then
++ unset compress_opts
++ fi
++
++ if [ -n "$special2" ]; then
++ level_opts='-L -N -p -T -U'
++ fi
++
++options="$general_opts $output_opts $level_opts $compress_opts"
++
++case "$prev" in
++
++-L)
++COMPREPLY=( $(compgen -W "$(seq 9)" -- $cur) )
++return 0
++;;
++
++-N)
++COMPREPLY=( $(compgen -W "$(seq -20 19)" -- $cur) )
++return 0
++;;
++
++-S)
++COMPREPLY=( $(compgen -W ".lrz" -- $cur) )
++return 0
++;;
++
++-p)
++COMPREPLY=( $(compgen -W "$cpu_count" -- $cur) )
++return 0
++;;
++
++-w)
++COMPREPLY=( $(compgen -W "$win_size" -- $cur) )
++return 0
++;;
++
++# Dirnames options.
++-O)
++_filedir -d
++return 0
++;;
++
++# Filenames options.
++-o)
++#_longopt $filenames
++_filedir
++return 0
++;;
++
++# Exit options.
++-h|-\?|-V)
++COMPREPLY=()
++return 0
++;;
++
++esac
++
++if [[ "$cur" = -* ]]; then
++ COMPREPLY=( $(compgen -W "$options" -- $cur) )
++ return 0
++else
++ _filedir
++ return 0
++fi
++}
++
++[ "$have" ] && complete -F _lrzip $filenames lrzip
++
++:
+diff --git a/lrzip.completion b/lrzip.completion
+deleted file mode 100644
+index 129c9ee..0000000
+--- a/lrzip.completion
++++ /dev/null
+@@ -1,119 +0,0 @@
+-#-*- mode: shell-script;-*-
+-# Inputs:
+-# $1 -- name of the command whose arguments are being completed
+-# $2 -- word being completed
+-# $3 -- word preceding the word being completed
+-# $COMP_LINE -- current command line
+-# $COMP_PONT -- cursor position
+-# $COMP_WORDS -- array containing individual words in the current
+-# command line
+-# $COMP_CWORD -- index into ${COMP_WORDS} of the word containing the
+-# current cursor position
+-# Output:
+-# COMPREPLY array variable contains possible completions
+-#
+-# Copyright (C) 2011 Fernando Auil <troesmix at gmail.com>
+-# Author: Fernando Auil <troesmix at gmail.com>
+-# Last revision: 25Jun2011
+-
+-have lrzip &&
+-_lrzip()
+-{
+-local cpu_count win_size
+-local general_opts output_opts compress_opts level_opts options special special2
+-
+-# Get the CPU count.
+-cpu_count=$(grep -c ^processor /proc/cpuinfo)
+-
+-# This is aproximately the heuristical window size (in MB) for the
+-# non-STDIN case (which is more conservative?).
+-win_size=$(awk '/MemTotal/{print$2}' /proc/meminfo)
+-win_size=$((win_size >> 17))
+-
+-general_opts='-c -d -e -h -? -H -i -q -t -v -vv -V'
+-output_opts='-D -f -k -o -O -S'
+-compress_opts='-b -g -l -n -z'
+-level_opts='-L -N -p -T -U -w'
+-
+-COMPREPLY=()
+-cur=${COMP_WORDS[COMP_CWORD]}
+-prev=${COMP_WORDS[COMP_CWORD-1]}
+-
+- for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+- if [[ ${COMP_WORDS[i]} == @(-b|-g|-l|-n|-z) ]]; then
+- special=${COMP_WORDS[i]}
+- elif [[ ${COMP_WORDS[i]} == @(-U) ]]; then
+- special2=${COMP_WORDS[i]}
+- fi
+- done
+-
+- if [ -n "$special" ]; then
+- unset compress_opts
+- fi
+-
+- if [ -n "$special2" ]; then
+- level_opts='-L -N -p -T -U'
+- fi
+-
+-options="$general_opts $output_opts $level_opts $compress_opts"
+-
+-case "$prev" in
+-
+--L)
+-COMPREPLY=( $(compgen -W "$(seq 9)" -- $cur) )
+-return 0
+-;;
+-
+--N)
+-COMPREPLY=( $(compgen -W "$(seq -20 19)" -- $cur) )
+-return 0
+-;;
+-
+--S)
+-COMPREPLY=( $(compgen -W ".lrz" -- $cur) )
+-return 0
+-;;
+-
+--p)
+-COMPREPLY=( $(compgen -W "$cpu_count" -- $cur) )
+-return 0
+-;;
+-
+--w)
+-COMPREPLY=( $(compgen -W "$win_size" -- $cur) )
+-return 0
+-;;
+-
+-# Dirnames options.
+--O)
+-_filedir -d
+-return 0
+-;;
+-
+-# Filenames options.
+--o)
+-#_longopt $filenames
+-_filedir
+-return 0
+-;;
+-
+-# Exit options.
+--h|-\?|-V)
+-COMPREPLY=()
+-return 0
+-;;
+-
+-esac
+-
+-if [[ "$cur" = -* ]]; then
+- COMPREPLY=( $(compgen -W "$options" -- $cur) )
+- return 0
+-else
+- _filedir
+- return 0
+-fi
+-}
+-
+-[ "$have" ] && complete -F _lrzip $filenames lrzip
+-
+-:
+--
+1.7.6.2
+
+
+From 64be4018b43b58357137538976d9b85d79307761 Mon Sep 17 00:00:00 2001
+From: Con Kolivas <kernel at kolivas.org>
+Date: Sun, 18 Sep 2011 09:30:44 +1000
+Subject: [PATCH 2/2] Try again to fix the bash completion installation.
+
+---
+ Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 01a88a7..a613a48 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -75,7 +75,7 @@ EXTRA_DIST = \
+ bash_completion.d/lrzip \
+ $(dist_doc_DATA)
+
+-completiondir = $(DESTDIR)/$(sysconfdir)/bash_completion.d
++completiondir = $(sysconfdir)/bash_completion.d
+ completion_DATA = @top_srcdir@/bash_completion.d/lrzip
+
+ install-exec-hook:
+--
+1.7.6.2
+
diff --git a/lrzip.spec b/lrzip.spec
index ad8795f..0771fdb 100644
--- a/lrzip.spec
+++ b/lrzip.spec
@@ -1,5 +1,5 @@
Name: lrzip
-Version: 0.606
+Version: 0.607
Release: 1%{?dist}
Summary: Compression program optimized for large files
@@ -7,7 +7,11 @@ Group: Applications/File
License: GPLv2+
URL: http://ck.kolivas.org/apps/%{name}/
Source0: http://ck.kolivas.org/apps/%{name}/%{name}-%{version}.tar.bz2
+# Fix bash completion installation, in upstream after 0.607
+Patch0: %{name}-0.607-bash_completion_installation.patch
+# automake for %%{name}-0.607-bash_completition_installation.patch
+BuildRequires: automake
BuildRequires: bzip2-devel lzo-devel perl zlib-devel
%ifarch x86
BuildRequires: nasm
@@ -26,6 +30,7 @@ than bzip2). Decompression is always much faster than bzip2.
%prep
%setup -q
+%patch0 -p1 -b .completition
for F in lzma/history.txt; do
iconv -f ISO-8859-1 -t UTF-8 < "$F" > "${F}.utf8"
touch -r "$F" "${F}.utf8"
@@ -49,11 +54,16 @@ make install DESTDIR=$RPM_BUILD_ROOT
%defattr(-,root,root,-)
%{docdir}
%{_bindir}/*
+%{_sysconfdir}/bash_completion.d
%{_mandir}/man1/*.1.gz
%{_mandir}/man5/*.5.gz
%changelog
+* Mon Sep 19 2011 Petr Pisar <ppisar at redhat.com> - 0.607-1
+- 0.607 bump
+- Fix bash completion installation
+
* Mon May 16 2011 Petr Pisar <ppisar at redhat.com> - 0.606-1
- 0.606 bump
diff --git a/sources b/sources
index 762d25b..f90dfdb 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-eb2462b824b068eb9be3ea8070326579 lrzip-0.606.tar.bz2
+c6566d134bc5a86c874eb34a883b7f5c lrzip-0.607.tar.bz2
More information about the scm-commits
mailing list