ipkg-utils-1.7.050831-r2.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit distutils-r1 eutils toolchain-funcs versionator
  6. MY_P="${PN}-$(get_version_component_range 3)"
  7. DESCRIPTION="Tools for working with the ipkg binary package format"
  8. HOMEPAGE="http://www.openembedded.org/"
  9. SRC_URI="http://handhelds.org/download/packages/ipkg-utils/${MY_P}.tar.gz"
  10. LICENSE="GPL-2"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~x86"
  13. IUSE="minimal"
  14. DEPEND="
  15. !minimal? (
  16. app-crypt/gnupg
  17. net-misc/curl
  18. )"
  19. RDEPEND="${DEPEND}"
  20. S="${WORKDIR}/${MY_P}"
  21. src_prepare() {
  22. epatch "${FILESDIR}/${PN}-tar_call_fixes.patch"
  23. epatch "${FILESDIR}/${P}-hashlib.patch"
  24. sed '/python setup.py build/d' -i Makefile
  25. if use minimal; then
  26. elog "ipkg-upload is not installed when the \`minimal' USE flag is set. If you"
  27. elog "need ipkg-upload then rebuild this package without the \`minimal' USE flag."
  28. fi
  29. }
  30. src_compile() {
  31. distutils-r1_src_compile
  32. emake CC="$(tc-getCC)" || die "emake failed"
  33. }
  34. python_install() {
  35. distutils-r1_python_install
  36. if use minimal; then
  37. rm "${ED}usr/bin/ipkg-upload" \
  38. "${D}$(python_get_scriptdir)/ipkg-upload" || die
  39. fi
  40. }
  41. src_install() {
  42. distutils-r1_src_install
  43. }
  44. pkg_postinst() {
  45. elog "Consider installing sys-apps/fakeroot for use with the ipkg-build command,"
  46. elog "that makes it possible to build packages as a normal user."
  47. }