blob: 758605feedea232ac417c3df534b7d697661b11b (
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: Isaac Arcia <iikz87ii@gmail.com>
pkgname=yawns
pkgver=1.2.2
pkgrel=1
pkgdesc="Your Adaptable Widget Notification System"
arch=('any')
url="https://github.com/ikz87/yawns"
license=('GPL-3.0')
depends=(
'python'
'python-pyqt5'
'python-dbus-next'
'python-pillow'
'python-cssutils'
'python-xlib'
'python-gobject'
'python-setproctitle'
)
# Note: This expects the release asset created by the packaging script
source=("$url/releases/download/v$pkgver/$pkgname-v$pkgver.tar.gz")
sha256sums=('2ed26152260ed17afbec7c9239541d76cc2d557c987ba8d2d31c4c91158dc8c4')
package() {
# 1. Enter the extracted directory
cd "$srcdir/$pkgname-v$pkgver"
# 2. Create the destination directory
install -d "$pkgdir/usr/lib/$pkgname"
# 3. Copy EVERYTHING from the source to the destination
# This ensures src/, assets/, config.ini, etc. are all there
cp -r * "$pkgdir/usr/lib/$pkgname/"
# 4. Create the wrapper script
install -d "$pkgdir/usr/bin"
cat > "$pkgdir/usr/bin/$pkgname" <<EOF
#!/bin/bash
# Check if config dir exists in user home
if [ ! -d "\$HOME/.config/yawns" ]; then
mkdir -p "\$HOME/.config/yawns"
echo "Creating default config..."
# Copy defaults from the installed library
# Note: adjusting path to match where they actually are in the repo
if [ -f "/usr/lib/yawns/src/config.ini" ]; then
cp "/usr/lib/yawns/src/config.ini" "\$HOME/.config/yawns/"
elif [ -f "/usr/lib/yawns/config.ini" ]; then
cp "/usr/lib/yawns/config.ini" "\$HOME/.config/yawns/"
fi
if [ -f "/usr/lib/yawns/src/style.qss" ]; then
cp "/usr/lib/yawns/src/style.qss" "\$HOME/.config/yawns/"
elif [ -f "/usr/lib/yawns/style.qss" ]; then
cp "/usr/lib/yawns/style.qss" "\$HOME/.config/yawns/"
fi
fi
# EXECUTE THE APP
exec python3 /usr/lib/yawns/src/app.py "\$@"
EOF
chmod +x "$pkgdir/usr/bin/$pkgname"
}
|