1 DESCRIPTION = "Very high-quality data compression program."
2 SECTION = "console/utils"
6 SRC_URI = "ftp://sources.redhat.com/pub/bzip2/v102/bzip2-${PV}.tar.gz \
7 file://installpaths.patch;patch=1 \
8 file://ldflags.patch;patch=1"
10 CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64"
13 oe_runmake -f Makefile-libbz2_so
14 ln -sf libbz2.so.1.0.2 libbz2.so.1.0
15 ln -sf libbz2.so.1.0.2 libbz2.so.1
16 ln -sf libbz2.so.1.0.2 libbz2.so
17 oe_runmake libbz2.a bzip2 bzip2recover
21 install -m 0644 bzlib.h ${STAGING_INCDIR}/
22 oe_libinstall -a -so libbz2 ${STAGING_LIBDIR}
26 oe_runmake 'DESTDIR=${D}' install
27 oe_libinstall -a -so libbz2 ${D}${libdir}
28 mv ${D}${bindir}/bunzip2 ${D}${bindir}/bunzip2.${PN}
29 mv ${D}${bindir}/bzcat ${D}${bindir}/bzcat.${PN}
33 pkg_postinst_${PN} () {
34 update-alternatives --install ${bindir}/bunzip2 bunzip2 bunzip2.${PN} 100
35 update-alternatives --install ${bindir}/bzcat bzcat bzcat.${PN} 100
40 update-alternatives --remove bunzip2 bunzip2.${PN}
41 update-alternatives --remove bzcat bzcat.${PN}