summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 982e17444e70726dab62d84386353b460c13cd18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Maintainer: Axel Navarro <navarroaxel at gmail>
pkgbase=rubymine-eap
pkgname=(rubymine-eap rubymine-eap-jre)
pkgver=242.20224.35
_pkgname=RubyMine
_pkgver=2024.2
pkgrel=1
pkgdesc="Ruby and Rails IDE with the full stack of essential developer tools (EAP)."
arch=('i686' 'x86_64')
options=('!strip')
url="http://www.jetbrains.com/ruby/"
license=('custom')
depends=('desktop-file-utils' 'gtk-update-icon-cache')
optdepends=('ruby: Ruby run/debug support')
install=rubymine.install
source=(https://download.jetbrains.com/ruby/${_pkgname}-${pkgver}.tar.gz
        rubymine-eap.desktop
        rubymine.install)
sha256sums=('70cbd132f96f433129bb8dcf895036f78f1646530394587a66c88d9fb1d7d6cc'
            '02b32d973da26ef7d61e4c291fff71229729b203661dc75cc947c8098cb8e660'
            'fe42e281cdcaca5008d3f254a16974504c9271407800d0234ce06476ea9e3bdd')

prepare() {
  cd "${srcdir}/${_pkgname}-${pkgver}"

  rm Install-Linux-tar.txt
  rm help/ReferenceCardForMac.pdf
}

package_rubymine-eap() {
  optdepends=('rubymine-eap-jre: JetBrains custom Java Runtime (Recommended)'
              'java-runtime: JRE - Required if rubymine-eap-jre is not installed')

  cd "${srcdir}"
  [ $CARCH == "x86_64" ] && SUFFIX=64

  install -d ${pkgdir}/{opt,usr/share}

  # Pre-packaged program files
  cp --recursive "${srcdir}/${_pkgname}-${pkgver}" "${pkgdir}/opt/${pkgname}"
  rm -rf "${pkgdir}"/opt/${pkgbase}/jbr

  # Desktop file
  install -Dm644 "${pkgdir}/opt/${pkgname}/bin/rubymine.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg"
  install -Dm644 "rubymine-eap.desktop" "${pkgdir}/usr/share/applications/rubymine-eap.desktop"
  install -d -m 755 "${pkgdir}/usr/bin"
  ln -s "/opt/${pkgname}/bin/rubymine" "${pkgdir}/usr/bin/${pkgname}"

  # License
  install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
  find "$srcdir/$_pkgname-$pkgver/license/" -type f -exec \
    install -Dm644 '{}' "$pkgdir/usr/share/licenses/$pkgname/" \;

  # Java config
  sed -i 's/lcd/on/' "${pkgdir}/opt/$pkgname/bin/rubymine${SUFFIX}.vmoptions"
  echo "-Dswing.aatext=true" >> "${pkgdir}/opt/$pkgname/bin/rubymine${SUFFIX}.vmoptions"
}

package_rubymine-eap-jre() {
  pkgdesc="JBR (JetBrains Runtime) for RubyMine EAP - a patched JRE"
  url='https://github.com/JetBrains/JetBrainsRuntime'

  install -dm755 "${pkgdir}"/opt/${pkgbase}
  cp -a "${srcdir}/${_pkgname}-${pkgver}/jbr" "${pkgdir}/opt/${pkgbase}"
}