1 --- bzip2-1.0.6/Makefile.orig Wed Jan 12 13:53:06 2011
2 +++ bzip2-1.0.6/Makefile Thu Jan 13 13:01:30 2011
9 -all: libbz2.a bzip2 bzip2recover test
10 +all: libbz2.so bzip2 bzip2recover test
12 -bzip2: libbz2.a bzip2.o
13 +bzip2: libbz2.so bzip2.o
14 $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
16 bzip2recover: bzip2recover.o
17 $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o
21 - $(AR) cq libbz2.a $(OBJS)
22 - @if ( test -f $(RANLIB) -o -f /usr/bin/ranlib -o \
23 - -f /bin/ranlib -o -f /usr/ccs/bin/ranlib ) ; then \
24 - echo $(RANLIB) libbz2.a ; \
25 - $(RANLIB) libbz2.a ; \
28 + rm -f libbz2.so libbz2.so.1
29 + $(CC) $(CFLAGS) -shared -Wl,-h,libbz2.so.1 -o libbz2.so.1 \
30 + -Wl,-zdefs $(OBJS) -L. \
32 + ln -s libbz2.so.1 libbz2.so
37 - ./bzip2 -1 < sample1.ref > sample1.rb2
38 - ./bzip2 -2 < sample2.ref > sample2.rb2
39 - ./bzip2 -3 < sample3.ref > sample3.rb2
40 - ./bzip2 -d < sample1.bz2 > sample1.tst
41 - ./bzip2 -d < sample2.bz2 > sample2.tst
42 - ./bzip2 -ds < sample3.bz2 > sample3.tst
43 + env LD_LIBRARY_PATH=. ./bzip2 -1 < sample1.ref > sample1.rb2
44 + env LD_LIBRARY_PATH=. ./bzip2 -2 < sample2.ref > sample2.rb2
45 + env LD_LIBRARY_PATH=. ./bzip2 -3 < sample3.ref > sample3.rb2
46 + env LD_LIBRARY_PATH=. ./bzip2 -d < sample1.bz2 > sample1.tst
47 + env LD_LIBRARY_PATH=. ./bzip2 -d < sample2.bz2 > sample2.tst
48 + env LD_LIBRARY_PATH=. ./bzip2 -ds < sample3.bz2 > sample3.tst
49 cmp sample1.bz2 sample1.rb2
50 cmp sample2.bz2 sample2.rb2
51 cmp sample3.bz2 sample3.rb2
53 install: bzip2 bzip2recover
54 if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
55 if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
56 - if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
57 - if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
58 + if ( test ! -d $(PREFIX)/share/man ) ; then mkdir -p $(PREFIX)/share/man ; fi
59 + if ( test ! -d $(PREFIX)/share/man/man1 ) ; then mkdir -p $(PREFIX)/share/man/man1 ; fi
60 if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
61 cp -f bzip2 $(PREFIX)/bin/bzip2
62 cp -f bzip2 $(PREFIX)/bin/bunzip2
64 chmod a+x $(PREFIX)/bin/bunzip2
65 chmod a+x $(PREFIX)/bin/bzcat
66 chmod a+x $(PREFIX)/bin/bzip2recover
67 - cp -f bzip2.1 $(PREFIX)/man/man1
68 - chmod a+r $(PREFIX)/man/man1/bzip2.1
69 + cp -f bzip2.1 $(PREFIX)/share/man/man1
70 + chmod a+r $(PREFIX)/share/man/man1/bzip2.1
71 cp -f bzlib.h $(PREFIX)/include
72 chmod a+r $(PREFIX)/include/bzlib.h
73 - cp -f libbz2.a $(PREFIX)/lib
74 - chmod a+r $(PREFIX)/lib/libbz2.a
75 cp -f bzgrep $(PREFIX)/bin/bzgrep
76 - ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
77 - ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
78 + ln -s -f ./bzgrep $(PREFIX)/bin/bzegrep
79 + ln -s -f ./bzgrep $(PREFIX)/bin/bzfgrep
80 chmod a+x $(PREFIX)/bin/bzgrep
81 cp -f bzmore $(PREFIX)/bin/bzmore
82 - ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
83 + ln -s -f ./bzmore $(PREFIX)/bin/bzless
84 chmod a+x $(PREFIX)/bin/bzmore
85 cp -f bzdiff $(PREFIX)/bin/bzdiff
86 - ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
87 + ln -s -f ./bzdiff $(PREFIX)/bin/bzcmp
88 chmod a+x $(PREFIX)/bin/bzdiff
89 - cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
90 - chmod a+r $(PREFIX)/man/man1/bzgrep.1
91 - chmod a+r $(PREFIX)/man/man1/bzmore.1
92 - chmod a+r $(PREFIX)/man/man1/bzdiff.1
93 - echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1
94 - echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
95 - echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
96 - echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
97 + cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/share/man/man1
98 + chmod a+r $(PREFIX)/share/man/man1/bzgrep.1
99 + chmod a+r $(PREFIX)/share/man/man1/bzmore.1
100 + chmod a+r $(PREFIX)/share/man/man1/bzdiff.1
101 + echo ".so man1/bzgrep.1" > $(PREFIX)/share/man/man1/bzegrep.1
102 + echo ".so man1/bzgrep.1" > $(PREFIX)/share/man/man1/bzfgrep.1
103 + echo ".so man1/bzmore.1" > $(PREFIX)/share/man/man1/bzless.1
104 + echo ".so man1/bzdiff.1" > $(PREFIX)/share/man/man1/bzcmp.1
107 rm -f *.o libbz2.a bzip2 bzip2recover \