forked from Foxyz/sync_replay_project
Add arch packaging. Add automatic version incrementation to linux build.
This commit is contained in:
1 parent
0c38528520
commit
b65af50996
1 file changed
+40
@@ -0,0 +1,40 @@
|
|||||||
|
pkgname=engawa-sync-git
|
||||||
|
pkgver=1.0.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='Synchronised mpv watch-together desktop client and dedicated server'
|
||||||
|
arch=('x86_64')
|
||||||
|
url='https://git.senkochan.moe/Foxyz/sync_replay_project'
|
||||||
|
license=('unknown')
|
||||||
|
depends=('gtk3' 'libepoxy' 'libmpv')
|
||||||
|
makedepends=('clang' 'cmake' 'flutter' 'ninja' 'pkgconf')
|
||||||
|
source=("${pkgname}::git+${url}.git#tag=v${pkgver}")
|
||||||
|
b2sums=('SKIP')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "$srcdir/$pkgname/apps/desktop"
|
||||||
|
flutter pub get
|
||||||
|
|
||||||
|
cd "$srcdir/$pkgname/packages/server"
|
||||||
|
dart pub get
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$srcdir/$pkgname/apps/desktop"
|
||||||
|
flutter build linux --release --dart-define=APP_VERSION="$pkgver"
|
||||||
|
|
||||||
|
cd "$srcdir/$pkgname/packages/server"
|
||||||
|
dart compile exe bin/server.dart -o watch-together-server
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
local bundle="$srcdir/$pkgname/apps/desktop/build/linux/x64/release/bundle"
|
||||||
|
|
||||||
|
install -d "$pkgdir/usr/lib/$pkgname" "$pkgdir/usr/bin"
|
||||||
|
cp -a "$bundle/." "$pkgdir/usr/lib/$pkgname/"
|
||||||
|
install -Dm755 "$srcdir/$pkgname/packages/server/watch-together-server" \
|
||||||
|
"$pkgdir/usr/lib/$pkgname/watch-together-server"
|
||||||
|
|
||||||
|
ln -s "/usr/lib/$pkgname/watch_together" "$pkgdir/usr/bin/$pkgname"
|
||||||
|
ln -s "/usr/lib/$pkgname/watch-together-server" \
|
||||||
|
"$pkgdir/usr/bin/$pkgname-server"
|
||||||
|
}
|
||||||
Reference in new issue
Block a user