summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Garnica2018-11-08 13:01:35 +0100
committerSergio Garnica2018-11-08 13:01:35 +0100
commit65745164f43433e971b5856cde7b0810aaeca007 (patch)
tree7ad2d0f7edbeaf926d437f16160418ef20b5db61
downloadaur-65745164f43433e971b5856cde7b0810aaeca007.tar.gz
Initial commit
-rw-r--r--.SRCINFO60
-rw-r--r--PKGBUILD114
-rw-r--r--epoptes.install52
3 files changed, 226 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d3a3c66aabba
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,60 @@
+pkgbase = epoptes-client
+ pkgdesc = An opensource computer lab management and monitoring tool
+ pkgver = 1.0.1
+ pkgrel = 2.1
+ url = https://github.com/Epoptes/epoptes
+ arch = any
+ license = GPL3
+ makedepends = git
+ makedepends = python-distutils-extra
+ source = git+https://github.com/Epoptes/epoptes.git#tag=1.0.1-2
+ sha256sums = SKIP
+
+pkgname = epoptes
+ install = epoptes.install
+ depends = gobject-introspection
+ depends = gtk3
+ depends = libfaketime
+ depends = librsvg
+ depends = notification-daemon
+ depends = iperf
+ depends = iproute2
+ depends = openssl
+ depends = python
+ depends = python-pyopenssl
+ depends = openssl
+ depends = pygtk
+ depends = python-dbus
+ depends = python-gobject
+ depends = python-cairo
+ depends = python-netifaces
+ depends = python-pyopenssl
+ depends = python-service-identity
+ depends = python-twisted
+ depends = socat
+ depends = tigervnc
+ depends = xterm
+ depends = x11vnc
+ optdepends = xfce4-notifyd: XFCE notification support
+
+pkgname = epoptes-client
+ depends = bsdmainutils
+ depends = iperf
+ depends = iproute2
+ depends = librsvg
+ depends = procps-ng
+ depends = python
+ depends = screen
+ depends = iperf
+ depends = pygtk
+ depends = socat
+ depends = x11vnc
+ depends = tigervnc
+ depends = x11vnc
+ depends = openssl
+ depends = xterm
+ depends = ethtool
+ optdepends = xfce4-notifyd: XFCE notification support
+ optdepends = cups: printing support
+ optdepends = sane: scanners support
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..732aa352ddae
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,114 @@
+# 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=1.0.1
+pkgrel=2.1
+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=${pkgver}-2")
+sha256sums=('SKIP')
+
+prepare()
+{
+ cd "${srcdir}/epoptes"
+ python setup.py clean
+ python setup.py config
+}
+
+package_epoptes()
+{
+ depends=(gobject-introspection
+ gtk3
+ libfaketime
+ librsvg
+ notification-daemon
+ iperf
+ iproute2
+ openssl
+ python
+ python-pyopenssl
+ openssl
+ pygtk
+ python-dbus
+ python-gobject
+ python-cairo
+ python-netifaces
+ python-pyopenssl
+ python-service-identity
+ python-twisted
+ socat
+ tigervnc
+ xterm
+ x11vnc)
+ 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
+ iperf
+ iproute2
+ librsvg
+ procps-ng
+ python
+ screen
+ iperf
+ pygtk
+ socat
+ x11vnc
+ tigervnc
+ x11vnc
+ openssl
+ xterm
+ ethtool)
+ 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.7"
+
+ 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
+}
diff --git a/epoptes.install b/epoptes.install
new file mode 100644
index 000000000000..0eb5462f2cdf
--- /dev/null
+++ b/epoptes.install
@@ -0,0 +1,52 @@
+post_install() {
+
+ if getent group epoptes
+ then
+ "Group 'epoptes' already exists. Skipping group's creation."
+ else
+ groupadd epoptes
+ echo "Group 'epoptes' has been added."
+ fi
+
+ if ! [ -s /etc/epoptes/server.key ] || ! [ -s /etc/epoptes/server.crt ]
+ then
+ faketime '1970-01-01 00:00:00 UTC' \
+ openssl req -batch -x509 -nodes \
+ -newkey rsa:4096 -days $(($(date --utc +%s) / 86400 + 3652)) \
+ -keyout /etc/epoptes/server.key -out /etc/epoptes/server.crt
+ chmod 600 /etc/epoptes/server.key
+ fi
+
+ echo "The installation has finished. Please bare in mind you'll have to do the following before using Epoptes:"
+ echo "1.- You will have to add yourself to the 'epoptes' group."
+ echo "2.- You will have to run as root:"
+ echo " 'systemctl enable epoptes' to enable the Epoptes server daemon."
+ echo "3.- You may need to restart your system for everything to work."
+ echo "4.- If you don't want to restart your system, then [after doing all of the above] you will have to run as root:"
+ echo " 'systemctl start epoptes' to start the Epoptes server daemon."
+ echo "After all this you still have to log out and then log back in and now Epoptes should work without a problem."
+}
+
+post_upgrade() {
+ systemctl daemon-reload
+}
+
+pre_remove() {
+ systemctl stop epoptes.service
+ systemctl disable epoptes.service
+}
+
+post_remove() {
+ rm -f /etc/epoptes/server.key
+ rm -f /etc/epoptes/server.crt
+
+ if getent group epoptes
+ then
+ groupdel epoptes
+ echo "Group 'epoptes' has been deteled."
+ else
+ echo "Group 'epoptes' doesn't exist. Skipping group's removal."
+ fi
+
+ systemctl daemon-reload
+}