1 From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2 Date: Thu, 16 Aug 2012 14:28:28 +0300
3 Subject: openSUSE HACK: enable special upstream bzip2
5 This is a hack for openSUSE that makes pristine-bz2 use a special
6 (pristine-tar-specific) bzip2. Otherwise it uses the system bzip2 which
7 is unable to re-create/gendelta bz2 archives created by other
10 Gbp-Rpm-If: 0%{?suse_version}
12 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
16 2 files changed, 8 insertions(+), 1 deletion(-)
18 diff --git a/Makefile.PL b/Makefile.PL
19 index d11e396..4d40774 100755
22 @@ -20,6 +20,8 @@ extra_build: zgz/zgz pristine-tar.spec
23 pod2man -c pristine-xz pristine-xz > pristine-xz.1
24 pod2man -c zgz zgz/zgz.pod > zgz.1
25 make -C pit/suse-bzip2
26 + make -C pit/upstream-bzip2
27 + sed -i s'|^my $$__upstream_bzip2_prefix.*|my $$__upstream_bzip2_prefix = "$(ZGZ_LIB)/upstream-bzip2/";|' pristine-bz2
29 ZGZ_SOURCES = zgz/zgz.c zgz/gzip/*.c zgz/old-bzip2/*.c
30 zgz/zgz: $(ZGZ_SOURCES)
31 @@ -37,6 +39,9 @@ extra_install:
32 install -d $(DESTDIR)$(ZGZ_LIB)/suse-bzip2
33 install pit/suse-bzip2/bzip2 $(DESTDIR)$(ZGZ_LIB)/suse-bzip2
34 install pit/suse-bzip2/libbz2* $(DESTDIR)$(ZGZ_LIB)/suse-bzip2
35 + install -d $(DESTDIR)$(ZGZ_LIB)/upstream-bzip2
36 + install pit/upstream-bzip2/bzip2 $(DESTDIR)$(ZGZ_LIB)/upstream-bzip2
37 + install pit/upstream-bzip2/libbz2* $(DESTDIR)$(ZGZ_LIB)/upstream-bzip2
39 extra_clean: pristine-tar.spec
41 diff --git a/pristine-bz2 b/pristine-bz2
42 index 147ad86..dd9690c 100755
45 @@ -91,7 +91,9 @@ use IO::Handle;
49 -my @supported_bzip2_programs = qw(bzip2 pbzip2 zgz);
50 +my $__upstream_bzip2_prefix = "";
52 +my @supported_bzip2_programs = ("${__upstream_bzip2_prefix}bzip2", "pbzip2", "zgz");