1 # Maintainer: Muflone http://www.muflone.com/contacts/english/
2 # Contributor: Arne Hoch <arne@derhoch.de>
7 pkgdesc="Free universal SQL Client for developers and database administrators (community edition)"
9 url="https://dbeaver.io/"
11 depends=('java-runtime>=11' 'gtk3' 'gtk-update-icon-cache' 'libsecret')
12 makedepends=('maven' 'java-runtime<15')
13 optdepends=('dbeaver-plugin-office: export data in Microsoft Office Excel format'
14 'dbeaver-plugin-svg-format: save diagrams in SVG format')
15 conflicts=('dbeaver-plugin-sshj-lib')
16 replaces=('dbeaver-plugin-sshj-lib')
17 source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/dbeaver/dbeaver/archive/${pkgver}.tar.gz"
18 "io.${pkgname}.DBeaver.desktop"
20 "${pkgname}.profile.gz"
23 sha256sums=('ddebd3b5b934bd34785037f6647d8f827a92c60b20983615d2902a6aae2e4050'
24 '9480a7d08f680e10c399db070c5a04cbabf282442602a2ef83d1159fe7c3e88b'
25 '406a2980806c394670e88b1ae70134900be376c2ea4a4216610591cc8b557526'
26 '1863e74bdcf22b7328e6e8487cbebff7d5360e34bde85c1dd226b168b4737034'
27 'f8b763ca210bfa4d9a4e407b656ba4f5d1bf2f3f54c67044f7a4dd0c3625fc22'
28 'f8d65dd933049b587a5815ea75a30ef944300b812df383ca1c2dcd68280bc7ab')
29 install="${pkgname}.install"
32 # Fix version number in profile file
33 gzip --decompress --keep --stdout "${pkgname}.profile.gz" |
34 sed "s/DBEAVER_VERSION/${pkgver}/g" |
35 gzip -9 > "${pkgname}.profile-${pkgver}.gz"
37 # Avoid the use of any Java 15/16/17/18, actually incompatible with the build
38 export JAVA_HOME="/usr/lib/jvm/$(archlinux-java status | tail -n +2 | sort | cut -d ' ' -f 3 | sort -nr -k 2 -t '-' | grep -vE '15-|16-|17-|18-' -m 1)"
39 cd "${pkgname}-${pkgver}"
41 # Download dependencies during prepare FS#55873
42 # https://bugs.archlinux.org/task/55873
43 export MAVEN_OPTS="-Xmx2048m"
44 mvn --batch-mode validate
48 cd "${pkgname}-${pkgver}"
49 mvn --batch-mode package
53 cd "${pkgname}-${pkgver}/product/community"
54 # Install icons into /usr/share/icons/hicolor
55 for _size in 16 32 48 64 128 256 512
57 install -m 644 -D "icons-sources/icon_${_size}x${_size}.png" \
58 "${pkgdir}/usr/share/icons/hicolor/${_size}x${_size}/apps/dbeaver.png"
61 # Move into the target directory
62 cd "target/products/org.jkiss.dbeaver.core.product/linux/gtk/${CARCH}"
64 # Initially install everything into /usr/lib/dbeaver
65 install -m 755 -d "${pkgdir}/usr/lib"
66 cp -r "dbeaver" "${pkgdir}/usr/lib/${pkgname}"
68 # Move shared data to /usr/share/dbeaver
69 cd "${pkgdir}/usr/lib/${pkgname}"
70 install -m 755 -d "${pkgdir}/usr/share/${pkgname}"
71 for _file in configuration features p2 .eclipseproduct artifacts.xml dbeaver.ini readme.txt
73 mv "${_file}" "${pkgdir}/usr/share/${pkgname}"
74 ln -s "/usr/share/${pkgname}/${_file}" .
77 # Install additional licenses
78 install -m 755 -d "${pkgdir}/usr/share/licenses"
79 mv licenses "${pkgdir}/usr/share/licenses/${pkgname}"
80 ln -s "/usr/share/licenses/${pkgname}" "${pkgdir}/usr/lib/${pkgname}/licenses"
83 install -m 755 -d "${pkgdir}/usr/share/pixmaps"
84 mv dbeaver.png "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
85 mv icon.xpm "${pkgdir}/usr/share/pixmaps/${pkgname}.xpm"
87 # Install executable script into /usr/bin
88 install -m 755 -d "${pkgdir}/usr/bin"
89 install -m 755 "${srcdir}/dbeaver.sh" "${pkgdir}/usr/bin/${pkgname}"
91 # Install application launcher into /usr/share/applications
92 install -m 755 -d "${pkgdir}/usr/share/applications"
93 install -m 755 -t "${pkgdir}/usr/share/applications" "${srcdir}/io.${pkgname}.DBeaver.desktop"
95 # Clean up and install new profile
96 rm -rf "${pkgdir}/usr/share/${pkgname}/p2/org.eclipse.equinox.p2.core"
97 cd "${pkgdir}/usr/share/${pkgname}/p2/org.eclipse.equinox.p2.engine/profileRegistry/DefaultProfile.profile"
98 find . -name "*.profile.gz" -delete
99 install -m 644 "${srcdir}/${pkgname}.profile-${pkgver}.gz" "1502633007017.profile.gz"
100 cd "${pkgdir}/usr/share/${pkgname}/p2/org.eclipse.equinox.p2.engine"
101 rm -f ".settings/org.eclipse.equinox.p2.artifact.repository.prefs"
102 rm ".settings/org.eclipse.equinox.p2.metadata.repository.prefs"
105 # Install system hook
106 install -m 755 -d "${pkgdir}/usr/share/libalpm/hooks"
107 install -m 644 "${srcdir}/${pkgname}.hook" "${pkgdir}/usr/share/libalpm/hooks"
109 # Create configuration file (handled by the hook)
110 cd "${pkgdir}/usr/share/dbeaver/configuration/org.eclipse.equinox.simpleconfigurator"
111 install -m 755 -d "${pkgdir}/etc/${pkgname}/bundles.d"
112 mv "bundles.info" "${pkgdir}/etc/${pkgname}/bundles.d/00-${pkgname}.info"
113 ln -s "/etc/${pkgname}/bundles.info" .