Gentoo Linux Overlay
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

64 lines
1.5KB

  1. # Copyright 1999-2018 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils pax-utils
  5. DESCRIPTION="Multiplatform Visual Studio Code from Microsoft"
  6. HOMEPAGE="https://code.visualstudio.com"
  7. BASE_URI="https://vscode-update.azurewebsites.net/${PV}"
  8. SRC_URI="
  9. x86? ( ${BASE_URI}/linux-ia32/stable -> ${P}-x86.tar.gz )
  10. amd64? ( ${BASE_URI}/linux-x64/stable -> ${P}-amd64.tar.gz )
  11. "
  12. RESTRICT="mirror strip bindist"
  13. LICENSE="MIT"
  14. SLOT="0"
  15. KEYWORDS="~x86 ~amd64"
  16. IUSE="libsecret"
  17. DEPEND="
  18. >=media-libs/libpng-1.2.46
  19. >=x11-libs/gtk+-2.24.8-r1:2
  20. x11-libs/cairo
  21. gnome-base/gconf
  22. x11-libs/libXtst
  23. "
  24. RDEPEND="
  25. ${DEPEND}
  26. x11-libs/libnotify
  27. x11-libs/libXScrnSaver
  28. dev-libs/nss
  29. libsecret? ( app-crypt/libsecret[crypt] )
  30. "
  31. QA_PRESTRIPPED="opt/${PN}/code"
  32. QA_PREBUILT="opt/${PN}/code"
  33. pkg_setup(){
  34. use amd64 && S="${WORKDIR}/VSCode-linux-x64" || S="${WORKDIR}/VSCode-linux-ia32"
  35. }
  36. src_install(){
  37. pax-mark m code
  38. insinto "/opt/${PN}"
  39. doins -r *
  40. dosym "/opt/${PN}/bin/code" "/usr/bin/${PN}"
  41. make_desktop_entry "${PN}" "Visual Studio Code" "${PN}" "Development;IDE"
  42. doicon ${FILESDIR}/${PN}.png
  43. fperms +x "/opt/${PN}/code"
  44. fperms +x "/opt/${PN}/bin/code"
  45. fperms +x "/opt/${PN}/libnode.so"
  46. fperms +x "/opt/${PN}/resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg"
  47. insinto "/usr/share/licenses/${PN}"
  48. newins "resources/app/LICENSE.txt" "LICENSE"
  49. }
  50. pkg_postinst(){
  51. elog "You may install some additional utils, so check them in:"
  52. elog "https://code.visualstudio.com/Docs/setup#_additional-tools"
  53. }