summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ab04a8cac6372b1be46ecc08a82f3866167ee209 (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
# Maintener : Arnaud DURAND <durandarnaud44@free.fr>
pkgname='tchap-desktop'
pkgver=1.0
pkgrel=2
pkgdesc="A native-like OS X, Windows, & Linux desktop app for tchap"
arch=('x86_64' 'i686' 'pentium4' 'armv7h' 'aarch64')
url="https://tchap.gouv.fr"
license=('custom')
makedepends=('nodejs-nativefier')
source=(https://raw.githubusercontent.com/dinsic-pim/tchap-desktop/main/assets/tchap-logo.png)
sha256sums=('5a644f4a3a70f478c26dd7498fafdfea57e5b71cb1914115555e749bf1b0f08e' )

build() {

	nativefier --name "Tchap" --platform "linux" --arch "x64" --app-copyright "DINUM/MinArm" --conceal --icon '../tchap-logo.png' --insecure --internal-urls ".*?tchap\.gouv\.fr.*?" --maximize --disable-context-menu --disable-dev-tools --single-instance --tray "https://www.tchap.gouv.fr/"
}

package() {
	_INSTDIR="$srcdir"/Tchap-linux-x64
	mkdir -p "$pkgdir"/opt
	mv ${_INSTDIR} "$pkgdir"/opt/tchap-desktop
	mkdir -p "$pkgdir"/usr/bin
	ln -s /opt/tchap-desktop/Tchap "$pkgdir"/usr/bin/tchap
	install -Dm644 "$pkgdir"/opt/tchap-desktop/LICENSE "$pkgdir"/usr/share/licenses/tchap-desktop/LICENSE
	install -Dm644 tchap-logo.png "$pkgdir"/opt/tchap-desktop/tchap-logo.png
	install -Dm644 tchap-logo.png "$pkgdir"/usr/share/pixmaps/tchap.png
	mkdir -p "$pkgdir"/usr/share/applications
	echo "[Desktop Entry]" > "$pkgdir"/usr/share/applications/tchap-desktop.desktop
	echo "Version=$pkgver" >> "$pkgdir"/usr/share/applications/tchap-desktop.desktop
	echo "Name=Tchap Desktop" >> "$pkgdir"/usr/share/applications/tchap-desktop.desktop
	echo "Keywords=Message;Messaging" >> "$pkgdir"/usr/share/applications/tchap-desktop.desktop
	echo "Comment=Using Tchap client" >> "$pkgdir"/usr/share/applications/tchap-desktop.desktop
	echo "Exec=tchap" >> "$pkgdir"/usr/share/applications/tchap-desktop.desktop
	echo "Icon=tchap" >> "$pkgdir"/usr/share/applications/tchap-desktop.desktop
	echo "Type=Application" >> "$pkgdir"/usr/share/applications/tchap-desktop.desktop
	echo "Terminal=false" >> "$pkgdir"/usr/share/applications/tchap-desktop.desktop
	echo "Categories=Internet;Application;" >> "$pkgdir"/usr/share/applications/tchap-desktop.desktop
	








}
post_install() {
  post_upgrade
}

post_upgrade() {
  update-desktop-database -q
}