blob: b68be6244bb534a682471ca3564ed33f557ec02b (
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
57
58
59
60
61
62
63
64
65
66
67
|
# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop wrapper xdg
MY_PN=${PN%-*}
DESCRIPTION="Free universal database tool (community edition)"
HOMEPAGE="https://dbeaver.io/"
SRC_URI="
amd64? ( https://dbeaver.io/files/${PV}/dbeaver-ce-${PV}-linux-x86_64.tar.gz )
arm64? ( https://dbeaver.io/files/${PV}/dbeaver-ce-${PV}-linux-aarch64.tar.gz )
"
S=${WORKDIR}/${MY_PN}
LICENSE="Apache-2.0 EPL-1.0 BSD"
SLOT="0"
KEYWORDS="-* ~amd64 ~arm64"
RDEPEND="
>=virtual/jre-21:*
x11-libs/gtk+:3[wayland]
"
QA_PREBUILT="
opt/${MY_PN}-ce.*
"
src_prepare() {
sed -e "s/^Icon=.*/Icon=${MY_PN}/" \
-e 's:/usr/share/dbeaver:/opt/dbeaver:g' \
-e "s:^Exec=.*:Exec=${EPREFIX}/usr/bin/${MY_PN}:" \
-i "${MY_PN}-ce.desktop" || die
default
}
src_configure() {
# Remove JRE bundled
rm -r "${S}/jre" || die
# Remove unused plugins for other platforms
local JNA_DIR="${S}/plugins/com.sun.jna_5.18.1.v20251001-0800/com/sun/jna"
pushd "${JNA_DIR}" || die
for i in *-*; do
use amd64 && [[ ${i} == linux-x86-64 ]] && continue
use arm64 && [[ ${i} == linux-aarch64 ]] && continue
rm -rv "${JNA_DIR}/${i}" || die
done
popd || die
}
src_install() {
doicon -s 128 "${MY_PN}.png"
newicon icon.xpm "${MY_PN}.xpm"
domenu "${MY_PN}-ce.desktop"
local DOCS=( readme.txt )
einstalldocs
rm -vf "${MY_PN}-ce.desktop" "${MY_PN}.png" icon.xpm readme.txt || die
insinto "/opt/${MY_PN}-ce"
doins -r ./*
fperms 755 "/opt/${MY_PN}-ce/${MY_PN}"
make_wrapper "${MY_PN}" "/opt/${MY_PN}-ce/${MY_PN}" "/opt/${MY_PN}-ce"
}
|