Page MenuHomeSolus

D9568.id24281.diff
No OneTemporary

D9568.id24281.diff

Index: MAINTAINERS.md
===================================================================
--- /dev/null
+++ MAINTAINERS.md
@@ -0,0 +1,5 @@
+This file is used to indicate responsibility for the maintenance of this package. Individuals on this list should be the sole modifiers of the package, excluding cases where the Solus Team may need to perform necessary rebuilds, upgrades, or security fixes. This list should not be used for any direct contact usage. If you believe this package requires a package update, follow documentation from https://getsol.us/articles/packaging/request-a-package-update/en/. In the event this package no longer becomes sufficiently maintained, Core Team reserves the right to request a new maintainer or remove this package from the repository.
+
+- Kévin Bergue
+ - IRC: tzig
+ - Email: kevin@be-ta.art
Index: Makefile
===================================================================
--- /dev/null
+++ Makefile
@@ -0,0 +1 @@
+include ../Makefile.common
Index: abi_used_libs
===================================================================
--- /dev/null
+++ abi_used_libs
@@ -0,0 +1,10 @@
+libQt5Core.so.5
+libQt5Gui.so.5
+libQt5Widgets.so.5
+libc.so.6
+libgcc_s.so.1
+libhidapi-hidraw.so.0
+libm.so.6
+libpthread.so.0
+libstdc++.so.6
+libusb-1.0.so.0
Index: files/0001-use-xdg-config-dir-for-profiles-on-linux.patch
===================================================================
--- /dev/null
+++ files/0001-use-xdg-config-dir-for-profiles-on-linux.patch
@@ -0,0 +1,106 @@
+From f10be3aebd88e197701b55c2b34c11e408073217 Mon Sep 17 00:00:00 2001
+From: Campbell Jones <git@serebit.com>
+Date: Wed, 2 Sep 2020 17:55:31 -0400
+Subject: [PATCH] use xdg config dir for profiles on linux
+
+---
+ ProfileManager.cpp | 42 +++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 35 insertions(+), 7 deletions(-)
+
+diff --git a/ProfileManager.cpp b/ProfileManager.cpp
+index c4f26a4..5479652 100644
+--- a/ProfileManager.cpp
++++ b/ProfileManager.cpp
+@@ -5,9 +5,39 @@
+ #include <fstream>
+ #include <iostream>
+ #include <cstring>
++#include <unistd.h>
++#include <pwd.h>
+
+ namespace fs = std::experimental::filesystem;
+
++static std::string GetProfileDir()
++{
++#ifdef __linux__
++ std::string profile_dir;
++
++ const char* xdg_dir = getenv("XDG_CONFIG_DIR");
++ if (xdg_dir == NULL)
++ {
++ const char* home_dir = getenv("HOME");
++ if (home_dir == NULL)
++ {
++ home_dir = getpwuid(getuid())->pw_dir;
++ }
++ profile_dir = std::string(home_dir).append("/.config");
++ }
++ else
++ {
++ profile_dir = std::string(xdg_dir);
++ }
++
++ profile_dir = profile_dir.append("/openrgb/");
++ fs::create_directory(profile_dir);
++ return profile_dir;
++#else
++ return "./";
++#endif
++}
++
+ ProfileManager::ProfileManager(std::vector<RGBController *>& control) : controllers(control)
+ {
+ UpdateProfileList();
+@@ -28,7 +58,7 @@ bool ProfileManager::SaveProfile(std::string profile_name)
+ /*---------------------------------------------------------*\
+ | Open an output file in binary mode |
+ \*---------------------------------------------------------*/
+- std::ofstream controller_file(profile_name, std::ios::out | std::ios::binary);
++ std::ofstream controller_file(GetProfileDir().append(profile_name), std::ios::out | std::ios::binary);
+
+ /*---------------------------------------------------------*\
+ | Write header |
+@@ -93,12 +123,10 @@ bool ProfileManager::LoadProfileWithOptions
+ unsigned int controller_offset = 0;
+ bool ret_val = false;
+
+- std::string filename = profile_name;
+-
+ /*---------------------------------------------------------*\
+ | Open input file in binary mode |
+ \*---------------------------------------------------------*/
+- std::ifstream controller_file(filename, std::ios::in | std::ios::binary);
++ std::ifstream controller_file(GetProfileDir().append(profile_name), std::ios::in | std::ios::binary);
+
+ /*---------------------------------------------------------*\
+ | Read and verify file header |
+@@ -251,7 +279,7 @@ bool ProfileManager::LoadProfileWithOptions
+
+ void ProfileManager::DeleteProfile(std::string profile_name)
+ {
+- remove(profile_name.c_str());
++ remove(GetProfileDir().append(profile_name).c_str());
+
+ UpdateProfileList();
+ }
+@@ -263,7 +291,7 @@ void ProfileManager::UpdateProfileList()
+ /*---------------------------------------------------------*\
+ | Load profiles by looking for .orp files in current dir |
+ \*---------------------------------------------------------*/
+- for(const auto & entry : fs::directory_iterator("."))
++ for(const auto & entry : fs::directory_iterator(GetProfileDir()))
+ {
+ std::string filename = entry.path().filename().string();
+
+@@ -272,7 +300,7 @@ void ProfileManager::UpdateProfileList()
+ /*---------------------------------------------------------*\
+ | Open input file in binary mode |
+ \*---------------------------------------------------------*/
+- std::ifstream profile_file(filename, std::ios::in | std::ios::binary);
++ std::ifstream profile_file(entry.path().string(), std::ios::in | std::ios::binary);
+
+ /*---------------------------------------------------------*\
+ | Read and verify file header |
+--
+2.27.0
+
Index: files/openrgb.conf
===================================================================
--- /dev/null
+++ files/openrgb.conf
@@ -0,0 +1,3 @@
+#loads the i2c-dev kernel module on boot, needed by openrgb
+
+i2c-dev
Index: files/openrgb.desktop
===================================================================
--- /dev/null
+++ files/openrgb.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Version=1.1
+Type=Application
+Name=OpenRGB
+Comment=A program to control RGB devices
+Icon=openrgb
+Exec=/usr/bin/openrgb
+Categories=System;Monitor;HardwareSettings
Index: files/openrgb.service
===================================================================
--- /dev/null
+++ files/openrgb.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=OpenRGB daemon
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/openrgb --server
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
Index: package.yml
===================================================================
--- /dev/null
+++ package.yml
@@ -0,0 +1,26 @@
+name : openrgb
+version : '0.5'
+release : 1
+source :
+ - https://gitlab.com/CalcProgrammer1/OpenRGB/-/archive/release_0.5/OpenRGB-release_0.5.tar.gz : e227dedfe0c3aa8f3bcb0c4149aa5feb1db4b0429a151423d74c0103c55d7d26
+license : GPL-2.0-only
+component : system.utils
+summary : Open source RGB lighting control that doesn't depend on manufacturer software
+description: |
+ An easy-to-use open source software program and library for accessing and controlling RGB lights on various PC hardware including motherboards, RAM modules, graphics cards, cooling devices, and peripherals.
+builddeps :
+ - pkgconfig(hidapi-libusb)
+ - pkgconfig(libusb-1.0)
+ - pkgconfig(Qt5Core)
+setup : |
+ %qmake OpenRGB.pro
+build : |
+ %make
+install : |
+ install -Dm 00755 $workdir/openrgb $installdir/usr/bin/openrgb
+ install -Dm 00644 $workdir/qt/OpenRGB.png $installdir/usr/share/icons/hicolor/128x128/apps/openrgb.png
+ install -Dm 00644 $workdir/60-openrgb.rules $installdir/%libdir%/udev/rules.d/60-openrgb.rules
+
+ install -Dm 00644 $pkgfiles/openrgb.desktop $installdir/usr/share/applications/openrgb.desktop
+ install -Dm 00644 $pkgfiles/openrgb.service $installdir/%libdir%/systemd/system/openrgb.service
+ install -Dm 00644 $pkgfiles/openrgb.conf $installdir/%libdir%/modules-load.d/openrgb.conf
Index: pspec_x86_64.xml
===================================================================
--- /dev/null
+++ pspec_x86_64.xml
@@ -0,0 +1,39 @@
+<PISI>
+ <Source>
+ <Name>openrgb</Name>
+ <Packager>
+ <Name>Campbell Jones</Name>
+ <Email>dev@serebit.com</Email>
+ </Packager>
+ <License>GPL-2.0-only</License>
+ <PartOf>system.utils</PartOf>
+ <Summary xml:lang="en">Open source RGB lighting control that doesn&apos;t depend on manufacturer software</Summary>
+ <Description xml:lang="en">An easy-to-use open source software program and library for accessing and controlling RGB lights on various PC hardware including motherboards, RAM modules, graphics cards, cooling devices, and peripherals.
+</Description>
+ <Archive type="binary" sha1sum="79eb0752a961b8e0d15c77d298c97498fbc89c5a">https://getsol.us/sources/README.Solus</Archive>
+ </Source>
+ <Package>
+ <Name>openrgb</Name>
+ <Summary xml:lang="en">Open source RGB lighting control that doesn&apos;t depend on manufacturer software</Summary>
+ <Description xml:lang="en">An easy-to-use open source software program and library for accessing and controlling RGB lights on various PC hardware including motherboards, RAM modules, graphics cards, cooling devices, and peripherals.
+</Description>
+ <PartOf>system.utils</PartOf>
+ <Files>
+ <Path fileType="executable">/usr/bin/openrgb</Path>
+ <Path fileType="library">/usr/lib64/modules-load.d/openrgb.conf</Path>
+ <Path fileType="library">/usr/lib64/systemd/system/openrgb.service</Path>
+ <Path fileType="library">/usr/lib64/udev/rules.d/60-openrgb.rules</Path>
+ <Path fileType="data">/usr/share/applications/openrgb.desktop</Path>
+ <Path fileType="data">/usr/share/icons/hicolor/128x128/apps/openrgb.png</Path>
+ </Files>
+ </Package>
+ <History>
+ <Update release="1">
+ <Date>2020-12-09</Date>
+ <Version>0.5</Version>
+ <Comment>Packaging update</Comment>
+ <Name>Campbell Jones</Name>
+ <Email>dev@serebit.com</Email>
+ </Update>
+ </History>
+</PISI>
\ No newline at end of file

File Metadata

Mime Type
text/plain
Expires
Fri, Aug 11, 10:55 PM (2 h, 56 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5822330
Default Alt Text
D9568.id24281.diff (10 KB)

Event Timeline