summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorharttle2019-05-27 12:46:05 +0800
committerharttle2019-05-27 12:46:05 +0800
commitde8d96678418559e74902f3c0ce30d6f07df79fc (patch)
treeb179ac3adc192722c525d28f61808ad94c87624a
parent667db86d3324f028c338229288a5fb229cf7022a (diff)
downloadaur-de8d96678418559e74902f3c0ce30d6f07df79fc.tar.gz
fix: restore the PKGBUILD
-rw-r--r--.SRCINFO6
l---------PKGBUILD30
2 files changed, 29 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 927fec279dad..b71211fbd77a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -7,12 +7,6 @@ pkgbase = macbook-lighter
license = GPL
makedepends = git
depends = bc
- provides = macbook-lighter
- provides = macbook-lighter-kbd
- provides = macbook-lighter-screen
- conflicts = macbook-lighter
- conflicts = macbook-lighter-kbd
- conflicts = macbook-lighter-screen
source = git+https://github.com/harttle/macbook-lighter.git
md5sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index c666f9823afc..a9a8a9579f08 120000
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1 +1,29 @@
-/home/harttle/src/macbook-lighter/PKGBUILD \ No newline at end of file
+# Maintainer: harttle <yangjvn@126.com>
+# Inspired by lighter, many thanks to Janhouse's perl script https://github.com/Janhouse/lighter
+pkgname=macbook-lighter
+pkgver=v0.0.2.5.g112c1f0
+pkgrel=1
+pkgdesc="Macbook screen/keyboard backlight CLI and auto-adjust on ambient light"
+arch=(any)
+url="https://github.com/harttle/macbook-lighter"
+license=('GPL')
+depends=('bc')
+makedepends=('git')
+provides=()
+conflicts=()
+source=('git+https://github.com/harttle/macbook-lighter.git')
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ git describe --tags | sed 's|-|.|g'
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+ [ ! -f $pkgdir/etc/macbook-lighter.conf ] && install -Dm644 macbook-lighter.conf $pkgdir/etc/macbook-lighter.conf
+ install -Dm644 "macbook-lighter.service" "$pkgdir/usr/lib/systemd/system/macbook-lighter.service"
+ install -Dm755 "src/macbook-lighter-ambient.sh" "$pkgdir/usr/bin/macbook-lighter-ambient"
+ install -Dm755 "src/macbook-lighter-screen.sh" "$pkgdir/usr/bin/macbook-lighter-screen"
+ install -Dm755 "src/macbook-lighter-kbd.sh" "$pkgdir/usr/bin/macbook-lighter-kbd"
+}