summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 33b959b008b909e91094d5ae5e609a8914f739ef (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
# Contributor: Monika Schrenk <moni@random-access.org>
# Contributor: Alexandre Teles (afterSt0rm) <ateles.1@gmail.com>
# Contributor: Emanuel Fernandes <efernandes@tektorque.com>
# Maintainer: Erik Bender <erik.bender@develerik.dev>
# Maintainer: Dmitry Chusovitin <dchusovitin@gmail.com>

pkgname=studio-3t
pkgver=2024.4.0
pkgrel=1
pkgdesc="The Professional Client, IDE and GUI for MongoDB"
arch=('x86_64')
url="https://studio3t.com"
license=("custom")
depends=('gtk2')
makedepends=('gendesk')
provides=('studio-3t')
replaces=('mongochef')

source=("$pkgname-$pkgver.tar.gz::https://download.studio3t.com/studio-3t/linux/${pkgver}/${pkgname}-linux-x64.tar.gz")

sha256sums=('56541a31034856333c6fdc634f082b8bb8b06eb695931170cfb23378370a297c')

prepare() {
  # Extract, rename and add execution permision
  tar xzvf ${pkgname}-${pkgver}.tar.gz && for file in *.sh; do mv "$file" ${pkgname}.sh; done && chmod +x ${pkgname}.sh

  # unattended mode
  sh ./${pkgname}.sh -q -dir ${srcdir}/${pkgname} -overwrite

  # Generate Desktop File
  cd ${srcdir}
  gendesk -f -n \
    --name "Studio 3T" \
    --pkgname "$pkgname" \
    --pkgdesc "$pkgdesc" \
    --categories="Science;Education;Development;Application"
}

package() {
  cd ${srcdir}
  mkdir -p $pkgdir/opt/$pkgname
  install -Dm644 ${pkgname}/.install4j/Studio-3T.png ${pkgdir}/usr/share/pixmaps/${pkgname}.png
  cp -R ${pkgname}/. ${pkgdir}/opt/${pkgname}

  mkdir -p "$pkgdir/usr/bin/"
  mkdir -p "$pkgdir/usr/share/applications/"
  mkdir -p "$pkgdir/usr/share/licenses/$pkgname"

  ln -s "/opt/$pkgname/Studio-3T" "$pkgdir/usr/bin/$pkgname"
  install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
}