summarylogtreecommitdiffstats
path: root/update.sh
blob: 908f76e9e0b214896e290c1e7e1dfa2d33d4fefd (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
#! /bin/sh

set -xe

_name='Beekeeper Studio'
_pkgname='beekeeper-studio'
_url_source='https://github.com/beekeeper-studio/beekeeper-studio'

if [[ $# == 0 ]]; then
    echo 'Usage: ./update.sh VERSION_NUMBER'
    exit 1
fi
pkgrel=1
if [[ $# == 2 ]]; then
    pkgrel=$2
fi

printf '' > PKGBUILD
echo "# Maintainer: Sitansh Rajput <me [at] lostpolaris [dot] com>
# Maintainer: Caltlgin Stsodaat <contact@fossdaily.xyz>
# Contributor: Michael Lutonsky <m@luto.at>
# Contributor: Tássio Virgínio <tassiovirginio@gmail.com>

pkgname='${_pkgname}-bin'
pkgver=$1
pkgrel=1
pkgdesc='Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more'
arch=('x86_64' 'aarch64')
url='https://www.beekeeperstudio.io'
license=('MIT')
depends=('libappindicator-gtk3' 'libnotify' 'libsecret' 'libxss' 'libxslt' 'nodejs' 'nss' 'xdg-utils')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("${_pkgname}-$1-license::${_url_source}/raw/v$1/LICENSE.md")
source_x86_64=("${_url_source}/releases/download/v$1/${_pkgname}_$1_amd64.deb")
source_aarch64=("${_url_source}/releases/download/v$1/${_pkgname}_$1_arm64.deb")
sha256sums=()
sha256sums_x86_64=()
sha256sums_aarch64=()

package() {
  tar -xvf 'data.tar.xz' -C \"\${pkgdir}\"
  rm -rf \"\${pkgdir}/usr/share/doc\"
  install -dv \"\${pkgdir}/usr/bin\"
  ln -sfv \"/opt/${_name}/${_pkgname}\" -t \"\${pkgdir}/usr/bin\"
  install -Dvm644 \"\${pkgdir}/opt/${_name}/\"{'LICENSE.electron.txt','LICENSES.chromium.html'} \\
    -t \"\${pkgdir}/usr/share/licenses/${_pkgname}\"
  install -Dvm644 \"${_pkgname}-$1-license\" \"\${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE\"
}
" >> PKGBUILD

updpkgsums
makepkg --printsrcinfo > .SRCINFO

# Test
makepkg -f