Intro  Base  More  Read  Use  Last 30  60  90  All Articles  RSS


Intro

Base

More

Read

Use

Last:
30


60

90

All
Days

Base: bzip2-1.0.5   Print


Base Nav: first previous next last All Tab 2 spacerspacer
Source code is available here.

Run these commands:

cd /sources/  &&
rm -rf bzip2-1.0.5 &&
tar -xzf bzip2-1.0.5.tar.gz &&
cd bzip2-1.0.5 &&
make -f Makefile-libbz2_so &&
make &&
make install PREFIX=/ &&
cp /sources/bzip2-1.0.5/libbz2.so* /lib/

The output should look something like this:

gcc -fpic -fPIC -Wall -Winline -O2 -g
-D_FILE_OFFSET_BITS=64 -c blocksort.c
gcc -fpic -fPIC -Wall -Winline -O2 -g
-D_FILE_OFFSET_BITS=64 -c huffman.c
gcc -fpic -fPIC -Wall -Winline -O2 -g
-D_FILE_OFFSET_BITS=64 -c crctable.c
gcc -fpic -fPIC -Wall -Winline -O2 -g
-D_FILE_OFFSET_BITS=64 -c randtable.c
gcc -fpic -fPIC -Wall -Winline -O2 -g
-D_FILE_OFFSET_BITS=64 -c compress.c
gcc -fpic -fPIC -Wall -Winline -O2 -g
-D_FILE_OFFSET_BITS=64 -c decompress.c
gcc -fpic -fPIC -Wall -Winline -O2 -g
-D_FILE_OFFSET_BITS=64 -c bzlib.c
gcc -shared -Wl,-soname -Wl,libbz2.so.1.0 -o
libbz2.so.1.0.4 blocksort.o huffman.o crctable.o
randtable.o compress.o decompress.o bzlib.o
gcc -fpic -fPIC -Wall -Winline -O2 -g
-D_FILE_OFFSET_BITS=64 -o bzip2-shared bzip2.c
libbz2.so.1.0.4
rm -f libbz2.so.1.0
ln -s libbz2.so.1.0.4 libbz2.so.1.0
rm -f libbz2.a
ar cq libbz2.a blocksort.o huffman.o crctable.o randtable.o
compress.o decompress.o bzlib.o
ranlib libbz2.a
gcc -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c bzip2.c
gcc -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64  -o bzip2
bzip2.o -L. -lbz2
gcc -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64 -c
bzip2recover.c
gcc -Wall -Winline -O2 -g -D_FILE_OFFSET_BITS=64  -o
bzip2recover bzip2recover.o
Doing 6 tests (3 compress, 3 uncompress) ...
If there's a problem, things might stop at this point.
./bzip2 -1  < sample1.ref > sample1.rb2
./bzip2 -2  < sample2.ref > sample2.rb2
./bzip2 -3  < sample3.ref > sample3.rb2
./bzip2 -d  < sample1.bz2 > sample1.tst
./bzip2 -d  < sample2.bz2 > sample2.tst
./bzip2 -ds < sample3.bz2 > sample3.tst
cmp sample1.bz2 sample1.rb2 
cmp sample2.bz2 sample2.rb2
cmp sample3.bz2 sample3.rb2
cmp sample1.tst sample1.ref
cmp sample2.tst sample2.ref
cmp sample3.tst sample3.ref
If you got this far and the 'cmp's didn't complain, it
looks
like you're in business.  
To install in /usr/local/bin, /usr/local/lib,
/usr/local/man and 
/usr/local/include, type
   make install
To install somewhere else, eg,
/xxx/yyy/{bin,lib,man,include}, type 
   make install PREFIX=/xxx/yyy
If you are (justifiably) paranoid and want to see what
'make install'
is going to do, you can first do
.
.
.
   make -n install PREFIX=/xxx/yyy	respectively.
The -n instructs make to show the commands it would
execute, but
not actually execute them.
Instructions for use are in the preformatted manual page,
in the file
bzip2.txt.  For more detailed documentation, read the full
manual.  
It is available in Postscript form (manual.ps), PDF form
(manual.pdf),
and HTML form (manual.html).
You can also do ""bzip2 --help"" to see some helpful
information. 
""bzip2 -L"" displays the software license.
if ( test ! -d //bin ) ; then mkdir -p //bin ; fi
if ( test ! -d //lib ) ; then mkdir -p //lib ; fi
if ( test ! -d //man ) ; then mkdir -p //man ; fi
if ( test ! -d //man/man1 ) ; then mkdir -p //man/man1 ; fi
if ( test ! -d //include ) ; then mkdir -p //include ; fi
cp -f bzip2 //bin/bzip2
cp -f bzip2 //bin/bunzip2
cp -f bzip2 //bin/bzcat
cp -f bzip2recover //bin/bzip2recover
chmod a+x //bin/bzip2
chmod a+x //bin/bunzip2
chmod a+x //bin/bzcat
chmod a+x //bin/bzip2recover
cp -f bzip2.1 //man/man1
chmod a+r //man/man1/bzip2.1
cp -f bzlib.h //include
chmod a+r //include/bzlib.h
cp -f libbz2.a //lib
chmod a+r //lib/libbz2.a
cp -f bzgrep //bin/bzgrep
ln -s -f //bin/bzgrep //bin/bzegrep
ln -s -f //bin/bzgrep //bin/bzfgrep
chmod a+x //bin/bzgrep
cp -f bzmore //bin/bzmore
ln -s -f //bin/bzmore //bin/bzless
chmod a+x //bin/bzmore
cp -f bzdiff //bin/bzdiff
ln -s -f //bin/bzdiff //bin/bzcmp
chmod a+x //bin/bzdiff
cp -f bzgrep.1 bzmore.1 bzdiff.1 //man/man1
chmod a+r //man/man1/bzgrep.1
chmod a+r //man/man1/bzmore.1
chmod a+r //man/man1/bzdiff.1
echo "".so man1/bzgrep.1"" > //man/man1/bzegrep.1
echo "".so man1/bzgrep.1"" > //man/man1/bzfgrep.1
echo "".so man1/bzmore.1"" > //man/man1/bzless.1
echo "".so man1/bzdiff.1"" > //man/man1/bzcmp.1


~~~
Please read our Terms of Use and our Privacy Policy
A tip o' the hat to the folks at Linux From Scratch, who provided a lot of the know-how and framing for the NoNIC OS.

Copyright 2006-2009 NoNIC.org

Created by:
MCJ
MCJ CMS