commit:     dfb37312c78fab61419e8cc0437be0bb02950165
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Sun Feb 18 13:22:59 2024 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Sun Feb 18 13:23:04 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=dfb37312

www-apps/wiki-js-bin: new package, add 2.5.301

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>

 www-apps/wiki-js-bin/Manifest                   |  1 +
 www-apps/wiki-js-bin/files/postinstall-en.txt   | 18 ++++++++++
 www-apps/wiki-js-bin/files/wiki-js.confd        | 11 ++++++
 www-apps/wiki-js-bin/files/wiki-js.initd        | 22 ++++++++++++
 www-apps/wiki-js-bin/wiki-js-bin-2.5.301.ebuild | 48 +++++++++++++++++++++++++
 5 files changed, 100 insertions(+)

diff --git a/www-apps/wiki-js-bin/Manifest b/www-apps/wiki-js-bin/Manifest
new file mode 100644
index 0000000000..48b0e2f57b
--- /dev/null
+++ b/www-apps/wiki-js-bin/Manifest
@@ -0,0 +1 @@
+DIST wiki-js-bin-2.5.301.tar.gz 78902327 BLAKE2B 
8678f6628320cb1ab03e280b8bd6533972edd39b2e2c041192bdde13dc7590dc2825a8063a9eaa1207e8526cb4dd4037fb32f0979368dd070ee18bbe3f76c580
 SHA512 
f75f168b302fc4c9a010a19fca79f5fa19735b435c25428c6bc3ee4a2843851b98b1e148466bc47687e38f19a05bcc56971868462734eee6eb653c9514f78b3f

diff --git a/www-apps/wiki-js-bin/files/postinstall-en.txt 
b/www-apps/wiki-js-bin/files/postinstall-en.txt
new file mode 100644
index 0000000000..5e99c11a48
--- /dev/null
+++ b/www-apps/wiki-js-bin/files/postinstall-en.txt
@@ -0,0 +1,18 @@
+INSTALLATION
+
+You will need to create a table for your Wiki.js database.  This
+assumes you have some knowledge of PostgreSQL, and already have it
+installed and configured.  If not, please refer to the Gentoo PostgreSQL
+guide at the following URL:
+
+https://wiki.gentoo.org/wiki/PostgreSQL/QuickStart
+
+Log in to PostgreSQL, and create a new database as well as a user with full
+access to this database. After that you will need to provide the details
+of this database and the associated user within the file
+
+${MY_INSTALLDIR}/config.yml 
+
+Finally you should be able to log in to Wiki.js at
+
+http://${VHOST_HOSTNAME}:3000

diff --git a/www-apps/wiki-js-bin/files/wiki-js.confd 
b/www-apps/wiki-js-bin/files/wiki-js.confd
new file mode 100644
index 0000000000..71279bcd43
--- /dev/null
+++ b/www-apps/wiki-js-bin/files/wiki-js.confd
@@ -0,0 +1,11 @@
+# /etc/conf.d/wiki-js: config file for /etc/init.d/wiki-js
+
+# User and group as which to run
+#WIKIJS_USER="wikijs"
+#WIKIJS_GROUP="wikijs"
+
+# Configuration directory
+#WIKIJS_HOMEDIR="/var/www/localhost/htdocs/wiki-js-bin/"
+
+# Extra options for wikijs
+#WIKIJS_OPTS=""

diff --git a/www-apps/wiki-js-bin/files/wiki-js.initd 
b/www-apps/wiki-js-bin/files/wiki-js.initd
new file mode 100644
index 0000000000..d630a09b90
--- /dev/null
+++ b/www-apps/wiki-js-bin/files/wiki-js.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+WIKIJS_USER=${WIKIJS_USER:-wikijs}
+WIKIJS_GROUP=${WIKIJS_GROUP:-wikijs}
+
+description="Modern, lightweight and powerful wiki app built on Nodejs"
+command="/usr/bin/node server"
+command_args="${WIKIJS_OPTS}"
+pidfile="/run/${RC_SVCNAME}.pid"
+directory="${WIKIJS_HOMEDIR}"
+command_background="yes"
+command_user="${WIKIJS_USER}:${WIKIJS_GROUP}"
+
+depend() {
+  need net
+}
+
+start_pre() {
+  checkpath -q -d -o ${WIKIJS_USER}:${WIKIJS_GROUP} ${directory}
+}

diff --git a/www-apps/wiki-js-bin/wiki-js-bin-2.5.301.ebuild 
b/www-apps/wiki-js-bin/wiki-js-bin-2.5.301.ebuild
new file mode 100644
index 0000000000..9e14ef29d3
--- /dev/null
+++ b/www-apps/wiki-js-bin/wiki-js-bin-2.5.301.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit webapp
+
+MY_PN="${PN/-bin/}"
+DESCRIPTION="Modern, lightweight and powerful wiki app built on Nodejs"
+HOMEPAGE="
+       https://js.wiki/
+       https://github.com/Requarks/wiki
+"
+SRC_URI="https://github.com/requarks/wiki/releases/download/v${PV}/${MY_PN}.tar.gz
 -> ${P}.tar.gz"
+S="${WORKDIR}"
+
+LICENSE="AGPL-3"
+KEYWORDS="~amd64"
+
+RDEPEND="
+       acct-group/wikijs
+       acct-user/wikijs
+       >=net-libs/nodejs-18[npm]"
+
+src_install() {
+       webapp_src_preinst
+
+       dodoc LICENSE
+       rm LICENSE || die
+
+       newconfd "${FILESDIR}"/${MY_PN}.confd ${MY_PN}
+       newinitd "${FILESDIR}"/${MY_PN}.initd ${MY_PN}
+
+       [[ -f config.yml ]] || cp config.sample.yml config.yml
+
+       insinto "${MY_HTDOCSDIR#${EPREFIX}}"
+       doins -r .
+
+       keepdir "${MY_HTDOCSDIR}"/data
+
+       webapp_serverowned -R "${MY_HTDOCSDIR}"/data
+       webapp_serverowned "${MY_HTDOCSDIR}"/config.sample.yml
+       webapp_configfile "${MY_HTDOCSDIR}"/config.yml
+
+       webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
+
+       webapp_src_install
+}

Reply via email to