Skip to content

Commit

Permalink
code cleanup to make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Ann1kaB committed Mar 25, 2020
1 parent dfb1fc0 commit 5716368
Showing 1 changed file with 36 additions and 42 deletions.
78 changes: 36 additions & 42 deletions srcpkgs/optimus-manager/template
Original file line number Diff line number Diff line change
@@ -1,64 +1,58 @@
# Template file for 'Optimus Manager'
# Template file for 'optimus-manager'
# Originally created by Askannz, ported to Void by Hyper-KVM

pkgname=optimus-manager
revision=1
version=1.2.2
revision=1
depends="python3 elogind mesa-demos xrandr python3-dbus"
makedepends="git"
hostmakedepends="python3 python3-setuptools"
wrksrc="optimus-manager"
archs="x86_64"
short_desc="Management utility to handle GPU switching for Optimus laptops (Git version)"
build_style=python3-module
short_desc="GPU switching for Optimus laptops"
maintainer="Hyper-KVM <hyperkvmx86@gmail.com>"
homepage="https://github.com/Askannz/optimus-manager"
license="MIT"
tags="python"

do_fetch(){
git clone https://github.com/Hyper-KVM/${pkgname}.git
git clone https://github.com/Hyper-KVM/${pkgname}.git
}

do_build() {
cd ${wrksrc}
python3 setup.py build
cd ${wrksrc}
python3 setup.py build
}

do_install() {
install="${wrksrc}/package/optimus-manager.install"

cd "${wrksrc}"

vinstall modules/optimus-manager.conf 644 usr/lib/modprobe.d/
vinstall runit/optimus-manager/run 755 etc/sv/optimus-manager
vinstall optimus-manager.conf 644 usr/share/
vinstall var/startup_mode 644 var/lib/optimus-manager/
vinstall var/requested_mode 644 var/lib/optimus-manager/

vinstall scripts/prime-switch-boot 755 usr/bin/
vinstall scripts/prime-switch 755 usr/bin/
vinstall scripts/prime-offload 755 usr/bin/

vinstall login_managers/sddm/20-optimus-manager.conf 644 etc/sddm.conf.d/
vinstall login_managers/lightdm/20-optimus-manager.conf 644 etc/lightdm/lightdm.conf.d/
vinstall config/xorg-intel.conf 644 etc/optimus-manager/
vinstall config/xorg-nvidia.conf 644 etc/optimus-manager/
vinstall config/xsetup-intel.sh 755 etc/optimus-manager/
vinstall config/xsetup-nvidia.sh 755 etc/optimus-manager/
vinstall config/xsetup-hybrid.sh 755 etc/optimus-manager/
vinstall config/nvidia-enable.sh 755 etc/optimus-manager/
vinstall config/nvidia-disable.sh 755 etc/optimus-manager/
vlicense LICENSE

python3 setup.py install --root="${wrksrc}" --optimize=1 --skip-build

cd "${wrksrc}/usr/bin"

vinstall optimus-manager 755 usr/bin/
vinstall optimus-manager-daemon 755 usr/bin/
vinstall optimus-manager-setup 755 usr/bin/
vmkdir "usr/lib/python3.8/site-packages/optimus_manager-${version}-py3.8.egg-info"
vcopy "${wrksrc}/optimus_manager.egg-info/*" "usr/lib/python3.8/site-packages/optimus_manager-${version}-py3.8.egg-info"
vmkdir "usr/lib/python3.8/site-packages/optimus_manager"
vcopy "${wrksrc}/optimus_manager/*" "usr/lib/python3.8/site-packages/optimus_manager/"
install="${wrksrc}/package/optimus-manager.install"
cd "${wrksrc}"
vinstall modules/optimus-manager.conf 644 usr/lib/modprobe.d/
vinstall runit/optimus-manager/run 755 etc/sv/optimus-manager
vinstall optimus-manager.conf 644 usr/share/
vinstall var/startup_mode 644 var/lib/optimus-manager/
vinstall var/requested_mode 644 var/lib/optimus-manager/
vbin scripts/prime-switch-boot
vbin scripts/prime-switch
vbin scripts/prime-offload
vinstall login_managers/sddm/20-optimus-manager.conf 644 etc/sddm.conf.d/
vinstall login_managers/lightdm/20-optimus-manager.conf 644 etc/lightdm/lightdm.conf.d/
vinstall config/xorg-intel.conf 644 etc/optimus-manager/
vinstall config/xorg-nvidia.conf 644 etc/optimus-manager/
vinstall config/xsetup-intel.sh 755 etc/optimus-manager/
vinstall config/xsetup-nvidia.sh 755 etc/optimus-manager/
vinstall config/xsetup-hybrid.sh 755 etc/optimus-manager/
vinstall config/nvidia-enable.sh 755 etc/optimus-manager/
vinstall config/nvidia-disable.sh 755 etc/optimus-manager/
vlicense LICENSE
python3 setup.py install --root="${wrksrc}" --optimize=1 --skip-build
cd "${wrksrc}/usr/bin"
vbin optimus-manager
vbin optimus-manager-daemon
vbin optimus-manager-setup
vmkdir "${py3_sitelib}/optimus_manager-${version}-py3.8.egg-info"
vcopy "${wrksrc}/optimus_manager.egg-info/*" "${py3_sitelib}/optimus_manager-${version}-py3.8.egg-info"
vmkdir "${py3_sitelib}/optimus_manager"
vcopy "${wrksrc}/optimus_manager/*" "${py3_sitelib}/optimus_manager/"
}

0 comments on commit 5716368

Please sign in to comment.