summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjacopo2015-09-23 19:28:36 +0200
committerjacopo2015-09-23 19:28:36 +0200
commite10c3a105c260ecd34caa5ec9311a2e9108b80a4 (patch)
tree8f28b7193bda27991ed113ffb1667f2245c99bc3
downloadaur-e10c3a105c260ecd34caa5ec9311a2e9108b80a4.tar.gz
Initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD23
-rw-r--r--backlight-openrc.install35
3 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..89999c745fd7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = backlight-openrc
+ pkgdesc = Restore the screen brightness at system startup.
+ pkgver = b49490c
+ pkgrel = 1
+ url = https://git.covolunablu.org/jacopo/backlight-openrc
+ install = backlight-openrc.install
+ arch = x86_64
+ arch = i686
+ license = GPL3
+ depends = openrc-core
+ source = git+https://git.covolunablu.org/jacopo/backlight-openrc.git
+ md5sums = SKIP
+
+pkgname = backlight-openrc
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ff104f6cfa2f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,23 @@
+# Maintainer: jacopo <jacopo[at]autistici[dot]org>
+pkgname=backlight-openrc
+pkgrel=1
+pkgver=b49490c
+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')
+source=("git+https://git.covolunablu.org/jacopo/backlight-openrc.git")
+install="$pkgname.install"
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ #printf "%s_%s" "$(date +%Y%m%d)" "$(git log --pretty=format:'%h' -n 1)"
+ git log --pretty=format:'%h' -n 1
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+ install -Dm=755 backlight "$pkgdir/etc/init.d/backlight"
+}
diff --git a/backlight-openrc.install b/backlight-openrc.install
new file mode 100644
index 000000000000..7c98fcf1a518
--- /dev/null
+++ b/backlight-openrc.install
@@ -0,0 +1,35 @@
+## arg 1: the new package version
+pre_install() {
+ cat /dev/null > /dev/null
+}
+
+## 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'"
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+pre_upgrade() {
+ cat /dev/null > /dev/null
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ cat /dev/null > /dev/null
+}
+
+## arg 1: the old package version
+pre_remove() {
+ rc-update del backlight -a > /dev/null 2&>1
+ return 0
+}
+
+## 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'"
+ cat /dev/null > /dev/null
+}