summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 030224a0ad90babae4a023d85a416c9524e65eb6 (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
#Maintainer: Musikolo<musikolo {at} hotmail [dot] com>
#Contributor: Martin špelina<shpelda [at]gmail[dot]com>
pkgname=dbvis
pkgver=24.3
__pkgver_underscore=24_3
pkgrel=1
pkgdesc="DbVisualizer free - The Universal Database Tool."
url="https://www.dbvis.com/"
license=('custom')
arch=('any')
depends=('java-runtime>=17')
makedepends=(coreutils sed unzip)
source=('https://dbvis.com/product_download/'$pkgname'-'$pkgver'/media/'$pkgname'_linux_'$__pkgver_underscore'.tar.gz')
sha256sums=('5b9a31185a073eba92bc555e1fa256044e3decc12a9edabbfa877f957ce04a78')

package() {

    msg2 "Relocating files..."
    mkdir -p "$pkgdir/opt"
    mv "$srcdir/DbVisualizer" "$pkgdir/opt/$pkgname"
    chmod a+x "$pkgdir/opt/$pkgname/dbvisgui.sh"
    mkdir -p "$pkgdir/usr/share/$pkgname"
    mv "$pkgdir/opt/$pkgname/doc" "$pkgdir/usr/share/$pkgname"
    mv "$pkgdir/opt/$pkgname/README.txt" "$pkgdir/usr/share/$pkgname/doc"
    chmod 644 "$pkgdir/opt/$pkgname/.install4j/i4jempty.ttf"

    msg2 "Installing app icon..."
    __dbvis_icon_dir="$pkgdir/usr/share/icons/hicolor/scalable/apps"
    mkdir -p "$__dbvis_icon_dir"
    unzip -o -j -q "$pkgdir/opt/$pkgname/lib/dbvis.jar" "images/lucide/dbvis-icon.svg" -d "$__dbvis_icon_dir"

    msg2 "Creating a .desktop file..."
    mkdir -p "$pkgdir/usr/bin"
    ln -s "/opt/$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname"
    __dbvis_desktop=/usr/share/applications/dbvis.desktop
    mkdir -p `dirname $pkgdir/$__dbvis_desktop`

    cat <<EOF > "$pkgdir/$__dbvis_desktop"
[Desktop Entry]
Type=Application
Name=DbVisualizer
Version=$pkgver
GenericName=The Universal Database Tool
Comment=$pkgdesc
Exec=/opt/$pkgname/dbvisgui.sh
Icon=${pkgname}-icon
Terminal=false
Categories=Development
StartupWMClass=com-onseven-dbvis-DbVisualizerGUI
EOF
}