lsb-release-1.4-r3.ebuild 885 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils
  5. DESCRIPTION="LSB version query program"
  6. HOMEPAGE="https://wiki.linuxfoundation.org/lsb/"
  7. SRC_URI="mirror://sourceforge/lsb/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
  11. # Perl isn't needed at runtime, it is just used to generate the man page.
  12. DEPEND="dev-lang/perl"
  13. src_prepare() {
  14. epatch "${FILESDIR}"/${P}-os-release.patch # bug 443116
  15. # use POSIX 'printf' instead of bash 'echo -e', bug #482370
  16. sed -i \
  17. -e "s:echo -e:printf '%b\\\n':g" \
  18. -e 's:--long:-l:g' \
  19. lsb_release || die
  20. }
  21. src_install() {
  22. emake \
  23. prefix="${D}/usr" \
  24. mandir="${D}/usr/share/man" \
  25. install
  26. dodir /etc
  27. cat > "${D}/etc/lsb-release" <<- EOF
  28. DISTRIB_ID="Gentoo"
  29. EOF
  30. }