blob: a17346760dfaff31c69a1ba3f1f577c0f092b7fb (
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
|
# Maintainer: Polarian <polarian@polarian.dev>
pkgname=saber
pkgver=0.15.5
pkgrel=1
pkgdesc="A cross-platform libre notes app written in Flutter"
arch=('x86_64')
url="https://github.com/adil192/saber"
license=('GPL3')
depends=('gtk3' 'bash' 'jsoncpp' 'libsecret' 'xdg-user-dirs')
makedepends=('flutter' 'clang' 'cmake' 'ninja' 'rustup')
source=("https://github.com/adil192/$pkgname/archive/refs/tags/v$pkgver.tar.gz"
"0001-Modify-.desktop-for-Arch-Linux.patch"
"saber.sh")
sha256sums=('d5eed1856a16ffc2d8243daeb1d50ca64e15ef2b4dd5e4c0f5464350bafabe25'
'93e6e067fefad597117d7f6889df204082898b79dcd29853eaa5c879ab35b2df'
'7beadd69cd9fc88ccc8916b27057498da652afbe4265d00cf9de20ea84bb2488')
prepare() {
cd "$pkgname-$pkgver"
# Disable analytics and enable linux desktop
flutter --no-version-check config --no-analytics
flutter --no-version-check config --enable-linux-desktop
# Patch source to allow for better .desktop naming
patch -p1 -i "$srcdir/0001-Modify-.desktop-for-Arch-Linux.patch"
# Pull dependencies within prepare, allowing for offline builds later on
flutter --no-version-check pub get
}
build() {
cd "$pkgname-$pkgver"
flutter --no-version-check build linux --release --prefixed-errors
# Copy icon to source directory for installing
cp assets/icon/resized/icon-128x128.png ./saber.png
}
package() {
# Build directory for the final executable
cd "$pkgname-$pkgver/build/linux/x64/release/bundle/"
# Install application, licence and desktop file (with assets)
install -dm 755 "$pkgdir/opt/$pkgname" "$pkgdir/usr/bin/"
cp -rdp --no-preserve=ownership . "$pkgdir/opt/$pkgname/"
install -Dm644 "$srcdir/$pkgname-$pkgver/saber.desktop" -t "$pkgdir/usr/share/applications/"
install -Dm644 "$srcdir/$pkgname-$pkgver/saber.png" -t "$pkgdir/usr/share/pixmaps/"
# Copy wrapper script to /usr/bin
install -Dm755 "$srcdir/$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
}
|