summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO28
-rw-r--r--.editorconfig8
-rw-r--r--.gitignore14
-rw-r--r--114.patch11
-rw-r--r--122.patch48
-rw-r--r--PKGBUILD57
-rw-r--r--light.install8
7 files changed, 74 insertions, 100 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 272d7dce0324..621d325d4de8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,23 @@
pkgbase = light
- pkgdesc = Program to easily change brightness on backlight-controllers.
+ pkgdesc = A program to control backlights (and other hardware lights)
pkgver = 1.2.2
- pkgrel = 3
- url = https://github.com/haikarainen/light
+ pkgrel = 4
+ url = https://github.com/perkele1989/light
install = light.install
arch = x86_64
- license = GPL3
- depends = glibc
- source = light-1.2.2.tar.gz::https://github.com/haikarainen/light/archive/v1.2.2.tar.gz
- source = 114.patch
- source = 122.patch
- sha256sums = 62e889ee9be80fe808a972ef4981acc39e83a20f9a84a66a82cd1f623c868d9c
- sha256sums = e0bee2249f59f66cb02ef98dc18e36172d141eb8b9f1bb1c2c8de8323c9ad73e
- sha256sums = 7dd149ef9ce9647f70a8047c0690e4ff121670ba58cf5aaac2fd8cd29e03d03f
+ arch = i486
+ arch = i686
+ arch = pentium4
+ arch = armv7h
+ arch = aarch64
+ license = GPL-3.0-only
+ source = light-1.2.2.tar.gz::https://github.com/perkele1989/light/archive/v1.2.2.tar.gz
+ source = light-1.2.2-fix-global-var.diff::https://github.com/perkele1989/light/commit/eae912ca7ff3356805e47739114861d2b6ae7ec0.diff
+ source = light-1.2.2-namespace-udev-rule.diff::https://github.com/perkele1989/light/commit/260e2c1a557597d3430582dcc6347b0b804590c6.diff
+ source = light-1.2.2-update-manpage.diff::https://github.com/perkele1989/light/commit/3b318524fa84b9fdfedcd54bb760bd361ed32553.diff
+ sha512sums = 5815394fb1545d1e06234c261d475e1836e4c43e47e7707b8628891d20b70db04f1661b78ca1d236d549c734430b606498fa46de060c854791b13cf49de07b59
+ sha512sums = e020deaca76f65a032f6f694f07b43af6318d46f52e0e16554a883d54c43c5519c7bbb3ecbc6e8f39d2828fbebe73d37aa82d4051b2cc652a1775286188b6ded
+ sha512sums = 1cee6c3f10a6534e03bdf6874b95e699fdf8900f7cb9d86df6f8b99f0f77ff2b80d515eb3f4e43602f5ae19fa3009db63301ff862f1d02b8a17f3282ea063232
+ sha512sums = 36cad74b303c206035dd6941269209278c0661358820444ce97b6ef383761e258ccf56d12c80590278972db0e1be98fae3632269cbababc49690726a61fc1708
pkgname = light
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000000..a467ee9a97a6
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,8 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = tab
+tab_width = 4
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..004b0a3a8706
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+# Only exclude files from the root of the package repo, as some AUR helpers download sources into the directory of the repo,
+# which causes the gitignore file to apply to them too, which breaks some builds
+# Based on https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore
+/*.tar
+/*.tar.*
+/*.rpm
+/*.jar
+/*.exe
+/*.msi
+/*.zip
+/*.tgz
+/*.log
+/*.log.*
+/*.sig
diff --git a/114.patch b/114.patch
deleted file mode 100644
index 4f8e71deb792..000000000000
--- a/114.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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:
diff --git a/122.patch b/122.patch
deleted file mode 100644
index 8a900b09fabf..000000000000
--- a/122.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-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
diff --git a/PKGBUILD b/PKGBUILD
index 867f34860ea5..0839f670dd73 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,39 +1,44 @@
+# Maintainer: Daniel Peukert <daniel@peukert.cc>
# Contributor: Maxim Baz <archlinux at maximbaz dot com>
# Contributor: Fredrik Haikarainen <fredrik.haikarainen@gmail.com>
# Contributor: Marcin (CTRL) Wieczorek <marcin@marcin.co>
+pkgname='light'
+pkgver='1.2.2'
+pkgrel='4'
+pkgdesc='A program to control backlights (and other hardware lights)'
+arch=('x86_64' 'i486' 'i686' 'pentium4' 'armv7h' 'aarch64')
+url="https://github.com/perkele1989/$pkgname"
+license=('GPL-3.0-only')
+install="$pkgname.install"
+source=(
+ "$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
+ "$pkgname-$pkgver-fix-global-var.diff::$url/commit/eae912ca7ff3356805e47739114861d2b6ae7ec0.diff"
+ "$pkgname-$pkgver-namespace-udev-rule.diff::$url/commit/260e2c1a557597d3430582dcc6347b0b804590c6.diff"
+ "$pkgname-$pkgver-update-manpage.diff::$url/commit/3b318524fa84b9fdfedcd54bb760bd361ed32553.diff"
+)
+sha512sums=('5815394fb1545d1e06234c261d475e1836e4c43e47e7707b8628891d20b70db04f1661b78ca1d236d549c734430b606498fa46de060c854791b13cf49de07b59'
+ 'e020deaca76f65a032f6f694f07b43af6318d46f52e0e16554a883d54c43c5519c7bbb3ecbc6e8f39d2828fbebe73d37aa82d4051b2cc652a1775286188b6ded'
+ '1cee6c3f10a6534e03bdf6874b95e699fdf8900f7cb9d86df6f8b99f0f77ff2b80d515eb3f4e43602f5ae19fa3009db63301ff862f1d02b8a17f3282ea063232'
+ '36cad74b303c206035dd6941269209278c0661358820444ce97b6ef383761e258ccf56d12c80590278972db0e1be98fae3632269cbababc49690726a61fc1708')
-pkgname=light
-pkgver=1.2.2
-pkgrel=3
-pkgdesc='Program to easily change brightness on backlight-controllers.'
-arch=('x86_64')
-url='https://github.com/haikarainen/light'
-license=('GPL3')
-depends=('glibc')
-install="${pkgname}.install"
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/haikarainen/light/archive/v${pkgver}.tar.gz"
- "114.patch"
- "122.patch")
-sha256sums=('62e889ee9be80fe808a972ef4981acc39e83a20f9a84a66a82cd1f623c868d9c'
- 'e0bee2249f59f66cb02ef98dc18e36172d141eb8b9f1bb1c2c8de8323c9ad73e'
- '7dd149ef9ce9647f70a8047c0690e4ff121670ba58cf5aaac2fd8cd29e03d03f')
+_sourcedirectory="$pkgname-$pkgver"
prepare() {
- cd "${pkgname}-${pkgver}"
- patch -Np1 -i "${srcdir}/114.patch"
- patch -Np1 -i "${srcdir}/122.patch"
+ cd "$srcdir/$_sourcedirectory/"
+
+ patch --forward -p1 < "../$pkgname-$pkgver-fix-global-var.diff"
+ patch --forward -p1 < "../$pkgname-$pkgver-namespace-udev-rule.diff"
+ patch --forward -p1 < "../$pkgname-$pkgver-update-manpage.diff"
}
build() {
- cd "${pkgname}-${pkgver}"
- ./autogen.sh
- ./configure --prefix=/usr --with-udev
- make
+ cd "$srcdir/$_sourcedirectory/"
+ ./autogen.sh
+ ./configure --prefix='/usr' --with-udev
+ make
}
package() {
- cd "${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" PREFIX=/usr install
+ cd "$srcdir/$_sourcedirectory/"
+ make install DESTDIR="$pkgdir" PREFIX='/usr'
}
-
-# vim:set ts=4 sw=4 et:
diff --git a/light.install b/light.install
index debd5155cb59..d426328aff99 100644
--- a/light.install
+++ b/light.install
@@ -1,9 +1,9 @@
post_install() {
- printf '====> %s\n' 'Make sure to add your user to the video group.'
+ echo '==> Make sure to add your user to the video group.'
}
post_upgrade() {
- if (( $(vercmp $2 '1.2-3') < 0 )); then
- printf '====> %s\n' 'Make sure to add your user to the video group.'
- fi
+ if [ "$(vercmp "$2" '1.2-3')" -lt 0 ]; then
+ post_install
+ fi
}