diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-10-07 10:45:37 -0700 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2010-10-07 11:30:32 -0700 |
commit | 4a26ee3d7e77a6794ce27778c9b1eb98186faddc (patch) | |
tree | f462619ebd36781b1b3571540cae94bc227ec327 /recipes/gzip/gzip_1.4.bb | |
parent | 74e1d02aab90d7ebac0f348fe88d3b63ab8ca17b (diff) | |
download | openembedded-4a26ee3d7e77a6794ce27778c9b1eb98186faddc.tar.gz |
gzip: update to 1.4, add native
- CVE-2010-0001 affects gzip < 1.4, so updated to 1.4. Also removed prior
version, as no distributions appeared to pin it.
- Added BBCLASSEXTEND="native"
- Added myself as the maintainer in MAINTAINERS
- Move all binaries into /bin, not just the 3 we use with update-alternatives.
- Simplify the recipe, run oe-stylize + tweaks
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'recipes/gzip/gzip_1.4.bb')
-rw-r--r-- | recipes/gzip/gzip_1.4.bb | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes/gzip/gzip_1.4.bb b/recipes/gzip/gzip_1.4.bb new file mode 100644 index 0000000000..2c9e571389 --- /dev/null +++ b/recipes/gzip/gzip_1.4.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "gzip (GNU zip) is a compression utility designed \ +to be a replacement for 'compress'. The GNU Project uses it as \ +the standard compression program for its system." +SECTION = "console/utils" +PRIORITY = "required" +LICENSE = "GPL" +PR = "1" + +SRC_URI = "${GNU_MIRROR}/gzip/gzip-${PV}.tar.gz" +SRC_URI[md5sum] = "e381b8506210c794278f5527cba0e765" +SRC_URI[sha256sum] = "d166cfd3da380da1bd535633e8890bfb5664f9e68870a611d1dc01a3e9f711ee" + +inherit autotools + +BBCLASSEXTEND = "native" + +alternatives = "gunzip gzip zcat" + +do_install () { + autotools_do_install + # Move files into /bin (FHS) + install -d ${D}${base_bindir} + for file in ${D}${bindir}/*; do + mv $file ${D}${base_bindir}/ + done +} + +do_install_append_pn-gzip () { + for alternative in ${alternatives}; do + mv ${D}${base_bindir}/$alternative ${D}${base_bindir}/$alternative.${PN} + done +} + +pkg_prerm_${PN} () { + for alternative in ${alternatives}; do + mv ${D}${base_bindir}/$alternative ${D}${base_bindir}/$alternative.${PN} + update-alternatives --remove $alternative $alternative.${PN} + done +} + +pkg_postinst_${PN} () { + for alternative in ${alternatives}; do + mv ${D}${base_bindir}/$alternative ${D}${base_bindir}/$alternative.${PN} + update-alternatives --install ${base_bindir}/$alternative $alternative $alternative.${PN} 100 + done +} |