From f2442f18ecdb310750195753f8c122f2cd81e364 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Tue, 11 Aug 2009 11:16:09 -0700 Subject: tar: inherit gettext & use a .inc to avoid duplicated metadata. Signed-off-by: Chris Larson --- recipes/tar/tar-native_1.13.93.bb | 2 -- recipes/tar/tar.inc | 25 +++++++++++++++++++++++++ recipes/tar/tar_1.13.93.bb | 30 +++++------------------------- recipes/tar/tar_1.18.bb | 26 +------------------------- recipes/tar/tar_1.20.bb | 26 +------------------------- 5 files changed, 32 insertions(+), 77 deletions(-) create mode 100644 recipes/tar/tar.inc (limited to 'recipes') diff --git a/recipes/tar/tar-native_1.13.93.bb b/recipes/tar/tar-native_1.13.93.bb index 4a7aae3282..ea9c328877 100644 --- a/recipes/tar/tar-native_1.13.93.bb +++ b/recipes/tar/tar-native_1.13.93.bb @@ -1,7 +1,5 @@ -SECTION = "base" require tar_${PV}.bb inherit native -S = "${WORKDIR}/tar-${PV}" do_stage() { install -m 755 src/tar ${STAGING_BINDIR} diff --git a/recipes/tar/tar.inc b/recipes/tar/tar.inc new file mode 100644 index 0000000000..8fbc2f81f7 --- /dev/null +++ b/recipes/tar/tar.inc @@ -0,0 +1,25 @@ +DESCRIPTION = "GNU tar saves many files together into a single tape \ +or disk archive, and can restore individual files from the archive." +SECTION = "base" +LICENSE = "GPLv3" + +SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" + +inherit autotools gettext + +do_install () { + autotools_do_install + install -d ${D}${base_bindir} + mv ${D}${bindir}/tar ${D}${base_bindir}/tar.${PN} + mv ${D}${libexecdir}/rmt ${D}${libexecdir}/rmt.${PN} +} + +pkg_postinst_${PN} () { + update-alternatives --install ${base_bindir}/tar tar tar.${PN} 100 + update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 100 +} + +pkg_prerm_${PN} () { + update-alternatives --remove tar tar.${PN} + update-alternatives --remove rmt rmt.${PN} +} diff --git a/recipes/tar/tar_1.13.93.bb b/recipes/tar/tar_1.13.93.bb index 6c7139595f..ea56c0d372 100644 --- a/recipes/tar/tar_1.13.93.bb +++ b/recipes/tar/tar_1.13.93.bb @@ -1,28 +1,8 @@ -SECTION = "base" -DESCRIPTION = "GNU tar saves many files together into a single tape \ -or disk archive, and can restore individual files from the archive." -LICENSE = "GPL" +require tar.inc + +LICENSE = "GPLv2" PR = "r1" SRC_URI = "ftp://alpha.gnu.org/gnu/tar/tar-${PV}.tar.gz \ - file://configure.patch;patch=1 \ - file://m4.patch;patch=1" - -inherit autotools - -do_install () { - autotools_do_install - install -d ${D}${base_bindir} - mv ${D}${bindir}/tar ${D}${base_bindir}/tar.${PN} - mv ${D}${libexecdir}/rmt ${D}${libexecdir}/rmt.${PN} -} - -pkg_postinst_${PN} () { - update-alternatives --install ${base_bindir}/tar tar tar.${PN} 100 - update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 100 -} - -pkg_prerm_${PN} () { - update-alternatives --remove tar tar.${PN} - update-alternatives --remove rmt rmt.${PN} -} + file://configure.patch;patch=1 \ + file://m4.patch;patch=1" diff --git a/recipes/tar/tar_1.18.bb b/recipes/tar/tar_1.18.bb index 701c0b77bf..25163acdad 100644 --- a/recipes/tar/tar_1.18.bb +++ b/recipes/tar/tar_1.18.bb @@ -1,25 +1 @@ -DESCRIPTION = "GNU tar saves many files together into a single tape \ -or disk archive, and can restore individual files from the archive." -SECTION = "base" -LICENSE = "GPLv3" - -SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" - -inherit autotools - -do_install () { - autotools_do_install - install -d ${D}${base_bindir} - mv ${D}${bindir}/tar ${D}${base_bindir}/tar.${PN} - mv ${D}${libexecdir}/rmt ${D}${libexecdir}/rmt.${PN} -} - -pkg_postinst_${PN} () { - update-alternatives --install ${base_bindir}/tar tar tar.${PN} 100 - update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 100 -} - -pkg_prerm_${PN} () { - update-alternatives --remove tar tar.${PN} - update-alternatives --remove rmt rmt.${PN} -} +require tar.inc diff --git a/recipes/tar/tar_1.20.bb b/recipes/tar/tar_1.20.bb index 701c0b77bf..25163acdad 100644 --- a/recipes/tar/tar_1.20.bb +++ b/recipes/tar/tar_1.20.bb @@ -1,25 +1 @@ -DESCRIPTION = "GNU tar saves many files together into a single tape \ -or disk archive, and can restore individual files from the archive." -SECTION = "base" -LICENSE = "GPLv3" - -SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" - -inherit autotools - -do_install () { - autotools_do_install - install -d ${D}${base_bindir} - mv ${D}${bindir}/tar ${D}${base_bindir}/tar.${PN} - mv ${D}${libexecdir}/rmt ${D}${libexecdir}/rmt.${PN} -} - -pkg_postinst_${PN} () { - update-alternatives --install ${base_bindir}/tar tar tar.${PN} 100 - update-alternatives --install ${libexecdir}/rmt rmt rmt.${PN} 100 -} - -pkg_prerm_${PN} () { - update-alternatives --remove tar tar.${PN} - update-alternatives --remove rmt rmt.${PN} -} +require tar.inc -- cgit v1.2.3