summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Tari2020-07-05 11:11:55 +0200
committerRobert Tari2020-07-05 11:11:55 +0200
commite67d13f56fb6308235d4f5b555d373f1bc4aca46 (patch)
tree97aa0e05cdbe6ed4bbf949f478b8bd59e99ae9bf
downloadaur-e67d13f56fb6308235d4f5b555d373f1bc4aca46.tar.gz
Initial commit
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD35
-rw-r--r--lampswitch.install43
3 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..944cef68a38
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = lampswitch
+ pkgdesc = Indicator and control applet for Apache
+ pkgver = 20.7.5.34
+ pkgrel = 1
+ url = https://tari.in/www/software/lampswitch
+ install = lampswitch.install
+ arch = any
+ license = GPL3
+ makedepends = breezy
+ makedepends = python-setuptools
+ makedepends = python-polib
+ depends = gobject-introspection
+ depends = gtk3
+ depends = python-gobject
+ depends = libappindicator-gtk3
+ depends = desktop-file-utils
+ optdepends = mate-ayatana-indicator-applet
+ optdepends = libayatana-appindicator-gtk3
+ source = bzr+lp:/lampswitch/trunk
+ md5sums = SKIP
+
+pkgname = lampswitch
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..bfce3503ec9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Author: Robert Tari <robert at tari dot in>
+# Maintainer: Robert Tari <robert at tari dot in>
+
+pkgname="lampswitch"
+pkgver=20.7.5.34
+pkgrel=1
+pkgdesc="Indicator and control applet for Apache"
+arch=("any")
+url="https://tari.in/www/software/lampswitch"
+license=("GPL3")
+depends=("gobject-introspection" "gtk3" "python-gobject" "libappindicator-gtk3" "desktop-file-utils")
+makedepends=("breezy" "python-setuptools" "python-polib")
+optdepends=("mate-ayatana-indicator-applet" "libayatana-appindicator-gtk3")
+install="${pkgname}.install"
+source=("bzr+lp:/${pkgname}/trunk")
+md5sums=("SKIP")
+
+pkgver()
+{
+ cd trunk
+ echo "$(cat ${pkgname/\-/}/appdata.py | grep APPVERSION | sed 's| ||g' | sed "s|'||g" | cut -f '2' -d '=').$(bzr revno)"
+}
+
+build()
+{
+ cd trunk
+ python setup.py build
+}
+
+package()
+{
+ cd trunk
+ python setup.py install --root="${pkgdir}" --optimize=1
+
+}
diff --git a/lampswitch.install b/lampswitch.install
new file mode 100644
index 00000000000..f3d03de2ba0
--- /dev/null
+++ b/lampswitch.install
@@ -0,0 +1,43 @@
+post_install()
+{
+ if which pycompile >/dev/null 2>&1; then
+ pycompile -p lampswitch
+ fi
+
+ chmod +x /usr/share/lampswitch/services.sh
+ if systemctl is-active httpd --quiet; then systemctl disable httpd --quiet; fi
+ if systemctl is-active postgresql --quiet; then systemctl disable postgresql --quiet; fi
+ if systemctl is-active mysql --quiet; then systemctl disable mysql --quiet; fi
+ if systemctl is-active postgresql --quiet; then systemctl disable postgresql --quiet; fi
+ if systemctl is-active mariadb --quiet; then systemctl disable mariadb --quiet; fi
+
+ gtk-update-icon-cache -q -f usr/share/icons/hicolor
+ gtk-update-icon-cache -q -f usr/share/icons/ubuntu-mono-dark
+ gtk-update-icon-cache -q -f usr/share/icons/ubuntu-mono-light
+ update-desktop-database -q
+}
+
+post_upgrade()
+{
+ post_install
+}
+
+pre_remove()
+{
+ if which pyclean >/dev/null 2>&1; then
+ pyclean -p lampswitch
+ else
+ pacman -Qql lampswitch | grep '\.py$' | while read file
+ do
+ rm -f "${file}"[co] >/dev/null
+ done
+ fi
+}
+
+post_remove()
+{
+ gtk-update-icon-cache -q -f usr/share/icons/hicolor
+ gtk-update-icon-cache -q -f usr/share/icons/ubuntu-mono-dark
+ gtk-update-icon-cache -q -f usr/share/icons/ubuntu-mono-light
+ update-desktop-database -q
+}