aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-11-11 07:27:37 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-11-11 07:35:33 -0300
commitb0be30714b4bd085a03470389053eccb5f1d43c7 (patch)
tree42b93417b44a2487eb0b30f5b281723e9a1dc1c7 /community
parent2ca1e3301d2f943d3ad978b814d09de18fa5bfed (diff)
downloadaports-b0be30714b4bd085a03470389053eccb5f1d43c7.tar.bz2
aports-b0be30714b4bd085a03470389053eccb5f1d43c7.tar.xz
community/brightnessctl: automatically set-up package when installing
Diffstat (limited to 'community')
-rw-r--r--community/brightnessctl/APKBUILD3
-rw-r--r--community/brightnessctl/brightnessctl.post-install10
2 files changed, 12 insertions, 1 deletions
diff --git a/community/brightnessctl/APKBUILD b/community/brightnessctl/APKBUILD
index 06af021be4..68a6eec020 100644
--- a/community/brightnessctl/APKBUILD
+++ b/community/brightnessctl/APKBUILD
@@ -2,13 +2,14 @@
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=brightnessctl
pkgver=0.4
-pkgrel=0
+pkgrel=1
pkgdesc="Program to read and control device brightness"
options="!check" # No testsuite
url="https://github.com/Hummer12007/brightnessctl"
arch="all"
license="MIT"
subpackages="$pkgname-doc"
+install="$pkgname.post-install"
source="$pkgname-$pkgver.tar.gz::https://github.com/Hummer12007/brightnessctl/archive/$pkgver.tar.gz"
build() {
diff --git a/community/brightnessctl/brightnessctl.post-install b/community/brightnessctl/brightnessctl.post-install
new file mode 100644
index 0000000000..fc16251e6b
--- /dev/null
+++ b/community/brightnessctl/brightnessctl.post-install
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# If we have udev running then reload the rules and add the
+# proper subsystems so people can use it
+if [ -S /run/udev/control ]; then
+ udevadm control --reload-rules
+ udevadm trigger -s leds -s backlight -c add
+fi
+
+exit 0