blob: 8463600efaa292c40a0ff57a463f28c03048dd46 (
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# Maintainer: texas0295 <texas0295@outlook.com>
_reponame="HyperNet.Surface"
pkgname=solian-git
pkgver=0.0.0
pkgrel=1
pkgdesc="Next Generation Network Center (unstable)"
arch=('x86_64')
url="https://solsynth.dev"
license=('AGPL-3.0')
depends=(
'libnotify'
'gtk3'
'mpv'
'libkeybinder3'
'gstreamer'
'libayatana-appindicator'
'libayatana-indicator'
)
makedepends=(
'git'
'ninja'
'flutter-tool'
'flutter-target-linux'
'cmake'
'clang'
)
conflicts=(
'solian-bin-git'
'solian-bin'
'solian'
)
options=('!strip')
source=("git+https://github.com/Solsynth/${_reponame}")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/$_reponame"
echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}
prepare() {
export PUB_CACHE="$srcdir/pub_cache"
cd "$srcdir/$_reponame"
flutter pub get
}
build() {
export PUB_CACHE="$srcdir/pub_cache"
cd "$srcdir/$_reponame"
flutter build linux --no-pub --release
# Prepare AppDir for AppImage
mkdir -p Solian.AppDir
cp -r build/linux/x64/release/bundle/* Solian.AppDir/
cp -r buildtools/appimage_config/* Solian.AppDir/
cp assets/icon/icon-light-radius.png Solian.AppDir/
chmod +x buildtools/appimagetool-x86_64.AppImage
chmod +x Solian.AppDir/AppRun
./buildtools/appimagetool-x86_64.AppImage Solian.AppDir
}
package() {
cd "$srcdir/$_reponame"
install -dm755 "$pkgdir/usr/bin"
install -dm755 "$pkgdir/opt/$pkgname"
install -dm755 "$pkgdir/usr/share/applications"
install -dm755 "$pkgdir/usr/share/icons/hicolor/256x256/apps"
# Install AppImage
install -Dm755 "Solian-x86_64.AppImage" "$pkgdir/opt/$pkgname/Solian-x86_64.AppImage"
# Install icon
install -Dm644 "./assets/icon/icon-light-radius.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/Solian.png"
# Link executable
ln -s "/opt/${pkgname}/Solian-x86_64.AppImage" "${pkgdir}/usr/bin/solian"
# Desktop entry
cat > "$pkgdir/usr/share/applications/solian.desktop" << EOF
[Desktop Entry]
Type=Application
Version=1.0
Name=Solian
Comment=$pkgdesc
Exec=solian %u
Icon=Solian
Terminal=false
Categories=Network;InstantMessaging;Chat;MatrixClient;
EOF
}
|