blob: 0747c2085e59be1f4126d9bab96d7029595bdb4c (
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
65
66
67
|
# Maintainer: DonutsDelivery <megusta52@proton.me>
pkgname=plasma6-applet-freeradio
pkgver=2.2.0
pkgrel=1
pkgdesc="Ad-free internet radio widget for KDE Plasma 6"
arch=('any')
url="https://github.com/DonutsDelivery/Free-Radio-NoAds-NoTalk"
license=('GPL-2.0-or-later')
depends=('plasma-workspace' 'qt6-multimedia' 'qt6-declarative')
makedepends=('extra-cmake-modules' 'git')
optdepends=('qt6-websockets: Enhanced streaming features')
provides=('plasma-applet-freeradio')
conflicts=('plasma-applet-freeradio' 'plasma5-applet-freeradio')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('bb3bf9c1e376b786a044df50047efc0dda9fcee1d78d89135016b3f5ea523a4d')
prepare() {
cd "$srcdir/Free-Radio-NoAds-NoTalk-$pkgver"
# Ensure we're building the main freeradio widget
if [[ ! -d "freeradio" ]]; then
msg2 "Error: freeradio directory not found"
exit 1
fi
}
build() {
cd "$srcdir/Free-Radio-NoAds-NoTalk-$pkgver"
# Build using the CMakeLists.txt in the root
cmake -B build -S . \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
cmake --build build
}
package() {
cd "$srcdir/Free-Radio-NoAds-NoTalk-$pkgver"
# Install using cmake if available, otherwise manual install
if [[ -f "build/Makefile" ]]; then
DESTDIR="$pkgdir" cmake --install build
else
# Manual installation fallback
msg2 "Using manual installation method"
# Create target directories
install -dm755 "$pkgdir/usr/share/plasma/plasmoids/freeradio"
# Copy the widget files
cp -r freeradio/* "$pkgdir/usr/share/plasma/plasmoids/freeradio/"
# Ensure correct permissions
find "$pkgdir/usr/share/plasma/plasmoids/freeradio" -type f -exec chmod 644 {} \;
find "$pkgdir/usr/share/plasma/plasmoids/freeradio" -type d -exec chmod 755 {} \;
fi
# Verify installation
if [[ ! -f "$pkgdir/usr/share/plasma/plasmoids/freeradio/metadata.json" ]]; then
msg2 "Error: metadata.json not found after installation"
exit 1
fi
msg2 "Installation completed successfully"
}
|