From 5ad65853cfc468f2be2eefb152e30a7ca1745321 Mon Sep 17 00:00:00 2001 From: Viachaslau Ravinski Date: Fri, 9 Jun 2023 12:24:16 -0700 Subject: [PATCH] New package: Logseq-0.9.8 --- srcpkgs/Logseq/files/Logseq.desktop | 11 ++++++++ srcpkgs/Logseq/files/Logseq.sh | 15 ++++++++++ srcpkgs/Logseq/template | 44 +++++++++++++++++++++++++++++ srcpkgs/sotw/template | 19 +++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 srcpkgs/Logseq/files/Logseq.desktop create mode 100644 srcpkgs/Logseq/files/Logseq.sh create mode 100644 srcpkgs/Logseq/template create mode 100644 srcpkgs/sotw/template diff --git a/srcpkgs/Logseq/files/Logseq.desktop b/srcpkgs/Logseq/files/Logseq.desktop new file mode 100644 index 000000000000..c0f64e6dbe97 --- /dev/null +++ b/srcpkgs/Logseq/files/Logseq.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Logseq +Exec=/usr/bin/Logseq %u +MimeType=x-scheme-handler/logseq +Terminal=false +Type=Application +Icon=logseq +StartupWMClass=logseq +Comment=Open Source platform for knowledge sharing and management +Categories=Office + diff --git a/srcpkgs/Logseq/files/Logseq.sh b/srcpkgs/Logseq/files/Logseq.sh new file mode 100644 index 000000000000..28e420474cb1 --- /dev/null +++ b/srcpkgs/Logseq/files/Logseq.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env sh +# Launches Logseq with flags specified in $XDG_CONFIG_HOME/logseq-flags.conf + +# Make script fail if `cat` fails for some reason +set -e + +# Set default value if variable is unset/null +XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}" + +# Attempt to read a config file if it exists +if [ -r "${XDG_CONFIG_HOME}/logseq-flags.conf" ]; then + LOGSEQ_USER_FLAGS="$(cat "$XDG_CONFIG_HOME/logseq-flags.conf")" +fi + +exec /usr/lib/Logseq/Logseq $LOGSEQ_USER_FLAGS "$@" diff --git a/srcpkgs/Logseq/template b/srcpkgs/Logseq/template new file mode 100644 index 000000000000..ae0b304929a7 --- /dev/null +++ b/srcpkgs/Logseq/template @@ -0,0 +1,44 @@ +# Template file for 'Logseq' +pkgname=Logseq +version=0.9.8 +revision=1 +archs="x86_64" +short_desc="Open-source platform for knowledge sharing and management" +maintainer="shnaps " +license="AGPL-3.0-only" +hostmakedepends="nodejs yarn clojure python3 zip git" +homepage="https://github.com/logseq/logseq" +distfiles="https://github.com/logseq/logseq/archive/refs/tags/${version}.zip" +checksum=fbd6327d5ac55bcd7b26c54354244d770774c5e3ee17f33cf03bd654c7356409 +nostrip_files="Logseq" + +do_configure(){ + # download required js modules + yarn install + + # create and sync files to folder `static` + yarn gulp:build + + # go to folder `static` and download required js modules in static + cd "${XBPS_BUILDDIR}/${pkgname}-${version}/static" + yarn install + + # go back to the top-level folder and download clojure dependencies + cd "${XBPS_BUILDDIR}/${pkgname}-${version}" + clojure -P -M:cljs +} + +do_build(){ + yarn cljs:release + cd "${XBPS_BUILDDIR}/${pkgname}-${version}/static" + yarn electron-forge package +} + +do_install() { + vinstall "${FILESDIR}/Logseq.desktop" 644 usr/share/applications + vinstall "static/out/Logseq-linux-x64/resources/app/icons/logseq.png" 644 usr/share/pixmaps logseq.png + vcopy "static/out/Logseq-linux-x64/" usr/lib/Logseq + vlicense "static/out/Logseq-linux-x64/LICENSE" + vlicense "static/out/Logseq-linux-x64/LICENSES.chromium.html" + vbin "${FILESDIR}/Logseq.sh" Logseq +} diff --git a/srcpkgs/sotw/template b/srcpkgs/sotw/template new file mode 100644 index 000000000000..ab0a49a6353c --- /dev/null +++ b/srcpkgs/sotw/template @@ -0,0 +1,19 @@ +# Template file for 'sotw' +pkgname=sotw +version=1.5.2 +revision=1 +archs="x86_64" +hostmakedepends="premake4 xerces-c SDL2 SDL2_image zlib ncurses lua51 boost gtest" +# makedepeends="libxerces-c" +# depends="xerces-c" +short_desc="Shadow Of The Wyrm is a single player, traditional roguelike by Julian Day" +maintainer="Viachaslau Ravinski " +license="MIT" +homepage="http://www.shadowofthewyrm.org/" +distfiles="https://github.com/prolog/shadow-of-the-wyrm/archive/refs/tags/release-${version}.zip" +checksum=bd1350c6fd3858c69845a7f22c614c1f36ba15276252c75ca87bfda518a5e557 + +do_install(){ + premake4 --lua_include=/usr/bin/lua-5.1 --lua_link=lua-5.1 gmake # make config=release + make config=release +}