summarylogtreecommitdiffstats
path: root/simplenote-electron-arm-bin.install
blob: 80b1d2b73f56d4c96c88de53c48bf6e18568557e (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
### Environmental Vars ###
pkgname=simplenote-electron-arm-bin
_pkgname=simplenote

### Post Install ###
post_install() {
	## Symlink Files ##
	ln -fs \
	"$pkgdir"/opt/$_pkgname/${_pkgname}.desktop \
	"$pkgdir"/usr/share/applications/${_pkgname}.desktop
	ln -fs \
	"$pkgdir"/opt/$_pkgname/$_pkgname \
	"$pkgdir"/usr/bin/$_pkgname
	
	## Symlink Licenses ##
	ln -fs \
	"$pkgdir"/opt/$_pkgname/LICENSE.electron.txt \
	"$pkgdir"/usr/share/licenses/$pkgname/LICENSE.electron.txt
	ln -fs \
	"$pkgdir"/opt/$_pkgname/LICENSES.chromium.html \
	"$pkgdir"/usr/share/licenses/$pkgname/LICENSES.chromium.html
	
	## Change Permissions on Sandbox ##
	chmod 4755 "$pkgdir"/opt/$_pkgname/chrome-sandbox
}

### Post Upgrade ###
post_upgrade() {    
	## Change Permissions on Sandbox ##
	chmod 4755 "$pkgdir"/opt/$_pkgname/chrome-sandbox
}

### Post Remove ###
post_remove() {
	## Remove Symlinks ##
	rm \
	"$pkgdir"/usr/share/applications/${_pkgname}.desktop \
	"$pkgdir"/usr/bin/$_pkgname
}