diff options
author | MithicSpirit | 2022-05-20 21:20:48 -0400 |
---|---|---|
committer | MithicSpirit | 2022-05-20 21:20:48 -0400 |
commit | 4bfa6f0af996d1044430e4479380fedfade3139d (patch) | |
tree | 923f1ab19e6676dac85ea843b57368cac6b63441 | |
download | aur-4bfa6f0af996d1044430e4479380fedfade3139d.tar.gz |
Initial Commit
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | PKGBUILD | 63 |
3 files changed, 95 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a759f2e81cc3 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = appflowy-git + pkgdesc = An open-source alternative to Notion. + pkgver = latest + pkgrel = 1 + url = https://www.appflowy.io/ + arch = x86_64 + license = AGPL3 + makedepends = git + makedepends = clang + makedepends = cmake + makedepends = ninja + makedepends = unzip + makedepends = rust + makedepends = cargo + makedepends = cargo-make + makedepends = dart + depends = gtk3 + provides = appflowy + conflicts = appflowy + conflicts = appflowy-bin + source = appflowy::git+https://github.com/AppFlowy-IO/AppFlowy.git + source = flutter::git+https://github.com/flutter/flutter.git#tag=2.10.5 + sha256sums = SKIP + sha256sums = SKIP + +pkgname = appflowy-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..277fba338ef3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +* +**/* + +!.gitignore +!PKGBUILD +!.SRCINFO diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..128357f59455 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: MithicSpirit <rpc01234 at gmail dot com> + +_pkgname=appflowy +pkgname=$_pkgname-git +pkgver=latest +pkgrel=1 +pkgdesc='An open-source alternative to Notion.' +arch=(x86_64) +url='https://www.appflowy.io/' +license=('AGPL3') +depends=(gtk3) +makedepends=(git clang cmake ninja unzip rust cargo cargo-make dart) +provides=($_pkgname) +conflicts=($_pkgname $_pkgname-bin) +replaces=() +backup=() +options=() +install= +source=("$_pkgname::git+https://github.com/AppFlowy-IO/AppFlowy.git" + 'flutter::git+https://github.com/flutter/flutter.git#tag=2.10.5') +sha256sums=('SKIP' 'SKIP') + +_setpath() { + PATH="$PATH:$srcdir/flutter/bin:$HOME/.pub-cache/bin:$HOME/.cargo/bin" +} + +pkgver() { + _setpath + cd "$srcdir/$_pkgname" + git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g' +} + +prepare() { + _setpath + cd "$srcdir/$_pkgname/frontend" + sed -i "/rustup/d" scripts/makefile/env.toml + + flutter config --enable-linux-desktop +} + +build() { + _setpath + cd "$srcdir/$_pkgname/frontend" + cargo install duckscript_cli + cargo make flowy_dev + # cargo make -p production-linux-x86 flowy-sdk-release + cargo make -p production-linux-x86 appflowy-linux +} + +package() { + _setpath + cd "$srcdir/$_pkgname"/frontend/app_flowy/product/*/linux/Release/AppFlowy + install -dm755 "$pkgdir"{/usr/bin,/usr/share/applications,"/opt/$pkgname"} + + cp -a * "$pkgdir/opt/$pkgname/" + rm "$pkgdir/opt/$pkgname/appflowy.desktop.temp" + ln -s "/opt/$pkgname/app_flowy" "$pkgdir/usr/bin/" + + _desktop_file="$pkgdir/usr/share/applications/AppFlowy.desktop" + install -m644 appflowy.desktop.temp "$_desktop_file" + sed -i '/Exec=/s|\[CHANGE_THIS\]/AppFlowy|/usr/bin|' "$_desktop_file" + sed -i "/Icon=/s|\[CHANGE_THIS\]/AppFlowy|/opt/$pkgname|" "$_desktop_file" +} |