-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
49 lines (43 loc) · 1.22 KB
/
PKGBUILD
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
# Maintainer: Dmitry <[email protected]>
pkgname=mewline-git
pkgver=r1.0.0
pkgrel=1
pkgdesc="😺 Elegant and extensible status bar for the meowrch distribution"
arch=('any')
url="https://github.com/meowrch/mewline"
license=('MIT')
depends=(
'python'
'python-virtualenv'
'git'
'gnome-bluetooth-3.0'
'dart-sass'
'gray-git'
)
makedepends=('python-uv')
source=("git+https://github.com/meowrch/mewline.git")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/mewline"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
cd "$srcdir/mewline"
# Install virtual environment
install -d -m755 "$pkgdir/opt/$pkgname"
python -m venv "$pkgdir/opt/$pkgname/.venv"
uv sync
# Install application files
cp -r . "$pkgdir/opt/$pkgname/"
# Create launch script
install -Dm755 /dev/stdin "$pkgdir/usr/bin/mewline" << EOF
#!/bin/sh
cd /opt/mewline-git
exec .venv/bin/python run.py "\$@"
EOF
# Granting rights to files and folders
chmod -R a+rwX "$pkgdir/opt/$pkgname/src/mewline/styles"
find "$pkgdir/opt/$pkgname/src/mewline/styles" -type d -exec chmod 777 {} +
find "$pkgdir/opt/$pkgname/src/mewline/styles" -type f -exec chmod 666 {} +
chmod 755 "$pkgdir/usr/bin/mewline"
}