summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlois Nespor2016-11-15 11:49:24 +0100
committerAlois Nespor2016-11-15 11:49:24 +0100
commit70dcd503c4ef11e3072c4ba17d0c2ae39838495b (patch)
tree47b2ccedbfe5a6a7294ac95542e79322f558dafc
parentaccb824fd28998b97e4571869ed62ea99c56140f (diff)
downloadaur-70dcd503c4ef11e3072c4ba17d0c2ae39838495b.tar.gz
Update and add patch
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD22
-rw-r--r--backlight-openrc.install4
-rw-r--r--fix_script.patch39
4 files changed, 63 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1b673078f6b..e9bd555fbb0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,19 @@
+# Generated by mksrcinfo v8
+# Tue Nov 15 10:49:12 UTC 2016
pkgbase = backlight-openrc
pkgdesc = Restore the screen brightness at system startup.
- pkgver = 0.1
+ pkgver = 2
pkgrel = 1
url = https://git.covolunablu.org/jacopo/backlight-openrc
install = backlight-openrc.install
arch = x86_64
arch = i686
license = GPL3
- depends = openrc-core
+ depends = openrc
source = git+https://github.com/antipatico/backlight-openrc.git
- md5sums = SKIP
+ source = fix_script.patch
+ sha256sums = SKIP
+ sha256sums = d80671027a454ed0f7961012c61939f2df5519af0adb8bc453b677b5eed7f57b
pkgname = backlight-openrc
diff --git a/PKGBUILD b/PKGBUILD
index 9bc559fa88d..1a2f5b286be 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,32 @@
# Maintainer: jacopo <jacopo[at]autistici[dot]org>
pkgname=backlight-openrc
pkgrel=1
-pkgver=0.1
+pkgver=2
pkgdesc="Restore the screen brightness at system startup."
url="https://git.covolunablu.org/jacopo/backlight-openrc"
arch=('x86_64' 'i686')
license=('GPL3')
-depends=('openrc-core')
+depends=('openrc')
#source=("git+https://git.covolunablu.org/jacopo/backlight-openrc.git")
-source=("git+https://github.com/antipatico/backlight-openrc.git")
+source=("git+https://github.com/antipatico/backlight-openrc.git"
+ fix_script.patch)
install="$pkgname.install"
-md5sums=('SKIP')
-pkgver() {
+prepare() {
cd "$srcdir/$pkgname"
-# printf "r%s" "$(date +%Y%m%d)" "$(git log --pretty=format:'%h' -n 1)"
- git tag | tail -n1
+ patch -Np1 -i ../fix_script.patch
}
+#pkgver() {
+# cd "$srcdir/$pkgname"
+# printf "r%s" "$(date +%Y%m%d)" "$(git log --pretty=format:'%h' -n 1)"
+# git tag | tail -n1
+#}
+
package() {
cd "$srcdir/$pkgname"
install -Dm=755 backlight "$pkgdir/etc/init.d/backlight"
}
+
+sha256sums=('SKIP'
+ 'd80671027a454ed0f7961012c61939f2df5519af0adb8bc453b677b5eed7f57b')
diff --git a/backlight-openrc.install b/backlight-openrc.install
index 7c98fcf1a51..1a59c41b1bc 100644
--- a/backlight-openrc.install
+++ b/backlight-openrc.install
@@ -6,7 +6,7 @@ pre_install() {
## arg 1: the new package version
post_install() {
echo -e "\nRemember to add the service to the system startup with:"
- echo -e "\t'rc-update add backlight boot'"
+ echo -e "\t'rc-update add backlight default'"
}
## arg 1: the new package version
@@ -30,6 +30,6 @@ pre_remove() {
## arg 1: the old package version
post_remove() {
# echo -e "\nRemember to remove the service to the system startup with:"
-# echo -e "\t'rc-update del backlight boot'"
+# echo -e "\t'rc-update del backlight default'"
cat /dev/null > /dev/null
}
diff --git a/fix_script.patch b/fix_script.patch
new file mode 100644
index 00000000000..a5750fa542c
--- /dev/null
+++ b/fix_script.patch
@@ -0,0 +1,39 @@
+ From 1465fb6a5a6e033b958bd6ef06a6d6fee1a70500 Mon Sep 17 00:00:00 2001
+From: Raphael Costa <raphael_costa@ymail.com>
+Date: Sun, 4 Sep 2016 12:15:48 -0300
+Subject: [PATCH] Fix script
+
+---
+ backlight | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/backlight b/backlight
+index 0437456..647ff8d 100755
+--- a/backlight
++++ b/backlight
+@@ -7,9 +7,9 @@
+ start() {
+ ebegin 'Restoring the screen brightness'
+
+- for card in `basename $(find /sys/class/backlight/ -type l)`; do
+- if [[ -r "/var/cache/backlight/$card-brightness-old" ]]; then
+- cp "/var/cache/backlight/$card-brightness-old" "/sys/class/backlight/$card/brightness"
++ for card in `find /sys/class/backlight/ -type l`; do
++ if [[ -r "/var/cache/backlight/`basename $card`-brightness-old" ]]; then
++ cp "/var/cache/backlight/`basename $card`-brightness-old" "/sys/class/backlight/`basename $card`/brightness"
+ fi
+ done
+
+@@ -25,8 +25,8 @@ stop() {
+ chmod 755 '/var/cache/backlight/'
+ fi
+
+- for card in `basename $(find /sys/class/backlight/ -type l)`; do
+- cp "/sys/class/backlight/$card/brightness" "/var/cache/backlight/$card-brightness-old"
++ for card in `find /sys/class/backlight/ -type l`; do
++ cp "/sys/class/backlight/`basename $card`/brightness" "/var/cache/backlight/`basename $card`-brightness-old"
+ done
+ eend $?
+ }
+--
+2.9.3