-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
75 lines (62 loc) · 2.28 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Maintainer: Knut Ahlers
pkgname=chatterino2-dankerino-git
pkgver=2025.01.20
pkgrel=1
pkgdesc="Fork of Chatterino 2"
arch=(any)
url=https://github.com/Mm2PL/dankerino
license=('MIT')
depends=('qt6-base' 'qt6-tools' 'boost-libs' 'openssl' 'qt6-imageformats' 'qtkeychain-qt6' 'qt6-5compat' 'qt6-svg')
makedepends=('git' 'boost' 'cmake')
optdepends=(
'streamlink: For piping streams to video players'
'pulseaudio: For audio output'
)
provides=('chatterino')
conflicts=('chatterino')
# We temporarily disable LTO since we get an ICE when compiling with gcc since this commit https://github.com/Chatterino/chatterino2/commit/ed20e71db4c957d3b2a8ce9350b847f4c805cb83
# Bug report tracking https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114501
options=('!lto')
source=("git+${url}.git#tag=nightly-build")
sha512sums=('29c27e808a6f13c960cfbe46c99efc5ae01a4710e5736d88ee02582b40d3acbe797bc57286923f622b946cff7c4a892158572311192ba967add48e39dc6f3004')
build() {
cd "${srcdir}/dankerino"
mkdir -p build
cd build
declare -a flags
if [[ $CXXFLAGS == *"-flto"* ]]; then
flags+=("-DCHATTERINO_LTO=ON")
fi
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_SYSTEM_QTKEYCHAIN=ON \
-DUSE_PRECOMPILED_HEADERS=OFF \
-DBUILD_WITH_QT6=ON \
-DCHATTERINO_UPDATER=OFF \
-DCHATTERINO_PLUGINS=ON \
"${flags[@]}" \
..
cmake --build .
}
package() {
cd "$srcdir/dankerino"
if [ -f "build/bin/chatterino" ] && [ -x "build/bin/chatterino" ]; then
echo "Getting chatterino binary from bin folder"
install -Dm755 "build/bin/chatterino" "$pkgdir/usr/bin/chatterino"
else
echo "Getting chatterino binary from NON-BIN folder"
# System ccache is enabled, causing the binary file to not fall into the bin folder
# Temporary solution until we have figured out a way to stabilize the ccache output
install -Dm755 "build/chatterino" "$pkgdir/usr/bin/chatterino"
fi
install -Dm644 "resources/com.chatterino.chatterino.desktop" "$pkgdir/usr/share/applications/com.chatterino.chatterino.desktop"
install -Dm644 "resources/icon.png" "$pkgdir/usr/share/pixmaps/chatterino.png"
}
pkgver() {
cd "${srcdir}/dankerino"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "${srcdir}/dankerino"
git submodule update --init --recursive
}