summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e6521ee4a1df6d27cad11c07cfadb68977897193 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Maintainer : sgar swhaat at github
# Contributor : Angel_Caido <geussepe at gmail dot com>
# Contributor : Sam Stuewe <halosghost at archlinux dot info>

pkgname=(epoptes epoptes-client)
pkgbase=epoptes-client
pkgver=20.01
pkgrel=2
pkgdesc='An opensource computer lab management and monitoring tool'
makedepends=(git python-distutils-extra)
url='https://github.com/Epoptes/epoptes'
license=(GPL3)
arch=(any)
source=("git+https://github.com/Epoptes/epoptes.git#tag=v${pkgver}")
sha256sums=('SKIP')

prepare()
{
	cd "${srcdir}/epoptes"
	python setup.py clean
	python setup.py config
}

package_epoptes()
{
	depends=(gobject-introspection
		gtk3
		iperf
		iproute2
		libfaketime
		libnotify
		librsvg
		notification-daemon
		openssl
		openssl
		pygtk
		python
		python-cairo
		python-dbus
		python-gobject
		python-netifaces
		python-pyopenssl
		python-pyopenssl
		python-service-identity
		python-twisted
		socat
		tigervnc
		x11vnc
		xterm)
	optdepends=('xfce4-notifyd: XFCE notification support')
	install=epoptes.install
	
	cd "${srcdir}/epoptes"
	python setup.py install --root="${pkgdir}/" --optimize=1

	install -m644 -D "${srcdir}/epoptes/debian/${pkgname}.service" \
		"${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
	install -m644 -D "${srcdir}/epoptes/debian/${pkgname}.default" \
		"${pkgdir}/etc/default/${pkgname}"
	install -m644 -D "${srcdir}/epoptes/debian/copyright" \
		"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

	rm -r "${pkgdir}/usr/sbin" "${pkgdir}/etc/xdg"

	mkdir "${pkgdir}/etc/epoptes"

	_rmdirs="epoptes-client man/man8"
	for rmdir  in $(echo $_rmdirs)
	do
		rm -r "${pkgdir}/usr/share/${rmdir}"
	done
}

package_epoptes-client()
{
	depends=(bsdmainutils
		ethtool
		iperf
		iperf
		iproute2
		libnotify
		librsvg
		openssl
		procps-ng
		pygtk
		python
		python-cairo
		screen
		socat
		tigervnc
		x11vnc
		xterm)
	optdepends=('xfce4-notifyd: XFCE notification support'
		'cups: printing support'
		'sane: scanners support')

	cd "${srcdir}/epoptes"
	python setup.py install --root="${pkgdir}/" --optimize=1
	
	install -m644 -D "${srcdir}/epoptes/debian/${pkgname}.service" \
		"${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
	install -m644 -D "${srcdir}/epoptes/debian/${pkgname}.default" \
		"${pkgdir}/etc/default/${pkgname}"
	install -m644 -D "${srcdir}/epoptes/debian/copyright" \
		"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

	rm -r "${pkgdir}/usr/bin" "${pkgdir}/usr/lib/python3.8"

	mv "${pkgdir}/usr/sbin" "${pkgdir}/usr/bin"

	_rmdirs="applications doc epoptes icons locale ltsp man/man1"	
	for rmdir  in $(echo $_rmdirs)
	do
		rm -r "${pkgdir}/usr/share/${rmdir}"
	done
}