blob: 0a365acc4c4e035e28ec49a3f98186976abf9315 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
# Contributor: dracorp aka Piotr Rogoza <piotr.r.public at gmail.com>
pkgname=brightness-controller-git
pkgver=2.4.r12.gdab46e3
pkgrel=1
pkgdesc="Control Brightness of your Primary and Secondary Display in Linux"
arch=('x86_64')
url="https://github.com/LordAmit/Brightness"
license=('GPL-3.0-or-later')
depends=(
'ddcutil'
'python-pyqt5'
'python-qtpy'
'xorg-xrandr'
)
makedepends=(
'git'
'python-build'
'python-installer'
'python-poetry-core'
'python-wheel'
)
checkdepends=('python-pytest')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/LordAmit/Brightness.git'
"$url/raw/releases/usr/share/man/man1/${pkgname%-git}.1.gz"
"${pkgname%-git}.desktop"
'brightness-reset.sh')
sha256sums=('SKIP'
'7a01713032d8a44e828c4d7fe4d7445501ebbec6071ee8041faaafa5bac77a91'
'b717c81ee4f996b18c74931c9ee9a3dc5c7cb571aade25a5be52905b7afc8860'
'995a513671b4d1bac4be5a2a542372155f4224fcae8e5f847ba87a8029d9dad1')
pkgver() {
cd Brightness
git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "Brightness/${pkgname%-git}-linux"
mv README.md readme.md
}
build() {
cd "Brightness/${pkgname%-git}-linux"
GIT_DIR='.' python -m build --wheel --no-isolation
}
check() {
cd "Brightness/${pkgname%-git}-linux"
pytest
}
package() {
cd "Brightness/${pkgname%-git}-linux"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 ../img/brightness.svg \
"$pkgdir/usr/share/icons/hicolor/scalable/apps/${pkgname%-git}.svg"
install -Dm644 "$srcdir/${pkgname%-git}.desktop" -t "$pkgdir/usr/share/applications"
install -Dm644 "$srcdir/${pkgname%-git}.1" -t "$pkgdir/usr/share/man/man1"
install -Dm755 "$srcdir/brightness-reset.sh" "$pkgdir/usr/bin/brightness-reset"
}
|