summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5e3e2c238f559104f4a33ca563170fcac884578f (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
# Maintainer: aimileus <me at aimileus dot nl>
pkgname=protonmail-bridge
_pkgver=1.0.4
_pkgrel=1
pkgver="${_pkgver}.${_pkgrel}"
pkgrel=1
pkgdesc="Application to use IMAP/SMTP with your paid ProtonMail account"
arch=('x86_64')
url="https://protonmail.com/bridge/"
license=('custom' 'MIT')
depends=(
  'libsecret'
  'gnome-keyring'
  'qt5-svg'
  'qt5-declarative'
  'qt5-multimedia'
  'ttf-dejavu'
)
options=('!strip')
source=("https://protonmail.com/download/protonmail-bridge_${_pkgver}-${_pkgrel}_amd64.deb")
sha256sums=('032fc486069c3a69bd01fd48ab1428d605c765d06fecfe5a5052fb5d3a18a10e')

package() {
	tar xvJf data.tar.xz -C "$pkgdir"

	# Tarball files are owned by UID:1000
	chown -R root:root "$pkgdir"

	# Don't pollute /usr/share/icons
	install -D "$pkgdir/usr/share/icons/protonmail/Desktop-Bridge.svg" \
		"$pkgdir/usr/share/icons/hicolor/scalable/apps/protonmail-bridge.svg"
	rm -rf "$pkgdir/usr/share/icons/protonmail"

	# Update desktop entry with appropriate values
	mv "$pkgdir/usr/share/applications/Desktop-Bridge.desktop" \
		"$pkgdir/usr/share/applications/protonmail-bridge.desktop" 
	sed -i "s|Icon=/usr/share/icons/protonmail/Desktop-Bridge.svg|Icon=protonmail-bridge|" "$pkgdir/usr/share/applications/protonmail-bridge.desktop"

	install -Dm644 "$pkgdir"/usr/lib/protonmail/bridge/{eula.txt,LICENSE} \
		-t "$pkgdir/usr/share/licenses/$pkgname"
}