aslstatus-9999.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Copyright 2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. inherit savedconfig
  5. DESCRIPTION="async suckless status monitor"
  6. HOMEPAGE="https://notabug.org/dm9pZCAq/aslstatus"
  7. if [ "${PV}" = 9999 ]; then
  8. inherit git-r3
  9. EGIT_REPO_URI="https://notabug.org/dm9pZCAq/${PN}.git"
  10. VERSION=git
  11. else
  12. SRC_URI="
  13. https://notabug.org/dm9pZCAq/${PN}/archive/${PV}.tar.gz
  14. -> ${P}.tar.gz
  15. "
  16. KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
  17. S="${WORKDIR}/${PN}"
  18. VERSION="${PV}"
  19. fi
  20. LICENSE="MIT"
  21. SLOT="0"
  22. IUSE="+X +xkb +alsa pulseaudio"
  23. REQUIRED_USE="
  24. xkb? ( X )
  25. ^^ ( alsa pulseaudio )
  26. "
  27. DEPEND="
  28. X? ( x11-libs/libxcb[xkb?] )
  29. alsa? ( media-libs/alsa-lib[thread-safety] )
  30. pulseaudio? ( media-sound/pulseaudio )
  31. "
  32. RDEPEND="${DEPEND}"
  33. BDEPEND="virtual/pkgconfig"
  34. src_prepare() {
  35. default
  36. restore_config {components_,}config.h
  37. }
  38. src_compile() {
  39. local audio=''
  40. use alsa && audio=ALSA
  41. use pulseaudio && audio=PULSE
  42. emake VERSION="${VERSION}" \
  43. AUDIO="${audio}" \
  44. X="$(usex X 1 0)" \
  45. XKB="$(usex xkb 1 0)"
  46. }
  47. src_install() {
  48. local DOCS=( *.md )
  49. dobin "${PN}"
  50. doman "${PN}.1"
  51. save_config {components_,}config.h
  52. einstalldocs
  53. }