Compile bsdiff

 

 

 


1) 下載 bsdiff

https://packages.debian.org/source/bookworm/bsdiff

# bsdiff_4.3.orig.tar.gz 由 2005 年開始無更新過

wget http://deb.debian.org/debian/pool/main/b/bsdiff/bsdiff_4.3.orig.tar.gz

md5sum bsdiff_4.3.orig.tar.gz

e6d812394f0e0ecc8d5df255aa1db22a  bsdiff_4.3.orig.tar.gz

2) Compile

yum install bzip2-devel -y

tar -zxf bsdiff_4.3.orig.tar.gz

cd bsdiff-4.3

make

Makefile:13: *** missing separator.  Stop.

修改 Makefile 刪除以下部份

install:
        ${INSTALL_PROGRAM} bsdiff bspatch ${PREFIX}/bin
.ifndef WITHOUT_MAN
        ${INSTALL_MAN} bsdiff.1 bspatch.1 ${PREFIX}/man/man1
.endif

make

cc -march=x86-64 -O3 -pipe -O3 -lbz2    bsdiff.c   -o bsdiff
cc -march=x86-64 -O3 -pipe -O3 -lbz2    bspatch.c   -o bspatch

cp bspatch /usr/bin