rar-5.4.0.ebuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. MY_PV="${PV/0_beta/b}"
  5. DESCRIPTION="RAR compressor/uncompressor"
  6. HOMEPAGE="http://www.rarsoft.com/"
  7. URI_x86="http://www.rarsoft.com/rar/rarlinux-${MY_PV}.tar.gz"
  8. URI_amd64="http://www.rarsoft.com/rar/rarlinux-x64-${MY_PV}.tar.gz"
  9. URI_w64="http://www.rarsoft.com/rar/winrar-x64-${MY_PV//.}.exe"
  10. SRC_URI="x86? ( ${URI_x86} )
  11. amd64? ( ${URI_amd64} )
  12. all_sfx? (
  13. ${URI_x86}
  14. ${URI_amd64}
  15. ${URI_w64}
  16. )"
  17. LICENSE="RAR BSD BSD-2"
  18. SLOT="0"
  19. KEYWORDS="-* ~amd64 ~x86"
  20. IUSE="all_sfx static"
  21. RESTRICT="mirror bindist"
  22. DEPEND="all_sfx? ( app-arch/unrar )"
  23. RDEPEND="sys-libs/glibc"
  24. S="${WORKDIR}/${PN}"
  25. QA_FLAGS_IGNORED="opt/rar/default.sfx
  26. opt/rar/default-elf32.sfx
  27. opt/rar/default-elf64.sfx
  28. opt/rar/default-win32.sfx
  29. opt/rar/default-win64.sfx
  30. opt/rar/WinCon.SFX
  31. opt/rar/WinCon64.SFX
  32. opt/rar/Zip.SFX
  33. opt/rar/Zip64.SFX
  34. opt/rar/unrar
  35. opt/rar/rar"
  36. QA_PRESTRIPPED=${QA_FLAGS_IGNORED}
  37. src_unpack() {
  38. use x86 && unpack ${URI_x86##*/}
  39. use amd64 && unpack ${URI_amd64##*/}
  40. rm -f "${S}"/license.txt
  41. if use all_sfx ; then
  42. mkdir sfx
  43. cd sfx
  44. unpack ${URI_x86##*/}
  45. mv rar/default.sfx default-elf32.sfx || die
  46. unpack ${URI_amd64##*/}
  47. mv rar/default.sfx default-elf64.sfx || die
  48. ln -s "${DISTDIR}"/${URI_w64##*/} w64.rar
  49. unpack ./w64.rar
  50. mv Default.SFX default-win32.sfx || die
  51. mv Default64.SFX default-win64.sfx || die
  52. fi
  53. }
  54. src_compile() { :; }
  55. src_install() {
  56. exeinto /opt/rar
  57. doexe rar unrar || die
  58. use static && { newexe rar_static rar || die ; }
  59. dodir /opt/bin
  60. dosym ../rar/rar /opt/bin/rar || die
  61. dosym ../rar/unrar /opt/bin/unrar || die
  62. insinto /opt/rar
  63. if use all_sfx ; then
  64. doins "${WORKDIR}"/sfx/*.{sfx,SFX} || die
  65. else
  66. doins default.sfx || die
  67. fi
  68. doins rarfiles.lst || die
  69. dodoc *.txt
  70. }