1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 11:45:18 +03:00
aports/testing/mixxx/0001-Install-UDev-rules-to-the-proper-location-by-default.patch
2021-09-21 09:15:52 +00:00

71 lines
3.2 KiB
Diff

From 1a4df026d47b6588e1b66ac551e06b69e357e4f4 Mon Sep 17 00:00:00 2001
From: Bart Ribbers <bribbers@disroot.org>
Date: Sun, 18 Jul 2021 01:47:44 +0200
Subject: [PATCH] Install UDev rules to the proper location by default
The comment in the CMakeLists.txt talks about some proper location the
file has to be installed too, but itself installs it to a wrong
directory. Rather than telling people to turn the option off and install
the file to the right directory manually, install it directly to the
correct directory instead. ${CMAKE_INSTALL_LIBDIR} will expand to
whatever distros require it to be
Also while we're at it, make sure it's loaded before 70-uaccess.rules
rather than just having a comment mention that in the udev file itself
---
CMakeLists.txt | 12 ++++--------
...-usb-uaccess.rules => 69-mixxx-usb-uaccess.rules} | 2 --
2 files changed, 4 insertions(+), 10 deletions(-)
rename res/linux/{mixxx-usb-uaccess.rules => 69-mixxx-usb-uaccess.rules} (96%)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b924921e41..e39530bc54 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1373,23 +1373,19 @@ if(UNIX AND NOT APPLE)
if (INSTALL_USER_UDEV_RULES)
install(
FILES
- "${CMAKE_CURRENT_SOURCE_DIR}/res/linux/mixxx-usb-uaccess.rules"
+ "${CMAKE_CURRENT_SOURCE_DIR}/res/linux/69-mixxx-usb-uaccess.rules"
DESTINATION
- "${MIXXX_INSTALL_DATADIR}/udev/rules.d"
+ "${CMAKE_INSTALL_LIBDIR}/udev/rules.d"
)
install(CODE "
message(STATUS \"Important Note: Installation of udev rules\n\"
\"The udev rule file for USB HID and Bulk controller permissions will be\n\"
\"installed to:\n\"
- \" ${CMAKE_INSTALL_PREFIX}/${MIXXX_INSTALL_DATADIR}/udev/rules.d.\n\"
+ \" ${CMAKE_INSTALL_LIBDIR}/udev/rules.d.\n\"
\"If you are installing Mixxx from source for your own use, copy\n\"
\"mixxx-usb-uaccess.rules to /etc/udev/rules.d/ and run:\n\"
\" udevadm control --reload-rules && udevadm trigger\n\"
- \"as root to load the rules.\n\"
- \"If you are building a package for a distribution, the correct directory for\n\"
- \"system rules is either /lib/udev/rules.d (e.g. Debian, Fedora) or\n\"
- \"/usr/lib/udev/rules.d (e.g. Arch Linux) with an appropriate priority prefix.\n\"
- \"Adjust your package script accordingly and set -DINSTALL_USER_UDEV_RULES=OFF\")
+ \"as root to load the rules.\n\")
")
endif()
endif()
diff --git a/res/linux/mixxx-usb-uaccess.rules b/res/linux/69-mixxx-usb-uaccess.rules
similarity index 96%
rename from res/linux/mixxx-usb-uaccess.rules
rename to res/linux/69-mixxx-usb-uaccess.rules
index ae471d4ca3..24550d2926 100644
--- a/res/linux/mixxx-usb-uaccess.rules
+++ b/res/linux/69-mixxx-usb-uaccess.rules
@@ -10,8 +10,6 @@
# New IDs must be also added to res/linux/mixxx.metainfo.xml
-# Install and execute before 70-uaccess.rules, e.g. .../udev/rules.d/69-mixxx-usb-uaccess.rules
-
# Allen + Heath Ltd.
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="22f0", TAG+="uaccess"
# Allen + Heath Xone 23C hardware mixer with USB audio interface
--
2.32.0