Add asdcontrol
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
pkgbase = asdcontrol-git
|
||||
pkgdesc = Control brightness on Apple Displays connected via USB-C
|
||||
pkgver = r23.0ee8bd5
|
||||
pkgrel = 1
|
||||
url = https://github.com/nikosdion/asdcontrol
|
||||
install = asdcontrol.install
|
||||
arch = x86_64
|
||||
license = GPL2
|
||||
makedepends = git
|
||||
makedepends = make
|
||||
makedepends = gcc
|
||||
depends = glibc
|
||||
depends = gcc-libs
|
||||
source = git+https://github.com/nikosdion/asdcontrol.git
|
||||
sha256sums = SKIP
|
||||
|
||||
pkgname = asdcontrol-git
|
||||
@@ -0,0 +1,27 @@
|
||||
# Build directories
|
||||
src/
|
||||
pkg/
|
||||
|
||||
# Package files
|
||||
*.pkg.tar.zst
|
||||
*.pkg.tar.xz
|
||||
*.pkg.tar.gz
|
||||
*.pkg.tar
|
||||
|
||||
# Source archives
|
||||
*.tar.gz
|
||||
*.tar.xz
|
||||
*.tar.bz2
|
||||
*.zip
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
|
||||
# Temporary files
|
||||
*~
|
||||
*.swp
|
||||
*.swo
|
||||
.DS_Store
|
||||
|
||||
# Git clones
|
||||
asdcontrol/
|
||||
@@ -0,0 +1,35 @@
|
||||
# Maintainer: Ryan Hughes <ryan@omarchy.org>
|
||||
pkgname=asdcontrol-git
|
||||
pkgver=r23.0ee8bd5
|
||||
pkgrel=1
|
||||
pkgdesc="Control brightness on Apple Displays connected via USB-C"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/nikosdion/asdcontrol"
|
||||
license=('GPL2')
|
||||
depends=('glibc' 'gcc-libs')
|
||||
makedepends=('git' 'make' 'gcc')
|
||||
source=("git+https://github.com/nikosdion/asdcontrol.git")
|
||||
sha256sums=('SKIP')
|
||||
install=asdcontrol.install
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/asdcontrol"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/asdcontrol"
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/asdcontrol"
|
||||
|
||||
# Install the binary
|
||||
install -Dm755 asdcontrol "$pkgdir/usr/bin/asdcontrol"
|
||||
|
||||
# Install the sudoers file for passwordless execution
|
||||
install -dm750 "$pkgdir/etc/sudoers.d"
|
||||
echo "ALL ALL=(ALL) NOPASSWD: /usr/bin/asdcontrol" > "$pkgdir/etc/sudoers.d/asdcontrol"
|
||||
chmod 440 "$pkgdir/etc/sudoers.d/asdcontrol"
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
post_install() {
|
||||
echo ":: asdcontrol has been installed"
|
||||
echo ":: You can now use 'sudo asdcontrol' to control Apple Display brightness"
|
||||
echo ":: Passwordless sudo has been configured for /usr/bin/asdcontrol"
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
echo ":: Sudoers configuration for asdcontrol has been removed"
|
||||
}
|
||||
Reference in New Issue
Block a user