summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorShatur952019-02-27 00:14:27 +0200
committerShatur952019-02-27 00:14:27 +0200
commitedb462ff48233f9424c07fd782de1ebaa6856203 (patch)
tree3fcf02cfca6682a84986ea0a1db286416c58fe3a /PKGBUILD
downloadaur-edb462ff48233f9424c07fd782de1ebaa6856203.tar.gz
Initial commit
Diffstat (limited to 'PKGBUILD')
-rwxr-xr-xPKGBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 000000000000..df83ba84263b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Shatur <genaloner@gmail.com>
+
+# Use KDE API features (recommended for KDE users)
+KDE=false
+
+pkgname=optimus-manager-qt-git
+pkgver=r18.21b1b58
+pkgrel=1
+pkgdesc="A Qt interface for Optimus Manager that allows to configure and switch GPUs on Optimus laptops using the tray menu"
+arch=('x86_64')
+url="https://github.com/Shatur95/optimus-manager-qt"
+license=('GPL3')
+depends=('qt5-base' 'optimus-manager')
+makedepends=('qt5-tools' 'git')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("git+https://github.com/Shatur95/optimus-manager-qt")
+sha256sums=('SKIP')
+
+if [ ${KDE} == true ]; then
+ depends+=('knotifications')
+fi
+
+pkgver() {
+ cd "${pkgname%-git}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+# Clone submodules
+prepare() {
+ cd "${pkgname%-git}"
+
+ git submodule init
+ git submodule update
+}
+
+build() {
+ cd "${pkgname%-git}"
+
+ if [ ${KDE} == true ]; then
+ qmake "DEFINES += KDE"
+ else
+ qmake
+ fi
+
+ make
+}
+
+package() {
+ cd "${pkgname%-git}"
+
+ make INSTALL_ROOT="$pkgdir/" install
+}