summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Weiss2019-03-29 21:38:17 +0100
committerLuca Weiss2019-03-29 21:38:17 +0100
commit25378288d385aaf5415aa30627b0f0ba81e0de7e (patch)
treeb0fa8fba49c29abfed877252dc273dff9d1cad1b
parentc1c1897e643501fd8f03672e55f6460f44ad3610 (diff)
downloadaur-25378288d385aaf5415aa30627b0f0ba81e0de7e.tar.gz
openrazer: major pkgbuild cleanup
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD103
-rw-r--r--openrazer-daemon.install2
-rw-r--r--openrazer-driver-arch.install21
-rw-r--r--openrazer-driver-dkms.install1
5 files changed, 16 insertions, 132 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8d4806588f5..58011cbba6d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,8 +5,6 @@ pkgbase = openrazer
url = https://github.com/openrazer/openrazer
arch = any
license = GPL2
- makedepends = make
- makedepends = python
makedepends = python-setuptools
source = https://github.com/openrazer/openrazer/releases/download/v2.5.0/openrazer-2.5.0.tar.xz
sha256sums = 7cae0b3eebe2f3435521a109fdeb0da68c45e46d931fd3ec7ea354c4502c4e41
@@ -14,42 +12,25 @@ pkgbase = openrazer
pkgname = python-openrazer
pkgdesc = Python library for accessing the Razer daemon from Python.
depends = openrazer-daemon
- depends = python
- depends = python-dbus
depends = python-numpy
- provides = python-razer
- conflicts = python-razer
- replaces = python-razer
pkgname = openrazer-daemon
pkgdesc = Userspace daemon that abstracts access to the kernel driver. Provides a DBus service for applications to use.
install = openrazer-daemon.install
depends = openrazer-driver-dkms
+ depends = gtk3
depends = python-dbus
depends = python-gobject
depends = python-setproctitle
depends = python-daemonize
- depends = xautomation
- depends = xdotool
- depends = libdbus
depends = python-notify2
depends = python-pyudev
- depends = gtk3
- depends = dbus-glib
- provides = razer-daemon
- conflicts = razer-daemon
- replaces = razer-daemon
pkgname = openrazer-driver-dkms
pkgdesc = Kernel driver for Razer devices (DKMS-variant)
install = openrazer-driver-dkms.install
depends = dkms
depends = udev
- provides = OPENRAZER-MODULES
- provides = razer-driver-dkms
- conflicts = OPENRAZER-MODULES
- conflicts = razer-driver-dkms
- replaces = razer-driver-dkms
pkgname = openrazer-meta
pkgdesc = Meta package for installing all required openrazer packages.
diff --git a/PKGBUILD b/PKGBUILD
index cb983e08bf3..28fab6078bf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,83 +1,42 @@
# Maintainer: Luca Weiss <luca (at) z3ntu (dot) xyz>
-# Maintainer: Gabriele Musco <emaildigabry@gmail.com>
-
-# This PKGBUILD is configured to only build openrazer-driver-dkms, openrazer-daemon & python-openrazer by default.
-# Kernel modules for the stock kernel (package "linux") can be built into a package by setting the variable "_build_kernel_modules" to "true".
-_build_kernel_modules=false
-
-# Furthermore it is possible to build the package from a specific git commit by uncommenting the variable "_commit" and setting it to a valid commit. pkgrel should be bumped up too then.
+# Contributor: Gabriele Musco <emaildigabry@gmail.com>
pkgbase=openrazer
pkgname=('python-openrazer' 'openrazer-daemon' 'openrazer-driver-dkms' 'openrazer-meta')
-if $_build_kernel_modules; then
- # For kernel update: Update the two variables and the .install file!
- _linux_current=4.15
- _linux_next=4.16
- pkgname+=('openrazer-driver-arch')
-fi
pkgver=2.5.0
-#_commit=6ae1f7d55bf10cc6b5cb62a5ce99ff22c43e0701
pkgrel=1
pkgdesc="An entirely open source driver and user-space daemon that allows you to manage your Razer peripherals on GNU/Linux."
arch=('any')
url="https://github.com/openrazer/openrazer"
license=('GPL2')
-makedepends=('make' 'python' 'python-setuptools')
-if $_build_kernel_modules; then
- makedepends+=("linux-headers>=$_linux_current" "linux-headers<$_linux_next" "linux>=$_linux_current" "linux<$_linux_next")
-fi
-if [ -z $_commit ]; then
- source=("https://github.com/openrazer/openrazer/releases/download/v$pkgver/openrazer-$pkgver.tar.xz")
-else
- source=("https://github.com/openrazer/openrazer/archive/$_commit.tar.gz")
-fi
+makedepends=('python-setuptools')
+source=("https://github.com/openrazer/openrazer/releases/download/v$pkgver/openrazer-$pkgver.tar.xz")
sha256sums=('7cae0b3eebe2f3435521a109fdeb0da68c45e46d931fd3ec7ea354c4502c4e41')
package_python-openrazer() {
pkgdesc="Python library for accessing the Razer daemon from Python."
- depends=('openrazer-daemon' 'python' 'python-dbus' 'python-numpy')
- provides=('python-razer')
- conflicts=('python-razer')
- replaces=('python-razer')
- if [ -z $_commit ]; then
- cd $srcdir/$pkgbase-$pkgver
- else
- cd $srcdir/$pkgbase-$_commit
- fi
- make DESTDIR=$pkgdir python_library_install
+ depends=('openrazer-daemon' 'python-numpy')
+
+ cd "$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" python_library_install
}
package_openrazer-daemon() {
pkgdesc="Userspace daemon that abstracts access to the kernel driver. Provides a DBus service for applications to use."
- depends=('openrazer-driver-dkms' 'python-dbus' 'python-gobject' 'python-setproctitle' 'python-daemonize' 'xautomation' 'xdotool' 'libdbus' 'python-notify2' 'python-pyudev' 'gtk3' 'dbus-glib')
- provides=('razer-daemon')
- conflicts=('razer-daemon')
- replaces=('razer-daemon')
- # gtk3 for "gi.require_version('Gdk', '3.0')"
+ depends=('openrazer-driver-dkms' 'gtk3' 'python-dbus' 'python-gobject' 'python-setproctitle' 'python-daemonize' 'python-notify2' 'python-pyudev')
install=openrazer-daemon.install
- if [ -z $_commit ]; then
- cd $srcdir/$pkgbase-$pkgver
- else
- cd $srcdir/$pkgbase-$_commit
- fi
- make DESTDIR=$pkgdir daemon_install
+ cd "$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" daemon_install
}
package_openrazer-driver-dkms() {
pkgdesc="Kernel driver for Razer devices (DKMS-variant)"
depends=('dkms' 'udev')
- provides=('OPENRAZER-MODULES' 'razer-driver-dkms')
- conflicts=('OPENRAZER-MODULES' 'razer-driver-dkms')
- replaces=('razer-driver-dkms')
install=openrazer-driver-dkms.install
-
- if [ -z $_commit ]; then
- cd $srcdir/$pkgbase-$pkgver
- else
- cd $srcdir/$pkgbase-$_commit
- fi
- make DESTDIR=$pkgdir setup_dkms udev_install
+
+ cd "$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" setup_dkms udev_install
}
package_openrazer-meta() {
@@ -86,40 +45,4 @@ package_openrazer-meta() {
optdepends=('polychromatic: frontend'
'razergenie: qt frontend'
'razercommander: gtk frontend')
- }
-
-if $_build_kernel_modules; then
-_extramodules=extramodules-$_linux_current-ARCH
-
-build() {
- if [ -z $_commit ]; then
- cd $srcdir/$pkgbase-$pkgver
- else
- cd $srcdir/$pkgbase-$_commit
- fi
-
- _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
-
- make DESTDIR=$pkgdir KERNELDIR=/usr/lib/modules/$_kernver/build driver
-}
-
-package_openrazer-driver-arch() {
- pkgdesc="Kernel driver for Razer devices (for stock 'linux' kernel)"
- depends=('udev')
- depends=("linux>=$_linux_current" "linux<$_linux_next")
- provides=('OPENRAZER-MODULES' 'openrazer-driver-dkms')
- conflicts=('OPENRAZER-MODULES' 'openrazer-driver-dkms')
- install=openrazer-driver-arch.install
-
- if [ -z $_commit ]; then
- cd $srcdir/$pkgbase-$pkgver
- else
- cd $srcdir/$pkgbase-$_commit
- fi
- install -dm755 $pkgdir/usr/lib/modules/$_extramodules/
- make DESTDIR=$pkgdir MODULEDIR=/usr/lib/modules/$_extramodules/ driver_install_packaging udev_install
-
- # compress each module individually
- find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
}
-fi
diff --git a/openrazer-daemon.install b/openrazer-daemon.install
index d0716d9f115..76245e40ae3 100644
--- a/openrazer-daemon.install
+++ b/openrazer-daemon.install
@@ -1,5 +1,5 @@
msg() {
- echo "==> You might want to enable razer-daemon.service with the command \"systemctl --user enable --now openrazer-daemon.service\""
+ echo "==> You might want to enable openrazer-daemon.service with the command \"systemctl --user enable --now openrazer-daemon.service\""
}
post_upgrade() {
diff --git a/openrazer-driver-arch.install b/openrazer-driver-arch.install
deleted file mode 100644
index f79accea627..00000000000
--- a/openrazer-driver-arch.install
+++ /dev/null
@@ -1,21 +0,0 @@
-_depmod() {
- EXTRAMODULES=extramodules-4.12-ARCH
- depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
-}
-
-post_install() {
- cat << EOF
-==> Theoretically everything should be working fine after a replug of your device(s). Otherwise please reboot.
-EOF
- _depmod
-}
-
-post_upgrade() {
- _depmod
-}
-
-post_remove() {
- _depmod
-}
-
-# vim:set ts=2 sw=2 et:
diff --git a/openrazer-driver-dkms.install b/openrazer-driver-dkms.install
index 13935a1ed82..52208d80191 100644
--- a/openrazer-driver-dkms.install
+++ b/openrazer-driver-dkms.install
@@ -4,6 +4,7 @@ post_install() {
echo -e "\e[31m********************************************"
echo -e "\e[31m* To complete installation, please run: *"
echo -e "\e[31m* # sudo gpasswd -a <yourUsername> plugdev *"
+ echo -e "\e[31m* and reboot. *"
echo -e "\e[31m* *"
echo -e "\e[31m* Please note, that you have to have the *"
echo -e "\e[31m* kernel headers for your current kernel *"