echinus-0.4.9.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit eutils toolchain-funcs multilib
  5. DESCRIPTION="A window manager for X in the spirit of dwm"
  6. HOMEPAGE="http://plhk.ru/echinus"
  7. SRC_URI="http://plhk.ru/static/${PN}/${P}.tar.gz"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="xrandr"
  12. RDEPEND="x11-libs/libX11
  13. x11-libs/libXft
  14. xrandr? ( x11-libs/libXrandr )"
  15. DEPEND="${RDEPEND}
  16. virtual/pkgconfig"
  17. DOCS=( README )
  18. pkg_setup() {
  19. tc-export CC
  20. use xrandr && export MULTIHEAD=1
  21. }
  22. src_prepare() {
  23. epatch "${FILESDIR}"/${P}-gentoo.diff
  24. sed -i -e "s|CONFDIR|/usr/share/${PN}|g" echinus.1 README || die
  25. sed -i -e "s|/usr/lib|/usr/$(get_libdir)|g" config.mk || die
  26. }
  27. src_install() {
  28. dobin ${PN}
  29. doman ${PN}.1
  30. dodoc README
  31. insinto /usr/share/${PN}
  32. doins {close,iconify,max}.xbm ${PN}rc
  33. insinto /usr/share/xsessions
  34. doins "${FILESDIR}"/${PN}.desktop
  35. }
  36. pkg_postinst() {
  37. if ! has_version x11-misc/dmenu; then
  38. elog "Installing ${PN} without x11-misc/dmenu"
  39. elog "To have a menu you can install x11-misc/dmenu"
  40. elog "and use \"Echinus*spawn\" in echinusrc"
  41. elog "to launch dmenu_run. Check echinus documentation for details."
  42. elog ""
  43. fi
  44. elog "A standard config file with its pixmaps has been installed to:"
  45. elog "${EPREFIX}/usr/share/${PN}/examples"
  46. elog "Copy this folder to ~/.${PN}/ and modify the echinusrc as you wish."
  47. elog ""
  48. elog "For changing the modkey you can use \"Echinus*modkey: X\""
  49. elog "in echinusrc. Replace the X with A for ALT, W for Winkey (Super),"
  50. elog "S for Shift or C for the Control key."
  51. }