summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4c6501c21f790442d34ed79b914913161353d8ad (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
pkgname=sql-workbench
pkgver=125
pkgrel=1
epoch=
pkgdesc="SQL Workbench/J is a free, DBMS-independent, cross-platform SQL query tool."
arch=('any')
url="http://www.sql-workbench.net/"
license=('custom')
depends=('java-runtime>=8')
makedepends=(
    'unzip'
)
provides=('SQL-Workbench')
replaces=('sqlworkbench')
source=("http://www.sql-workbench.net/Workbench-Build${pkgver}.zip")
noextract=("Workbench-Build${pkgver}.zip")
sha256sums=('9534f115fff372a43ec2ae044d97fca660e3bcfd43552da4cc585f0148e458e1')

build() {
    unzip "Workbench-Build${pkgver}".zip
    rm "Workbench-Build${pkgver}".zip

    sed -i -e 's/Exec=.*/Exec=sqlworkbench/' \
        -e '/^Path=$/d' \
        sqlworkbench.desktop
}

package() {
    cd $srcdir

    # Need to keep manual and history in same dir as jar
    install -m 644 -D -t $pkgdir/opt/SQLWorkbench \
          sqlworkbench.jar \
          log4j-sample.xml \
          SQLWorkbench-Manual.pdf \
          history.html
    install -m 755 -D -t $pkgdir/opt/SQLWorkbench \
          sqlworkbench.sh \
          sqlwbconsole.sh
    install -m 644 -D -t $pkgdir/usr/share/sqlworkbench/xslt           xslt/*.*
    install -m 644 -D -t $pkgdir/usr/share/sqlworkbench/manual         manual/*.*
    install -m 644 -D -t $pkgdir/usr/share/sqlworkbench/manual/images  manual/images/*.*
    install -m 644 -D -t $pkgdir/usr/share/pixmaps                     workbench32.png
    install -m 644 -D -t $pkgdir/usr/share/icons/hicolor/32x32/apps    workbench32.png
    install -m 644 -D -t $pkgdir/usr/share/licenses/sqlworkbench       LICENSE
    install -m 644 -D -t $pkgdir/usr/share/applications                sqlworkbench.desktop
    ln -s /opt/SQLWorkbench/history.html $pkgdir/usr/share/sqlworkbench/
    ln -s /opt/SQLWorkbench/SQLWorkbench-Manual.pdf $pkgdir/usr/share/sqlworkbench/

    # Create app link in /usr/bin
    install -d $pkgdir/usr/bin
    ln -s /opt/SQLWorkbench/sqlworkbench.sh $pkgdir/usr/bin/sqlworkbench
}