Gentoo Linux Overlay
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.4KB

  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="${BASE_URI}/linux-x64/stable -> ${P}-amd64.tar.gz"
  9. RESTRICT="mirror strip bindist"
  10. LICENSE="MIT"
  11. SLOT="0"
  12. KEYWORDS="~x86 ~amd64"
  13. IUSE="libsecret"
  14. DEPEND="
  15. >=media-libs/libpng-1.2.46
  16. >=x11-libs/gtk+-2.24.8-r1:2
  17. x11-libs/cairo
  18. gnome-base/gconf
  19. x11-libs/libXtst
  20. "
  21. RDEPEND="
  22. ${DEPEND}
  23. x11-libs/libnotify
  24. x11-libs/libXScrnSaver
  25. dev-libs/nss
  26. libsecret? ( app-crypt/libsecret[crypt] )
  27. "
  28. QA_PRESTRIPPED="opt/${PN}/code"
  29. QA_PREBUILT="opt/${PN}/code"
  30. pkg_setup(){
  31. use amd64 && S="${WORKDIR}/VSCode-linux-x64" || S="${WORKDIR}/VSCode-linux-ia32"
  32. }
  33. src_install(){
  34. pax-mark m code
  35. insinto "/opt/${PN}"
  36. doins -r *
  37. dosym "/opt/${PN}/bin/code" "/usr/bin/${PN}"
  38. make_desktop_entry "${PN}" "Visual Studio Code" "${PN}" "Development;IDE"
  39. doicon ${FILESDIR}/${PN}.png
  40. fperms +x "/opt/${PN}/code"
  41. fperms +x "/opt/${PN}/bin/code"
  42. fperms +x "/opt/${PN}/resources/app/node_modules.asar.unpacked/vscode-ripgrep/bin/rg"
  43. insinto "/usr/share/licenses/${PN}"
  44. }
  45. pkg_postinst(){
  46. elog "You may install some additional utils, so check them in:"
  47. elog "https://code.visualstudio.com/Docs/setup#_additional-tools"
  48. }