summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwestofer2021-02-15 14:32:15 +0300
committerwestofer2021-02-15 14:32:15 +0300
commit2f9bb6d9e4d5194558283dc7a2bdfe67bed5cd74 (patch)
tree76491b9883d3fd8acbf2a6d0d6e895da2fe4ae99
parent0df2299483ea87f8d0c80aedc695a30b76cc8e44 (diff)
downloadaur-2f9bb6d9e4d5194558283dc7a2bdfe67bed5cd74.tar.gz
feat: Huge size decrease, uses system electron
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD80
-rw-r--r--athens-git2
-rw-r--r--athens-git.desktop9
4 files changed, 48 insertions, 50 deletions
diff --git a/.SRCINFO b/.SRCINFO
index db48fae05cf8..d7ff8d543564 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,17 @@
pkgbase = athens-git
pkgdesc = Athens is an open-source and local-first alternative to Roam Research. Athens lets you take notes... Master branch
- pkgver = v1.0.0.beta.37.r7.ga0b98d4c0
+ pkgver = v1.0.0.beta.38.r8.ge073e5cc9
pkgrel = 1
url = https://github.com/athensresearch/athens
+ arch = i686
arch = x86_64
license = Eclipse Public License - v 1.0
makedepends = git
+ makedepends = nodejs
+ makedepends = leiningen
+ makedepends = yarn
makedepends = jq
+ depends = electron
provides = athens
conflicts = athens
source = athens::git+https://github.com/athensresearch/athens
diff --git a/PKGBUILD b/PKGBUILD
index 8b5bffaae094..aa37699601ca 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,15 +4,15 @@
# Maintainer: Westofer Raymond <westoferraymond@gmail.com>
pkgname=athens-git
_pkgname=athens
-pkgver=v1.0.0.beta.37.r7.ga0b98d4c0
+pkgver=v1.0.0.beta.38.r8.ge073e5cc9
pkgrel=1
pkgdesc="Athens is an open-source and local-first alternative to Roam Research. Athens lets you take notes... Master branch "
-arch=('x86_64')
+arch=('i686' 'x86_64')
url="https://github.com/athensresearch/athens"
license=('Eclipse Public License - v 1.0') #TODO
groups=()
-depends=()
-makedepends=("git" "leiningen" "yarn" "jq")
+depends=("electron")
+makedepends=("git" "nodejs" "leiningen" "yarn" "jq")
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
#replaces=()
@@ -27,64 +27,46 @@ md5sums=('SKIP')
# a description of each element in the source array.
pkgver() {
- cd "$srcdir/${_pkgname}"
- git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+ cd "$srcdir/${_pkgname}"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
- cd "$srcdir/${_pkgname}"
-
- # electron builder enforces email and homepage!
-jq '.author|={"name":"athensresearch" , "email":"athensresearch@gmail.com"}' package.json > tmp.json && mv tmp.json package.json
-jq '.homepage="https://github.com/athensresearch/athens"' package.json > tmp.json && mv tmp.json package.json
-echo '[Desktop Entry]
- Name=athens
- Exec=/opt/athens/athens %U
- Terminal=false
- Type=Application
- Icon=athens
- StartupWMClass=athens
- Comment=Open-Source Networked Thought
- Categories=Utility;' > "${srcdir}/${_pkgname}/athens.desktop"
+ cd "$srcdir/${_pkgname}"
+ # electron builder enforces email and homepage!
+ jq '.author|={"name":"athensresearch" , "email":"athensresearch@gmail.com"}' package.json > tmp.json && mv tmp.json package.json
+ jq '.homepage="https://github.com/athensresearch/athens"' package.json > tmp.json && mv tmp.json package.json
+ yarn upgrade electron@"$(</usr/lib/electron/version)"
}
build() {
- cd "$srcdir/${_pkgname}"
- yarn --cache-folder "${srcdir}/yarn-cache"
- lein compile
- yarn --cache-folder "${srcdir}/yarn-cache" electron-builder --linux dir
+ cd "$srcdir/${_pkgname}"
+ local i686=ia32 x86_64=x64
+
+ yarn --cache-folder "${srcdir}/yarn-cache"
+ lein compile
+
+ yarn --cache-folder "${srcdir}/yarn-cache" run \
+ electron-builder --linux --"${!CARCH}" --dir \
+ -c.electronDist=/usr/lib/electron \
+ -c.electronVersion="$(</usr/lib/electron/version)"
+
}
#check() {
- #cd "$srcdir/${_pkgname}"
- #make -k check
+#cd "$srcdir/${_pkgname}"
+#make -k check
#}
package() {
- cd "$srcdir/${_pkgname}"
- # idk, guess it is uselss
- mkdir -p "${pkgdir}/opt/${_pkgname}"
-
- cp -R ./dist/linux-unpacked/* "${pkgdir}/opt/${_pkgname}"
-
- # Executable:
- mkdir -p "${pkgdir}/usr/bin"
- echo ln -s "/opt/${_pkgname}/athens" "${pkgdir}/usr/bin/${_pkgname}"
- ln -s "/opt/${_pkgname}/athens" "${pkgdir}/usr/bin/${_pkgname}"
-
- # License:
- mkdir -p "${pkgdir}/usr/share/licenses/athens"
- install -D -m755 "${srcdir}/${_pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/athens/LICENSE"
-
- # icon
- mkdir -p "${pkgdir}/usr/share/icons/hicolor/48x48/apps"
- install -D -m755 "${srcdir}/${_pkgname}/build/icon.png" "${pkgdir}/usr/share/icons/hicolor/48x48/apps/athens.png"
-
- #desktop file
- mkdir -p "${pkgdir}/usr/share/applications"
- install -D -m755 "${srcdir}/${_pkgname}/athens.desktop" "${pkgdir}/usr/share/applications/athens.desktop"
+ #desktop file
+ cd "$startdir"
+ install -Dm644 -t "${pkgdir}/usr/share/applications" "${pkgname}.desktop"
+ install -Dm755 -t "${pkgdir}/usr/bin" "$pkgname"
+ cd "$srcdir/${_pkgname}"
+ install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
+ install -Dm644 "build/icon.png" "$pkgdir/usr/share/icons/hicolor/512x512/apps/$pkgname.png"
-# make DESTDIR="$pkgdir/" install
}
diff --git a/athens-git b/athens-git
new file mode 100644
index 000000000000..0a4dedfea3e1
--- /dev/null
+++ b/athens-git
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec electron /usr/lib/rocketchat-desktop.asar "$@"
diff --git a/athens-git.desktop b/athens-git.desktop
new file mode 100644
index 000000000000..3f87340ec089
--- /dev/null
+++ b/athens-git.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+ Name=athens
+ Exec=/opt/athens/athens %U
+ Terminal=false
+ Type=Application
+ Icon=athens
+ StartupWMClass=athens
+ Comment=Open-Source Networked Thought
+ Categories=Office