bleachbit-1.12.ebuild 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PLOCALES="ar ast be bg bn bs ca cs da de el en_AU en_CA en_GB eo es et eu fa fi fo fr gl he hi hr hu hy ia id it ja ko ku ky lt lv
  5. ms my nb nds nl nn pl pt_BR pt ro ru se si sk sl sr sv ta te th tr ug uk uz vi zh_CN zh_TW"
  6. PYTHON_COMPAT=( python2_7 )
  7. PYTHON_REQ_USE="sqlite"
  8. inherit distutils-r1 eutils l10n
  9. DESCRIPTION="Clean junk to free disk space and to maintain privacy"
  10. HOMEPAGE="https://www.bleachbit.org"
  11. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
  12. LICENSE="GPL-3"
  13. SLOT="0"
  14. KEYWORDS="amd64 x86"
  15. IUSE="+gtk nls"
  16. RDEPEND="
  17. dev-python/notify-python[$PYTHON_USEDEP]
  18. gtk? ( dev-python/pygtk:2[$PYTHON_USEDEP] )"
  19. DEPEND="${RDEPEND}
  20. nls? ( sys-devel/gettext )"
  21. DOCS=( README.md )
  22. python_prepare_all() {
  23. rem_locale() {
  24. rm "po/${1}.po" || die "removing of ${1}.po failed"
  25. }
  26. l10n_find_plocales_changes po "" ".po"
  27. l10n_for_each_disabled_locale_do rem_locale
  28. # choose correct Python implementation, bug #465254
  29. sed -i -e 's/python/$(PYTHON)/g' po/Makefile || die
  30. distutils-r1_python_prepare_all
  31. }
  32. python_compile_all() {
  33. use nls && emake -C po
  34. }
  35. python_install_all() {
  36. distutils-r1_python_install_all
  37. use nls && emake -C po DESTDIR="${D}" install
  38. # https://bugs.gentoo.org/388999
  39. insinto /usr/share/${PN}/cleaners
  40. doins cleaners/*.xml
  41. newbin ${PN}.py ${PN}
  42. python_replicate_script "${D}/usr/bin/${PN}"
  43. doicon ${PN}.png
  44. domenu ${PN}.desktop
  45. }