install:: extra_install
pure_install:: extra_install
-extra_build: zgz/zgz pristine-tar.spec
+ZOMBIES=zgz/pit/suse-bzip2/suse-bzip2
+BINS=zgz/zgz $(ZOMBIES)
+
+extra_build: $(BINS) pristine-tar.spec
pod2man -c pristine-tar pristine-tar > pristine-tar.1
pod2man -c pristine-gz pristine-gz > pristine-gz.1
pod2man -c pristine-bz2 pristine-bz2 > pristine-bz2.1
zgz/zgz: $(ZGZ_SOURCES)
gcc -Wall -O2 -o $@ $(ZGZ_SOURCES) -lz
+SUSE_BZIP2_SOURCES = zgz/pit/suse-bzip2/*.c
+zgz/pit/suse-bzip2/suse-bzip2: $(SUSE_BZIP2_SOURCES)
+ gcc -Wall -O2 -o $@ $(SUSE_BZIP2_SOURCES)
+
extra_install:
install -d $(DESTDIR)/usr/bin
install -d $(DESTDIR)/usr/share/man/man1
install pristine-tar pristine-gz pristine-bz2 zgz/zgz $(DESTDIR)/usr/bin
install -m 0644 *.1 $(DESTDIR)/usr/share/man/man1
+ install -d $(DESTDIR)/usr/lib/zgz
+ install $(ZOMBIES) $(DESTDIR)/usr/lib/zgz
extra_clean: pristine-tar.spec
- rm -f zgz/zgz *.1
+ rm -f *.1 $(BINS)
pristine-tar.spec:
sed -i "s/Version:.*/Version: $$(perl -e '$$_=<>;print m/\((.*?)\)/'<debian/changelog)/" pristine-tar.spec
}
static
+Bool myfeof ( FILE* f );
+
+static
void compressStream ( FILE *stream, FILE *zStream )
{
BZFILE* bzf = NULL;
if (ferror(stream)) goto errhandler_io;
if (ferror(zStream)) goto errhandler_io;
- bzf = bzWriteOpen ( &bzerr, zStream,
+ bzf = BZ2_bzWriteOpen ( &bzerr, zStream,
blockSize100k, verbosity, workFactor );
if (bzerr != BZ_OK) goto errhandler;
if (myfeof(stream)) break;
nIbuf = fread ( ibuf, sizeof(UChar), 5000, stream );
if (ferror(stream)) goto errhandler_io;
- if (nIbuf > 0) bzWrite ( &bzerr, bzf, (void*)ibuf, nIbuf );
+ if (nIbuf > 0) BZ2_bzWrite ( &bzerr, bzf, (void*)ibuf, nIbuf );
if (bzerr != BZ_OK) goto errhandler;
}
- bzWriteClose ( &bzerr, bzf, 0, &nbytes_in, &nbytes_out );
+ BZ2_bzWriteClose ( &bzerr, bzf, 0, &nbytes_in, &nbytes_out );
if (bzerr != BZ_OK) goto errhandler;
if (ferror(zStream)) goto errhandler_io;
return;
errhandler:
- bzWriteClose ( &bzerr_dummy, bzf, 1, &nbytes_in, &nbytes_out );
+ BZ2_bzWriteClose ( &bzerr_dummy, bzf, 1, &nbytes_in, &nbytes_out );
switch (bzerr) {
case BZ_MEM_ERROR:
panic ( "out of memory" );
int open_mode) /* bzopen: 0, bzdopen:1 */
{
int bzerr;
- char unused[BZ_MAX_UNUSED];
int blockSize100k = 9;
int writing = 0;
char mode2[10] = "";
BZFILE *bzfp = NULL;
int verbosity = 0;
int workFactor = 30;
- int smallMode = 0;
- int nUnused = 0;
if (mode == NULL) return NULL;
while (*mode) {
case 'w':
writing = 1; break;
case 's':
- smallMode = 1; break;
+ /*smallMode = 1;*/ break;
default:
if (isdigit((int)(*mode))) {
blockSize100k = *mode-BZ_HDR_0;