53 lines
2.3 KiB
Bash
53 lines
2.3 KiB
Bash
# Template file for 'protonmail-bridge'
|
|
pkgname=protonmail-bridge
|
|
version=3.12.0
|
|
revision=2
|
|
archs="x86_64* aarch64* riscv64*"
|
|
build_style=cmake
|
|
build_helper=qmake6
|
|
build_wrksrc="internal/frontend/bridge-gui/bridge-gui"
|
|
configure_args="-DBRIDGE_APP_FULL_NAME=ProtonMailBridge -DBRIDGE_VENDOR=ProtonAG
|
|
-DBRIDGE_BUILD_ENV=xbps -DBRIDGE_TAG=${version} -DBRIDGE_REVISION=${revision}
|
|
-DBRIDGE_APP_VERSION=${version} -DProtobuf_PROTOC_EXECUTABLE=/usr/bin/protoc"
|
|
go_import_path="github.com/ProtonMail/proton-bridge/v3"
|
|
go_ldflags="-X ${go_import_path}/internal/constants.Version=${version}
|
|
-X ${go_import_path}/internal/constants.Revision=${revision}
|
|
-X ${go_import_path}/internal/constants.Tag=${version}
|
|
-X ${go_import_path}/internal/constants.FullAppName=ProtonMailBridge
|
|
-X ${go_import_path}/internal/constants.BuildEnv=xbps"
|
|
hostmakedepends="go pkg-config qt6-base qt6-tools protobuf grpc"
|
|
makedepends="libglvnd-devel libsecret-devel qt6-base-devel qt6-declarative-devel
|
|
qt6-svg-devel qt6-wayland-devel sentry-native-devel grpc-devel protobuf-devel
|
|
gtest-devel"
|
|
depends="qt6-svg"
|
|
short_desc="ProtonMail Bridge for use with E-mail software"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="https://proton.me/mail/bridge"
|
|
distfiles="https://github.com/ProtonMail/proton-bridge/archive/refs/tags/v${version}.tar.gz"
|
|
checksum=4215fd1848fff262da55194270f495e19722cdf8bbf98dbe3ca4ff5ca5aa4a1f
|
|
nopie_files="/usr/libexec/protonmail/bridge"
|
|
nocross="protobuf generation fails"
|
|
|
|
post_patch() {
|
|
vsed -i -e 's/^Exec=.*$/Exec=protonmail-bridge-gui/' "$wrksrc"/dist/proton-bridge.desktop
|
|
}
|
|
|
|
pre_build() {
|
|
cd "$wrksrc"
|
|
( cd ./utils/ && ./credits.sh bridge )
|
|
. /void-packages/common/environment/build-style/go.sh
|
|
go build -p "$XBPS_MAKEJOBS" -modcacherw -v -tags "${go_build_tags}" -ldflags "${go_ldflags}" \
|
|
-o proton-bridge ./cmd/Desktop-Bridge
|
|
}
|
|
|
|
do_install() {
|
|
vinstall "$wrksrc"/proton-bridge 755 usr/libexec/protonmail bridge
|
|
vinstall build/bridge-gui 755 usr/libexec/protonmail bridge-gui
|
|
vmkdir usr/bin
|
|
ln -s ../libexec/protonmail/bridge "$DESTDIR"/usr/bin/protonmail-bridge
|
|
ln -s ../libexec/protonmail/bridge-gui "$DESTDIR"/usr/bin/protonmail-bridge-gui
|
|
vinstall "$wrksrc"/dist/proton-bridge.desktop 644 usr/share/applications
|
|
vinstall "$wrksrc"/dist/bridge.svg 644 usr/share/icons/hicolor/scalable/apps protonmail-bridge.svg
|
|
}
|