diff options
Diffstat (limited to 'meta/packages/bzip2/bzip2_1.0.2.bb')
-rw-r--r-- | meta/packages/bzip2/bzip2_1.0.2.bb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/packages/bzip2/bzip2_1.0.2.bb b/meta/packages/bzip2/bzip2_1.0.2.bb new file mode 100644 index 0000000000..1e1cb8e539 --- /dev/null +++ b/meta/packages/bzip2/bzip2_1.0.2.bb | |||
@@ -0,0 +1,41 @@ | |||
1 | DESCRIPTION = "Very high-quality data compression program." | ||
2 | SECTION = "console/utils" | ||
3 | PR = "r1" | ||
4 | |||
5 | LICENSE = "bzip2" | ||
6 | SRC_URI = "ftp://sources.redhat.com/pub/bzip2/v102/bzip2-${PV}.tar.gz \ | ||
7 | file://installpaths.patch;patch=1" | ||
8 | |||
9 | CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64" | ||
10 | |||
11 | do_compile () { | ||
12 | oe_runmake -f Makefile-libbz2_so | ||
13 | ln -sf libbz2.so.1.0.2 libbz2.so.1.0 | ||
14 | ln -sf libbz2.so.1.0.2 libbz2.so.1 | ||
15 | ln -sf libbz2.so.1.0.2 libbz2.so | ||
16 | oe_runmake libbz2.a bzip2 bzip2recover | ||
17 | } | ||
18 | |||
19 | do_stage () { | ||
20 | install -m 0644 bzlib.h ${STAGING_INCDIR}/ | ||
21 | oe_libinstall -a -so libbz2 ${STAGING_LIBDIR} | ||
22 | } | ||
23 | |||
24 | do_install () { | ||
25 | oe_runmake 'DESTDIR=${D}' install | ||
26 | oe_libinstall -a -so libbz2 ${D}${libdir} | ||
27 | mv ${D}${bindir}/bunzip2 ${D}${bindir}/bunzip2.${PN} | ||
28 | mv ${D}${bindir}/bzcat ${D}${bindir}/bzcat.${PN} | ||
29 | } | ||
30 | |||
31 | |||
32 | pkg_postinst_${PN} () { | ||
33 | update-alternatives --install ${bindir}/bunzip2 bunzip2 bunzip2.${PN} 100 | ||
34 | update-alternatives --install ${bindir}/bzcat bzcat bzcat.${PN} 100 | ||
35 | } | ||
36 | |||
37 | |||
38 | pkg_prerm_${PN} () { | ||
39 | update-alternatives --remove bunzip2 bunzip2.${PN} | ||
40 | update-alternatives --remove bzcat bzcat.${PN} | ||
41 | } | ||