summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 33e0dbd1cd70fe4eabd3bef994a03d29303dcb68 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
# Maintainer: David Birks <david@tellus.space>
# Contributor: Michele Cereda <cereda.michele@gmail.com>
# Contributor: JokerYu <dayushinn@gmail.com>
# Contributor: Olivier Bilodeau <obilodeau@gosecure.ca>

pkgname="forticlientsslvpn"
pkgver="4.4.2334"
pkgrel="1"
pkgdesc="Fortinet's SSLVPN Client for linux"
arch=("i686" "x86_64")
install="${pkgname}.install"

url="https://support.fortinet.com"
license=("custom:FortiClientSSLVPN")

depends=(
	"gtk2"
	"libsm"
	"net-tools"
	"ppp"
)
optdepends=(
	"gtk-engines: for gtk theme support"
	"gnome-themes-standard: for theming"
)

source=(
	"https://github.com/dbirks/forticlientsslvpn/raw/master/tarball/${pkgname}_linux_${pkgver}.tar.gz"
	"${pkgname}.desktop"
	"${pkgname}.png"
	"${pkgname}.sh"
	"${pkgname}_cli.sh"
)
sha256sums=('3b2ebe9324b2933139bcdb44f2fdbda1e895490609688d2e288bc5a5ea9dfdd9'
            '4f63f4503dca7633a4d7a1cf874ede1f33f877a701813349c5cd63889151f4a2'
            '15d46db76a39f32736ee3a469fc1b821e6290453c701af823875a493d06901df'
            '5d4737629cadf38194ffc68d927a202cbac5f9fbcf825f11407c00e6a15842fb'
            '92f0dcc5431221d6832220b3ddec8d9606fff9ded4f8590eabd1c9ff3e37cb8b')

if   [ "$CARCH" = "i686"   ]; then _arch="32bit"
elif [ "$CARCH" = "x86_64" ]; then _arch="64bit"
fi
options=( !strip )

package() {
	msg "Creating folders..."
	mkdir -p ${pkgdir}/opt/fortinet/${pkgname}/icons
	mkdir -p ${pkgdir}/usr/bin
	mkdir -p ${pkgdir}/usr/share/applications
	mkdir -p ${pkgdir}/usr/share/licenses/${pkgname}

	msg "Copying files..."
	cp -rp ${srcdir}/${pkgname}/${_arch}/* ${pkgdir}/opt/fortinet/${pkgname}

	msg "Setting acceptable permissions..."
	chmod 555 ${pkgdir}/opt/fortinet/${pkgname}/helper

	msg "Installing files..."
	install -Dm 644 ${srcdir}/${pkgname}.png ${pkgdir}/opt/fortinet/${pkgname}/icons/
	install -Dm 644 ${srcdir}/${pkgname}.desktop ${pkgdir}/usr/share/applications/
	install -Dm 644 ${srcdir}/${pkgname}/${_arch}/helper/License.txt ${pkgdir}/usr/share/licenses/${pkgname}/
	
	msg "Installing launchers"
	# needed by the program since it checks that the executable is launched from /opt/fortinet/forticlientsslvpn/
	install -Dm 755 ${srcdir}/${pkgname}.sh ${pkgdir}/usr/bin/${pkgname}
	install -Dm 755 ${srcdir}/${pkgname}_cli.sh ${pkgdir}/usr/bin/${pkgname}_cli
}