You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.2 KiB

  1. # Copyright 1999-2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. inherit toolchain-funcs systemd
  5. MY_P=${PN/-/_}-${PV}
  6. DESCRIPTION="A utility that displays an ANSI/ASCII logo and some system information"
  7. HOMEPAGE="http://www.deater.net/weave/vmwprod/linux_logo/"
  8. SRC_URI="http://www.deater.net/weave/vmwprod/linux_logo/${MY_P}.tar.gz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux"
  12. IUSE="nls"
  13. RDEPEND="nls? ( virtual/libintl )"
  14. DEPEND="${RDEPEND}"
  15. BDEPEND="nls? ( sys-devel/gettext )"
  16. PATCHES=(
  17. "${FILESDIR}"/"${P}"-configure.patch
  18. )
  19. DOCS=( BUGS README README.CUSTOM_LOGOS TODO USAGE LINUX_LOGO.FAQ )
  20. S=${WORKDIR}/${MY_P}
  21. src_prepare() {
  22. cp "${FILESDIR}"/logo-config "${S}/logo_config" || die
  23. cp "${FILESDIR}"/linux_logo_creator "${S}/" || die
  24. cp "${FILESDIR}"/linux-logo.service "${S}/" || die
  25. cp "${FILESDIR}"/gentoo-*.logo "${S}"/logos/ || die
  26. sed -e 's#=$(PREFIX)#=$(DESTDIR)$(PREFIX)#' -i po/Makefile || die
  27. # Manpage is already gzipped in tarball
  28. gunzip linux_logo.1.gz || die
  29. sed -e "s/.1.gz/.1/g" -i Makefile || die
  30. default
  31. }
  32. src_configure() {
  33. ARCH="" CC="$(tc-getCC)" AR="$(tc-getAR)" LDFLAGS="${LDFLAGS}" DESTDIR="${D}" \
  34. ./configure --prefix=/usr || die
  35. }
  36. src_install() {
  37. default
  38. dobin "${FILESDIR}"/linux_logo_creator
  39. newinitd "${FILESDIR}"/${PN}.init.d ${PN}
  40. newconfd "${FILESDIR}"/${PN}-5.11.conf ${PN}
  41. # systemd support
  42. systemd_newunit "${FILESDIR}/linux-logo.service" "linux-logo.service"
  43. }
  44. pkg_postinst() {
  45. echo
  46. elog "Linux_logo ebuild for Gentoo comes with two Gentoo logos."
  47. elog ""
  48. elog "To display the first Gentoo logo type: linux_logo -L gentoo"
  49. elog "To display the second Gentoo logo type: linux_logo -L gentoo-alt"
  50. elog "To display all the logos available type: linux_logo -L list."
  51. elog ""
  52. elog "To start linux_logo on boot, please type:"
  53. elog " rc-update add linux-logo default"
  54. elog "or for systemd"
  55. elog " systemctl enable linux-logo.service"
  56. elog "which uses the settings found in"
  57. elog " /etc/conf.d/linux-logo"
  58. echo
  59. }
  60. pkg_prerm() {
  61. # Restore issue files
  62. mv /etc/issue.linux-logo.backup /etc/issue 2> /dev/null
  63. mv /etc/issue.net.linux-logo.backup /etc/issue.net 2> /dev/null
  64. }