[arch-commits] Commit in light/trunk (114.patch 122.patch PKGBUILD)

Maxim Baz maximbaz at archlinux.org
Tue Mar 2 14:02:44 UTC 2021


    Date: Tuesday, March 2, 2021 @ 14:02:44
  Author: maximbaz
Revision: 877453

light: namespace udev rules, fixes FS#63684

Added:
  light/trunk/114.patch
  light/trunk/122.patch
Modified:
  light/trunk/PKGBUILD

-----------+
 114.patch |   11 +++++++++++
 122.patch |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 PKGBUILD  |   16 +++++++++++++---
 3 files changed, 72 insertions(+), 3 deletions(-)

Added: 114.patch
===================================================================
--- 114.patch	                        (rev 0)
+++ 114.patch	2021-03-02 14:02:44 UTC (rev 877453)
@@ -0,0 +1,11 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,7 +1,7 @@
+ bin_PROGRAMS   = light
+ light_SOURCES  = main.c light.c light.h helpers.c helpers.h impl/sysfs.c impl/sysfs.h impl/util.h impl/util.c impl/razer.h impl/razer.c
+ light_CPPFLAGS = -I../include -D_GNU_SOURCE
+-light_CFLAGS   = -W -Wall -Wextra -std=gnu99 -Wno-type-limits -Wno-format-truncation -Wno-unused-parameter
++light_CFLAGS   = -W -Wall -Wextra -std=gnu99 -Wno-type-limits -Wno-format-truncation -Wno-unused-parameter -fcommon
+
+ if CLASSIC
+ install-exec-hook:

Added: 122.patch
===================================================================
--- 122.patch	                        (rev 0)
+++ 122.patch	2021-03-02 14:02:44 UTC (rev 877453)
@@ -0,0 +1,48 @@
+diff --git a/90-backlight.rules b/90-light-backlight.rules
+similarity index 100%
+rename from 90-backlight.rules
+rename to 90-light-backlight.rules
+diff --git a/Makefile.am b/Makefile.am
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -4,8 +4,8 @@ doc_DATA       = README.md COPYING ChangeLog.md
+ EXTRA_DIST     = README.md COPYING ChangeLog.md
+
+ if UDEV
+-udev_DATA      = 90-backlight.rules
+-EXTRA_DIST    += $(top_srcdir)/90-backlight.rules
++udev_DATA      = 90-light-backlight.rules
++EXTRA_DIST    += $(top_srcdir)/90-light-backlight.rules
+ endif
+
+ # lintian --profile debian -i -I --show-overrides ../$PKG.changes
+--- a/README.md
++++ b/README.md
+@@ -167,7 +167,7 @@ Optionally, instead of the classic SUID root mode of operation, udev rules can b
+     ./configure --with-udev && make
+     sudo make install
+
+-This installs the `90-backlight.rules` into `/usr/lib/udev/rules.d/`.
++This installs the `90-light-backlight.rules` into `/usr/lib/udev/rules.d/`.
+ If your udev rules are located elsewhere, use `--with-udev=PATH`.
+
+ **Note:** make sure that your user is part of the `video` group, otherwise you will not get access to the devices.
+--- a/debian/light.postinst
++++ b/debian/light.postinst
+@@ -9,4 +9,4 @@ udevadm trigger --subsystem-match=backlight --subsystem-match=leds --action=chan
+
+ # Reset udev rule action back to 'add', it was set to 'change' during
+ # dh_auto_configure to make sure they are effective right away.
+-sed -i 's/^ACTION=="change"/ACTION=="add"/g' /usr/lib/udev/rules.d/90-backlight.rules
++sed -i 's/^ACTION=="change"/ACTION=="add"/g' /usr/lib/udev/rules.d/90-light-backlight.rules
+--- a/debian/rules
++++ b/debian/rules
+@@ -9,7 +9,7 @@ override_dh_auto_configure:
+ 	dh_auto_configure -- --with-udev
+ 	# Change action type of udev rules to make it effective after
+ 	# installation, they are reset back with the poinst script.
+-	sed -i 's/^ACTION=="add"/ACTION=="change"/g' 90-backlight.rules
++	sed -i 's/^ACTION=="add"/ACTION=="change"/g' 90-light-backlight.rules
+
+ override_dh_installchangelogs:
+ 	dh_installchangelogs ChangeLog.md

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-03-02 13:48:15 UTC (rev 877452)
+++ PKGBUILD	2021-03-02 14:02:44 UTC (rev 877453)
@@ -4,7 +4,7 @@
 
 pkgname=light
 pkgver=1.2.2
-pkgrel=1
+pkgrel=2
 pkgdesc='Program to easily change brightness on backlight-controllers.'
 arch=('x86_64')
 url='https://github.com/haikarainen/light'
@@ -11,9 +11,19 @@
 license=('GPL3')
 depends=('glibc')
 install="${pkgname}.install"
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/haikarainen/light/archive/v${pkgver}.tar.gz")
-sha256sums=('62e889ee9be80fe808a972ef4981acc39e83a20f9a84a66a82cd1f623c868d9c')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/haikarainen/light/archive/v${pkgver}.tar.gz"
+        "114.patch"
+        "122.patch")
+sha256sums=('62e889ee9be80fe808a972ef4981acc39e83a20f9a84a66a82cd1f623c868d9c'
+            'e0bee2249f59f66cb02ef98dc18e36172d141eb8b9f1bb1c2c8de8323c9ad73e'
+            '7dd149ef9ce9647f70a8047c0690e4ff121670ba58cf5aaac2fd8cd29e03d03f')
 
+prepare() {
+    cd "${pkgname}-${pkgver}"
+    patch -Np1 -i "${srcdir}/114.patch"
+    patch -Np1 -i "${srcdir}/122.patch"
+}
+
 build() {
     cd "${pkgname}-${pkgver}"
     ./autogen.sh



More information about the arch-commits mailing list