net-im/wechat-universal-bwrap: revbump, fix launcher script on openrc
[gentoo-zh.git] / dev-db / dbeaver-bin / dbeaver-bin-24.0.1.ebuild
blob069ceabccd602be931c8de82b8f948c424d563b8
1 # Copyright 2019-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
5 inherit desktop wrapper xdg
7 DESCRIPTION="Free universal database tool (community edition)."
8 HOMEPAGE="https://dbeaver.io/"
9 MY_PN="${PN%-bin*}"
10 SRC_URI="https://dbeaver.io/files/${PV}/${MY_PN}-ce-${PV}-linux.gtk.x86_64-nojdk.tar.gz -> ${P}-amd64.tar.gz"
12 LICENSE="Apache-2.0 EPL-1.0 BSD"
13 SLOT="0"
14 KEYWORDS="~amd64"
16 RDEPEND="dev-java/openjdk-bin:17"
17 DEPEND="${RDEPEND}"
19 S="${WORKDIR}/${MY_PN}"
21 src_prepare() {
22 sed -e "s/^Icon=.*/Icon=${MY_PN}/" \
23 -e 's:/usr/share/dbeaver:/opt/dbeaver:g' \
24 -e '/^WMCLASS.*/d' \
25 -e "s:^Exec=.*:Exec=${EPREFIX}/usr/bin/${MY_PN}:" \
26 -i "${MY_PN}-ce.desktop" || die
27 default
30 src_install() {
31 doicon -s 128 "${MY_PN}.png"
32 newicon icon.xpm "${MY_PN}.xpm"
33 domenu "${MY_PN}-ce.desktop"
34 einstalldocs
35 rm "${MY_PN}-ce.desktop" "${MY_PN}.png" icon.xpm readme.txt || die
36 insinto "/opt/${MY_PN}-ce"
37 doins -r *
38 fperms 0755 "/opt/${MY_PN}-ce/${MY_PN}"
39 make_wrapper "${MY_PN}" "/opt/${MY_PN}-ce/${MY_PN}" "/opt/${MY_PN}-ce"
40 sed -e "s:^exec /opt/${MY_PN}-ce/${MY_PN}:exec /opt/${MY_PN}-ce/${MY_PN} -vm ${EPREFIX}/opt/openjdk-bin-17/bin:" \
41 -i "${D}/usr/bin/${MY_PN}" || die